Re: Segfault Exiting psql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Wheeler <david(at)justatheory(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Segfault Exiting psql
Date: 2005-07-15 23:55:14
Message-ID: 21684.1121471714@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Wheeler <david(at)justatheory(dot)com> writes:
> 8.0.3 is working great for me on Mac OS X Tiger, but I do get a
> segfault every time I exit pssql:

> psql(7466) malloc: *** error for object 0x1806600: incorrect checksum
> for freed object - object was probably modified after being freed,
> break at szone_error to debug
> psql(7466) malloc: *** set a breakpoint in szone_error to debug
> zsh: segmentation fault /usr/local/pgsql/bin/psql -U postgres -d sharky

> Anyone seen this before? Compiled with gcc 4.0 (Apple's).

Hmm, I don't see that symptom, but I do see some strange stuff building
PG CVS tip on a fully-up-to-date (10.4.2) OS X machine. First off,
a lot of duplicate-symbol build warnings, eg while linking pg_dump:

usr/bin/ld: warning multiple definitions of symbol _pg_toupper
../../../src/port/libpgport.a(pgstrcasecmp.o) definition of _pg_toupper in section (__TEXT,__text)
../../../src/interfaces/libpq/libpq.dylib(pgstrcasecmp.o) definition of _pg_toupper
/usr/bin/ld: warning multiple definitions of symbol _pg_strncasecmp
../../../src/port/libpgport.a(pgstrcasecmp.o) definition of _pg_strncasecmp in section (__TEXT,__text)
../../../src/interfaces/libpq/libpq.dylib(pgstrcasecmp.o) definition of _pg_strncasecmp
/usr/bin/ld: warning multiple definitions of symbol _pg_strcasecmp
../../../src/port/libpgport.a(pgstrcasecmp.o) definition of _pg_strcasecmp in section (__TEXT,__text)
../../../src/interfaces/libpq/libpq.dylib(pgstrcasecmp.o) definition of _pg_strcasecmp
/usr/bin/ld: warning multiple definitions of symbol _pg_tolower
../../../src/port/libpgport.a(pgstrcasecmp.o) definition of _pg_tolower in section (__TEXT,__text)
../../../src/interfaces/libpq/libpq.dylib(pgstrcasecmp.o) definition of _pg_tolower
/usr/bin/ld: warning multiple definitions of symbol _pqStrerror
../../../src/port/libpgport.a(thread.o) definition of _pqStrerror in section (__TEXT,__text)
../../../src/interfaces/libpq/libpq.dylib(thread.o) definition of _pqStrerror
/usr/bin/ld: warning multiple definitions of symbol _pqGetpwuid
../../../src/port/libpgport.a(thread.o) definition of _pqGetpwuid in section (__TEXT,__text)
../../../src/interfaces/libpq/libpq.dylib(thread.o) definition of _pqGetpwuid

This noise wasn't there ever before; I do not know if it's just that
Apple's tools got pickier recently, or if we've broken something.

Second, at exit from an interactive psql session,

regression=# \q
could not save history to file "/Users/tgl/.psql_history": Invalid argument
$

The file is written, but it seems not to contain the expected contents.
This might be the fault of my not-so-up-to-date readline library.
Not sure if your symptom could also be blamed on readline --- have you
tried getting a stack trace from the crash?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Wheeler 2005-07-16 00:13:19 Re: Segfault Exiting psql
Previous Message Andrew Dunstan 2005-07-15 22:02:56 Re: multibyte regression tests