Re: [GENERAL] PSQL segmentation fault after setting host

2010-04-23 Thread Morgan Taschuk
Hooray, uninstalling psqlODBC worked! Thank you so much for all of your 
help!


Cheers,
Morgan Taschuk

Craig Ringer wrote:

On 23/04/2010 2:06 AM, Tom Lane wrote:


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.


Though it turns out to be unnecessary for this person's question, for 
future reference:


http://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Linux/BSD#Installing_External_symbols

--
Craig Ringer


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] PSQL segmentation fault after setting host

2010-04-22 Thread Morgan Taschuk

Hi,

I hope someone can help me. When running psql from the command line with
the PGHOST environment variable or the -h command line host set, it
throws a segmentation fault.

$ psql -U morgan -d cid -h localhost
Segmentation fault
$ export PGHOST=rhyme.ncl.ac.uk
$ psql -U morgan -d cid
Segmentation fault


I can run psql from another machine with -h accessing the same database.
I can also run psql without a host.

$ export PGHOST=
$ psql -U morgan -d cid
psql (8.4.3)
Type help for help.

cid=# \q


I'm running Ubuntu 9.10 with Postgresql 8.4 I have uninstalled, purged,
and then reinstalled postgresql-8.4, postgresql-client-common
postgresql-common from Ubuntu repositories. I'm not sure what else to
do. Is there something silly that I'm missing?

Please, if there are any logs or anywhere else I can look for more
information on what is actually happening, I would be very grateful.

Thank you.

Sincerely,
Morgan Taschuk

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PSQL segmentation fault after setting host

2010-04-22 Thread Tom Lane
Morgan Taschuk m.tasc...@newcastle.ac.uk writes:
 I hope someone can help me. When running psql from the command line with
 the PGHOST environment variable or the -h command line host set, it
 throws a segmentation fault.

 $ psql -U morgan -d cid -h localhost
 Segmentation fault

Huh.  Can you get a stack trace from that?  Try like this:

$ gdb /path/to/psql
...
gdb run -U morgan -d cid -h localhost
... should stop with a report of a segfault ...
gdb bt
... we need to see what's printed here ...
gdb quit

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.

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

regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] PSQL segmentation fault after setting host

2010-04-22 Thread Morgan Taschuk

Hi,

I hope someone can help me. When running psql from the command line with 
the PGHOST environment variable or the -h command line host set, it 
throws a segmentation fault.


$ psql -U morgan -d cid -h localhost
Segmentation fault
$ export PGHOST=rhyme.ncl.ac.uk
$ psql -U morgan -d cid
Segmentation fault


I can run psql from another machine with -h accessing the same database. 
I can also run psql without a host.


$ export PGHOST=
$ psql -U morgan -d cid
psql (8.4.3)
Type help for help.

cid=# \q


I'm running Ubuntu 9.10 with Postgresql 8.4 I have uninstalled, purged, 
and then reinstalled postgresql-8.4, postgresql-client-common
postgresql-common from Ubuntu repositories. I'm not sure what else to 
do. Is there something silly that I'm missing?


Please, if there are any logs or anywhere else I can look for more 
information on what is actually happening, I would be very grateful.


Thank you.

Sincerely,
Morgan Taschuk


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PSQL segmentation fault after setting host

2010-04-22 Thread Morgan Taschuk

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 (0x0011)
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

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PSQL segmentation fault after setting host

2010-04-22 Thread Richard Huxton

On 22/04/10 20:06, Morgan Taschuk wrote:

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


See if disabling ssl fixes it (see your pg_hba.conf and look for 
hostssl lines).



/opt/PostgreSQL/psqlODBC/lib/libpq.so.5


I'd guess the root cause is here though. You seem to be picking up some 
libraries from psqlODBC rather than your main package. I'm betting it's 
got some incompatible changes. Uninstall psqlodbc for a minute and see 
if that solves your problem.



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)
libgssapi_krb5.so.2 = /opt/PostgreSQL/psqlODBC/lib/libgssapi_krb5.so.2
libk5crypto.so.3 = /opt/PostgreSQL/psqlODBC/lib/libk5crypto.so.3



--
  Richard Huxton
  Archonet Ltd

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PSQL segmentation fault after setting host

2010-04-22 Thread Tom Lane
Richard Huxton d...@archonet.com writes:
 I'd guess the root cause is here though. You seem to be picking up some 
 libraries from psqlODBC rather than your main package. I'm betting it's 
 got some incompatible changes. Uninstall psqlodbc for a minute and see 
 if that solves your problem.

Yeah, the fact that it's linking to two different copies of the same
libraries is pretty scary.  I'm not sure what the /opt/PostgreSQL
stuff is but it's surely not the standard install for your platform.

regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PSQL segmentation fault after setting host

2010-04-22 Thread Craig Ringer

On 23/04/2010 2:06 AM, Tom Lane wrote:


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.


Though it turns out to be unnecessary for this person's question, for 
future reference:


http://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Linux/BSD#Installing_External_symbols

--
Craig Ringer

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] psql Segmentation fault

2007-11-14 Thread Robert Landrum
Since we converted to PG8, we've been experiencing segfaults when the 
psql client exits.  It doesn't have any real effect on things...  or it 
hasn't until now.


RHEL4 i686 - PostgresQL 8.2.4 (non-redhat)



-bash-3.00$ psql -n
Welcome to psql 8.2.4, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
   \h for help with SQL commands
   \? for help with psql commands
   \g or terminate with semicolon to execute query
   \q to quit

postgres=# \q
Segmentation fault


That's what happens every time.  No core file is produced.  I've done 
some searches and discovered that this might be related to readline. 
But that doesn't seem right since it crashes when I run psql -n (no 
readline support).  I've tried removing .psql_history files and even 
changing perms to prevent writes.  Nothing seems to work.


Now it's affecting pg_dumpall -g, which we use to backup all user 
accounts and roles.  It seems to seqfault before it finishes writing 
STDOUT, which means some users/roles aren't being dumped.


Anyone else run into this problem?  What is the solution?

Thanks,

Rob

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] psql Segmentation fault

2007-11-14 Thread Tom Lane
Robert Landrum [EMAIL PROTECTED] writes:
 Since we converted to PG8, we've been experiencing segfaults when the 
 psql client exits.

Hmm.  We have heard that reported on OS X because of a bug in Apple's
version of libedit, but not on any flavor of Linux.  Your tests seem
to eliminate libreadline as the cause anyway.  Might be a corrupt
copy of libpq --- have you tried reinstalling that?

 That's what happens every time.  No core file is produced.

That's normal on Linuxen, because ulimit -c 0 is usually the default
setting.  Please try ulimit -c unlimited, and then if you get a core,
send a backtrace.  The last few lines of an strace watching the psql
run might be useful as well.

regards, tom lane

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org/


Re: [GENERAL] psql Segmentation fault

2007-11-14 Thread Robert Landrum

Tom Lane wrote:

Robert Landrum [EMAIL PROTECTED] writes:
Since we converted to PG8, we've been experiencing segfaults when the 
psql client exits.


Hmm.  We have heard that reported on OS X because of a bug in Apple's
version of libedit, but not on any flavor of Linux.  Your tests seem
to eliminate libreadline as the cause anyway.  Might be a corrupt
copy of libpq --- have you tried reinstalling that?


Actually, our build host contained some old readline libs, which ended 
up being statically linked into one of the libs.


The fix was to remove all the dependencies from our build host, 
reinstall those dependencies, and then build postgres anew.


Thanks for your suggestions...

Rob

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster