Обсуждение: BUG #5899: Memory corruption when running psql

Поиск
Список
Период
Сортировка

BUG #5899: Memory corruption when running psql

От
"Ross Barrett"
Дата:
The following bug has been logged online:

Bug reference:      5899
Logged by:          Ross Barrett
Email address:      ross_barrett@rapid7.com
PostgreSQL version: 9.0.3
Operating system:   Ubuntu 9.10
Description:        Memory corruption when running psql
Details:

Attempting to run psql complains that termcap db is not present (bug 5807).
Applying the work around of placing an /etc/termcap file from a Red Hat
system allowed psql to run 1x.  Subsequent runs always yield a memory
error:


psql (9.0.3)
Type "help" for help.

*** glibc detected *** deploy/nsc/nxpgsql/pgsql/bin/psql: malloc(): memory
corruption: 0x0000000002301b40 ***
======= Backtrace: =========
/lib/libc.so.6[0x7f62c79ed2f6]
/lib/libc.so.6[0x7f62c79f016e]
/lib/libc.so.6(__libc_malloc+0x6e)[0x7f62c79f1d4e]
/home/rbarrett/r7/v4/nexpose/deploy/nsc/nxpgsql/pgsql/bin/../lib/libedit.so[
0x7f62c83b64ec]
/home/rbarrett/r7/v4/nexpose/deploy/nsc/nxpgsql/pgsql/bin/../lib/libedit.so[
0x7f62c83b662f]
/home/rbarrett/r7/v4/nexpose/deploy/nsc/nxpgsql/pgsql/bin/../lib/libedit.so[
0x7f62c83b6d17]
/home/rbarrett/r7/v4/nexpose/deploy/nsc/nxpgsql/pgsql/bin/../lib/libedit.so(
history+0x5a3)[0x7f62c83b76da]
/home/rbarrett/r7/v4/nexpose/deploy/nsc/nxpgsql/pgsql/bin/../lib/libedit.so(
read_history+0x47)[0x7f62c83c7cd5]
deploy/nsc/nxpgsql/pgsql/bin/psql[0x40a142]
deploy/nsc/nxpgsql/pgsql/bin/psql[0x40fb0b]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7f62c7995abd]
deploy/nsc/nxpgsql/pgsql/bin/psql[0x403a69]
======= Memory map: ========
00400000-00456000 r-xp 00000000 08:11 28716295
/home/rbarrett/r7/v4/nexpose/deploy/nsc/nxpgsql/pgsql/bin/psql
00655000-00656000 rw-p 00055000 08:11 28716295
/home/rbarrett/r7/v4/nexpose/deploy/nsc/nxpgsql/pgsql/bin/psql
00656000-00657000 rw-p 00000000 00:00 0
022f4000-02315000 rw-p 00000000 00:00 0
[heap]
3485e00000-3485e03000 r-xp 00000000 08:11 28717912
/home/rbarrett/r7/v4/nexpose/deploy/nsc/nxpgsql/pgsql/lib/libtermcap.so.2
3485e03000-3486002000 ---p 00003000 08:11 28717912
/home/rbarrett/r7/v4/nexpose/deploy/nsc/nxpgsql/pgsql/lib/libtermcap.so.2
3486002000-3486003000 rw-p 00002000 08:11 28717912
/home/rbarrett/r7/v4/nexpose/deploy/nsc/nxpgsql/pgsql/lib/libtermcap.so.2
383ea00000-383eb2d000 r-xp 00000000 08:11 28717886
/home/rbarrett/r7/v4/nexpose/deploy/nsc/nxpgsql/pgsql/lib/libcrypto.so.6
383eb2d000-383ed2c000 ---p 0012d000 08:11 28717886
/home/rbarrett/r7/v4/nexpose/deploy/nsc/nxpgsql/pgsql/lib/libcrypto.so.6
383ed2c000-383ed4d000 rw-p 0012c000 08:11 28717886
/home/rbarrett/r7/v4/nexpose/deploy/nsc/nxpgsql/pgsql/lib/libcrypto.so.6
383ed4d000-383ed51000 rw-p 00000000 00:00 0
383ee00000-383ee46000 r-xp 00000000 08:11 28717911
/home/rbarrett/r7/v4/nexpose/deploy/nsc/nxpgsql/pgsql/lib/libssl.so.6
383ee46000-383f046000 ---p 00046000 08:11 28717911
/home/rbarrett/r7/v4/nexpose/deploy/nsc/nxpgsql/pgsql/lib/libssl.so.6
383f046000-383f04c000 rw-p 00046000 08:11 28717911
/home/rbarrett/r7/v4/nexpose/deploy/nsc/nxpgsql/pgsql/lib/libssl.so.6
7f62c0000000-7f62c0021000 rw-p 00000000 00:00 0
7f62c0021000-7f62c4000000 ---p 00000000 00:00 0
7f62c6088000-7f62c609e000 r-xp 00000000 08:01 171
/lib/libgcc_s.so.1
7f62c609e000-7f62c629d000 ---p 00016000 08:01 171
/lib/libgcc_s.so.1
7f62c629d000-7f62c629e000 r--p 00015000 08:01 171
/lib/libgcc_s.so.1
7f62c629e000-7f62c629f000 rw-p 00016000 08:01 171
/lib/libgcc_s.so.1
7f62c629f000-7f62c62ab000 r-xp 00000000 08:01 1449
/lib/libnss_files-2.10.1.so
7f62c62ab000-7f62c64aa000 ---p 0000c000 08:01 1449
/lib/libnss_files-2.10.1.so
7f62c64aa000-7f62c64ab000 r--p 0000b000 08:01 1449
/lib/libnss_files-2.10.1.so
7f62c64ab000-7f62c64ac000 rw-p 0000c000 08:01 1449
/lib/libnss_files-2.10.1.so
7f62c64ac000-7f62c64b6000 r-xp 00000000 08:01 1451
/lib/libnss_nis-2.10.1.so
7f62c64b6000-7f62c66b5000 ---p 0000a000 08:01 1451
/lib/libnss_nis-2.10.1.so
7f62c66b5000-7f62c66b6000 r--p 00009000 08:01 1451
/lib/libnss_nis-2.10.1.so
7f62c66b6000-7f62c66b7000 rw-p 0000a000 08:01 1451
/lib/libnss_nis-2.10.1.so
7f62c66b7000-7f62c66cd000 r-xp 00000000 08:01 1446
/lib/libnsl-2.10.1.so

7f62c66cd000-7f62c68cd000 ---p 00016000 08:01 1446
/lib/libnsl-2.10.1.so
7f62c68cd000-7f62c68ce000 r--p 00016000 08:01 1446
/lib/libnsl-2.10.1.so
7f62c68ce000-7f62c68cf000 rw-p 00017000 08:01 1446
/lib/libnsl-2.10.1.so
7f62c68cf000-7f62c68d1000 rw-p 00000000 00:00 0
7f62c68d1000-7f62c68d8000 r-xp 00000000 08:01 1447
/lib/libnss_compat-2.10.1.so
7f62c68d8000-7f62c6ad8000 ---p 00007000 08:01 1447
/lib/libnss_compat-2.10.1.so
7f62c6ad8000-7f62c6ad9000 r--p 00007000 08:01 1447
/lib/libnss_compat-2.10.1.so
7f62c6ad9000-7f62c6ada000 rw-p 00008000 08:01 1447
/lib/libnss_compat-2.10.1.so
7f62c6ada000-7f62c6af0000 r-xp 00000000 08:01 1455
/lib/libresolv-2.10.1.so
7f62c6af0000-7f62c6cef000 ---p 00016000 08:01 1455
/lib/libresolv-2.10.1.so
7f62c6cef000-7f62c6cf0000 r--p 00015000 08:01 1455
/lib/libresolv-2.10.1.so
7f62c6cf0000-7f62c6cf1000 rw-p 00016000 08:01 1455
/lib/libresolv-2.10.1.so
7f62c6cf1000-7f62c6cf3000 rw-p 00000000 00:00 0
7f62c6cf3000-7f62c6cf5000 r-xp 00000000 08:01 771
/lib/libkeyutils-1.2.so
7f62c6cf5000-7f62c6ef4000 ---p 00002000 08:01 771
/lib/libkeyutils-1.2.so
7f62c6ef4000-7f62c6ef5000 r--p 00001000 08:01 771
/lib/libkeyutils-1.2.so
7f62c6ef5000-7f62c6ef6000 rw-p 00002000 08:01 771
/lib/libkeyutils-1.2.so
7f62c6ef6000-7f62c6efd000 r-xp 00000000 08:01 131354
/usr/lib/libkrb5support.so.0.1
7f62c6efd000-7f62c70fc000 ---p 00007000 08:01 131354
/usr/lib/libkrb5support.so.0.1
7f62c70fc000-7f62c70fd000 r--p 00006000 08:01 131354
/usr/lib/libkrb5support.so.0.1
7f62c70fd000-7f62c70fe000 rw-p 00007000 08:01 131354
/usr/lib/libkrb5support.so.0.1
7f62c70fe000-7f62c7127000 r-xp 00000000 08:01 142340
/usr/lib/libk5crypto.so.3.1Aborted

Re: BUG #5899: Memory corruption when running psql

От
Alvaro Herrera
Дата:
Excerpts from Ross Barrett's message of jue feb 24 13:36:34 -0300 2011:
>
> The following bug has been logged online:
>
> Bug reference:      5899
> Logged by:          Ross Barrett
> Email address:      ross_barrett@rapid7.com
> PostgreSQL version: 9.0.3
> Operating system:   Ubuntu 9.10
> Description:        Memory corruption when running psql
> Details:
>
> Attempting to run psql complains that termcap db is not present (bug 5807).
> Applying the work around of placing an /etc/termcap file from a Red Hat
> system allowed psql to run 1x.  Subsequent runs always yield a memory
> error:

Try LD_PRELOAD'ing libreadline -- or recompile psql linked to that
instead of libedit.

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: BUG #5899: Memory corruption when running psql

От
Robert Haas
Дата:
On Thu, Feb 24, 2011 at 11:36 AM, Ross Barrett <ross_barrett@rapid7.com> wr=
ote:
>
> The following bug has been logged online:
>
> Bug reference: =A0 =A0 =A05899
> Logged by: =A0 =A0 =A0 =A0 =A0Ross Barrett
> Email address: =A0 =A0 =A0ross_barrett@rapid7.com
> PostgreSQL version: 9.0.3
> Operating system: =A0 Ubuntu 9.10
> Description: =A0 =A0 =A0 =A0Memory corruption when running psql
> Details:
>
> Attempting to run psql complains that termcap db is not present (bug 5807=
).
> Applying the work around of placing an /etc/termcap file from a Red Hat
> system allowed psql to run 1x. =A0Subsequent runs always yield a memory
> error:

How did you install PostgreSQL?

--=20
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: BUG #5899: Memory corruption when running psql

От
Ross Barrett
Дата:
I determined that this issue was caused by something (a large error message
relating to failed delete caused by an integrity issue) which I erroneously
pasted into the psql terminal.  I was able to get around the problem by
deleting my .pg_history file.

Perhaps it is more accurate that this is a problem with termcap?

--
View this message in context:
http://postgresql.1045698.n5.nabble.com/BUG-5899-Memory-corruption-when-running-psql-tp3398967p3408178.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

Re: BUG #5899: Memory corruption when running psql

От
Robert Haas
Дата:
On Thu, Mar 3, 2011 at 11:14 AM, Ross Barrett <ross_barrett@rapid7.com> wro=
te:
> I determined that this issue was caused by something (a large error messa=
ge
> relating to failed delete caused by an integrity issue) which I erroneous=
ly
> pasted into the psql terminal. =A0I was able to get around the problem by
> deleting my .pg_history file.
>
> Perhaps it is more accurate that this is a problem with termcap?

More likely libedit, which FWICT seems to be riddled with bugs.  :-(

--=20
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: BUG #5899: Memory corruption when running psql

От
SandraA
Дата:
I am also having this problem.  I used the One-Click installer provided by
EnterpriseDB to install PostgreSQL 9.0.3.  Is there a fix for the bug?

--
View this message in context:
http://postgresql.1045698.n5.nabble.com/BUG-5899-Memory-corruption-when-running-psql-tp3398967p3412773.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

Re: BUG #5899: Memory corruption when running psql

От
Dave Page
Дата:
On Mon, Mar 7, 2011 at 5:20 PM, SandraA <ArnoldS@osti.gov> wrote:
> I am also having this problem. =A0I used the One-Click installer provided=
 by
> EnterpriseDB to install PostgreSQL 9.0.3. =A0Is there a fix for the bug?

There is a fix in QA.

--=20
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company