pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #5899: Memory corruption when running psql
7+ messages / 5 participants
[nested] [flat]

* BUG #5899: Memory corruption when running psql
@ 2011-02-24 16:36 Ross Barrett <ross_barrett@rapid7.com>
  2011-02-25 16:03 ` Re: BUG #5899: Memory corruption when running psql Alvaro Herrera <alvherre@commandprompt.com>
  2011-03-03 15:41 ` Re: BUG #5899: Memory corruption when running psql Robert Haas <robertmhaas@gmail.com>
  0 siblings, 2 replies; 7+ messages in thread

From: Ross Barrett @ 2011-02-24 16:36 UTC (permalink / raw)
  To: pgsql-bugs


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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #5899: Memory corruption when running psql
  2011-02-24 16:36 BUG #5899: Memory corruption when running psql Ross Barrett <ross_barrett@rapid7.com>
@ 2011-02-25 16:03 ` Alvaro Herrera <alvherre@commandprompt.com>
  1 sibling, 0 replies; 7+ messages in thread

From: Alvaro Herrera @ 2011-02-25 16:03 UTC (permalink / raw)
  To: Ross Barrett <ross_barrett@rapid7.com>; +Cc: pgsql-bugs

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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #5899: Memory corruption when running psql
  2011-02-24 16:36 BUG #5899: Memory corruption when running psql Ross Barrett <ross_barrett@rapid7.com>
@ 2011-03-03 15:41 ` Robert Haas <robertmhaas@gmail.com>
  2011-03-03 16:14   ` Re: BUG #5899: Memory corruption when running psql Ross Barrett <ross_barrett@rapid7.com>
  1 sibling, 1 reply; 7+ messages in thread

From: Robert Haas @ 2011-03-03 15:41 UTC (permalink / raw)
  To: Ross Barrett <ross_barrett@rapid7.com>; +Cc: pgsql-bugs

On Thu, Feb 24, 2011 at 11:36 AM, Ross Barrett <ross_barrett@rapid7.com> wrote:
>
> 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:

How did you install PostgreSQL?

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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #5899: Memory corruption when running psql
  2011-02-24 16:36 BUG #5899: Memory corruption when running psql Ross Barrett <ross_barrett@rapid7.com>
  2011-03-03 15:41 ` Re: BUG #5899: Memory corruption when running psql Robert Haas <robertmhaas@gmail.com>
@ 2011-03-03 16:14   ` Ross Barrett <ross_barrett@rapid7.com>
  2011-03-03 17:06     ` Re: BUG #5899: Memory corruption when running psql Robert Haas <robertmhaas@gmail.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Ross Barrett @ 2011-03-03 16:14 UTC (permalink / raw)
  To: pgsql-bugs

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-tp3398967p34081...
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #5899: Memory corruption when running psql
  2011-02-24 16:36 BUG #5899: Memory corruption when running psql Ross Barrett <ross_barrett@rapid7.com>
  2011-03-03 15:41 ` Re: BUG #5899: Memory corruption when running psql Robert Haas <robertmhaas@gmail.com>
  2011-03-03 16:14   ` Re: BUG #5899: Memory corruption when running psql Ross Barrett <ross_barrett@rapid7.com>
@ 2011-03-03 17:06     ` Robert Haas <robertmhaas@gmail.com>
  2011-03-07 17:20       ` Re: BUG #5899: Memory corruption when running psql SandraA <ArnoldS@osti.gov>
  0 siblings, 1 reply; 7+ messages in thread

From: Robert Haas @ 2011-03-03 17:06 UTC (permalink / raw)
  To: Ross Barrett <ross_barrett@rapid7.com>; +Cc: pgsql-bugs

On Thu, Mar 3, 2011 at 11:14 AM, Ross Barrett <ross_barrett@rapid7.com> wrote:
> 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?

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

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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #5899: Memory corruption when running psql
  2011-02-24 16:36 BUG #5899: Memory corruption when running psql Ross Barrett <ross_barrett@rapid7.com>
  2011-03-03 15:41 ` Re: BUG #5899: Memory corruption when running psql Robert Haas <robertmhaas@gmail.com>
  2011-03-03 16:14   ` Re: BUG #5899: Memory corruption when running psql Ross Barrett <ross_barrett@rapid7.com>
  2011-03-03 17:06     ` Re: BUG #5899: Memory corruption when running psql Robert Haas <robertmhaas@gmail.com>
@ 2011-03-07 17:20       ` SandraA <ArnoldS@osti.gov>
  2011-03-08 06:41         ` Re: BUG #5899: Memory corruption when running psql Dave Page <dpage@pgadmin.org>
  0 siblings, 1 reply; 7+ messages in thread

From: SandraA @ 2011-03-07 17:20 UTC (permalink / raw)
  To: pgsql-bugs

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-tp3398967p34127...
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #5899: Memory corruption when running psql
  2011-02-24 16:36 BUG #5899: Memory corruption when running psql Ross Barrett <ross_barrett@rapid7.com>
  2011-03-03 15:41 ` Re: BUG #5899: Memory corruption when running psql Robert Haas <robertmhaas@gmail.com>
  2011-03-03 16:14   ` Re: BUG #5899: Memory corruption when running psql Ross Barrett <ross_barrett@rapid7.com>
  2011-03-03 17:06     ` Re: BUG #5899: Memory corruption when running psql Robert Haas <robertmhaas@gmail.com>
  2011-03-07 17:20       ` Re: BUG #5899: Memory corruption when running psql SandraA <ArnoldS@osti.gov>
@ 2011-03-08 06:41         ` Dave Page <dpage@pgadmin.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Dave Page @ 2011-03-08 06:41 UTC (permalink / raw)
  To: SandraA <ArnoldS@osti.gov>; +Cc: pgsql-bugs

On Mon, Mar 7, 2011 at 5:20 PM, SandraA <ArnoldS@osti.gov> wrote:
> 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?

There is a fix in QA.

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

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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2011-03-08 06:41 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-02-24 16:36 BUG #5899: Memory corruption when running psql Ross Barrett <ross_barrett@rapid7.com>
2011-02-25 16:03 ` Alvaro Herrera <alvherre@commandprompt.com>
2011-03-03 15:41 ` Robert Haas <robertmhaas@gmail.com>
2011-03-03 16:14   ` Ross Barrett <ross_barrett@rapid7.com>
2011-03-03 17:06     ` Robert Haas <robertmhaas@gmail.com>
2011-03-07 17:20       ` SandraA <ArnoldS@osti.gov>
2011-03-08 06:41         ` Dave Page <dpage@pgadmin.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox