BUG #5899: Memory corruption when running psql

From: "Ross Barrett" <ross_barrett(at)rapid7(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5899: Memory corruption when running psql
Date: 2011-02-24 16:36:34
Message-ID: 201102241636.p1OGaY0a042154@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 5899
Logged by: Ross Barrett
Email address: ross_barrett(at)rapid7(dot)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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Nathan M. Davalos 2011-02-24 19:01:21 Function trunc() behaves in unexpected manner with different data types
Previous Message Kevin Grittner 2011-02-24 14:34:25 Re: