Re: PSQL segmentation fault after setting host

From: Morgan Taschuk <m(dot)taschuk(at)newcastle(dot)ac(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: PSQL segmentation fault after setting host
Date: 2010-04-22 19:06:37
Message-ID: 4BD09E3D.3090800@newcastle.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi, stack traces and other paraphernalia below:

>> $ psql -U morgan -d cid -h localhost
>> Segmentation fault
>
> Huh. Can you get a stack trace from that?

$ gdb psql
...
Reading symbols from /usr/lib/postgresql/8.4/bin/psql...(no debugging
symbols found)...done.
(gdb) run -U morgan -d cid -h localhost
Starting program: /usr/lib/postgresql/8.4/bin/psql -U morgan -d cid -h
localhost
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0xb7bbb4eb in X509_VERIFY_PARAM_inherit () from
/lib/i686/cmov/libcrypto.so.0.9.8
(gdb) bt
#0 0xb7bbb4eb in X509_VERIFY_PARAM_inherit () from
/lib/i686/cmov/libcrypto.so.0.9.8
#1 0xb7f9b61a in ssl_verify_cert_chain () from
/lib/i686/cmov/libssl.so.0.9.8
#2 0xb7f82582 in ssl3_get_server_certificate () from
/lib/i686/cmov/libssl.so.0.9.8
#3 0xb7f83bfd in ssl3_connect () from /lib/i686/cmov/libssl.so.0.9.8
#4 0xb7f9739a in SSL_connect () from /lib/i686/cmov/libssl.so.0.9.8
#5 0xb7fc392d in pqsecure_open_client () from
/opt/PostgreSQL/psqlODBC/lib/libpq.so.5
#6 0xb7fb58a9 in PQconnectPoll () from
/opt/PostgreSQL/psqlODBC/lib/libpq.so.5
#7 0xb7fb619e in connectDBComplete () from
/opt/PostgreSQL/psqlODBC/lib/libpq.so.5
#8 0xb7fb7b2d in PQsetdbLogin () from
/opt/PostgreSQL/psqlODBC/lib/libpq.so.5
#9 0x00125808 in main () from /usr/lib/postgresql/8.4/bin/psql

> If the bt output is all numbers it won't be helpful. On Red Hat
> systems the thing to do is install the postgresql-debuginfo RPM
> that matches your postgresql RPMs, but I'm not sure exactly how
> Ubuntu packages that information.

It's not all numbers and I can't seem to find an equivalent to that
package, so is it okay without?

> Also it would be good to show the output of ldd applied to psql.

$ ldd psql
linux-gate.so.1 => (0x0084c000)
libpq.so.5 => /opt/PostgreSQL/psqlODBC/lib/libpq.so.5 (0x00666000)
libssl.so.0.9.8 => /lib/i686/cmov/libssl.so.0.9.8 (0x00256000)
libreadline.so.5 => /lib/libreadline.so.5 (0x00cdd000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x00110000)
libssl.so.4 => /opt/PostgreSQL/psqlODBC/lib/libssl.so.4 (0x009d9000)
libcrypto.so.4 => /opt/PostgreSQL/psqlODBC/lib/libcrypto.so.4 (0x00531000)
libkrb5.so.3 => /opt/PostgreSQL/psqlODBC/lib/libkrb5.so.3 (0x00a2c000)
libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0x00bec000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x0072d000)
libcrypto.so.0.9.8 => /lib/i686/cmov/libcrypto.so.0.9.8 (0x0029c000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x003e2000)
libz.so.1 => /lib/libz.so.1 (0x003e6000)
libncurses.so.5 => /lib/libncurses.so.5 (0x003fc000)
/lib/ld-linux.so.2 (0x00924000)
libgssapi_krb5.so.2 => /opt/PostgreSQL/psqlODBC/lib/libgssapi_krb5.so.2
(0x00eee000)
libcom_err.so.2 => /lib/libcom_err.so.2 (0x00434000)
libk5crypto.so.3 => /opt/PostgreSQL/psqlODBC/lib/libk5crypto.so.3
(0x00806000)
libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2 (0x00438000)

> regards, tom lane

Is that helpful at all?

Thanks again,

Morgan Taschuk

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2010-04-22 19:47:44 Re: how to debug the codes in the PostgresMain() from the begining of this function to the "for (;;)" loop that handles the connection?
Previous Message Brian Peschel 2010-04-22 18:33:11 Re: [SPAM] Re: Best way to replicate to large number of nodes