On 9/08/2011 2:31 PM, Venkat Balaji wrote:
Hi Craig,

Thank you very much for your reply !

Here is my reply -

1. We are using RHEL with the below version
Linux version 2.6.18-194.26.1.el5
(mockbu...@x86-004.build.bos.redhat.com
<mailto:mockbu...@x86-004.build.bos.redhat.com>) (gcc version 4.1.2
20080704 (Red Hat 4.1.2-48)) #1 SMP Fri Oct 29 14:21:16 EDT 2010

2. LD_LIBRARY_PATH is not set

OK. In that case, please show the output of:

ldd ./psql

run in exactly the same environment as you'd run ./psql and get a crash.



Program received signal SIGSEGV, Segmentation fault.
0x00002aaaaaac2ecc in resetPQExpBuffer () from
/opt/Postgres9.0.1/lib/libpq.so.5

OK, you haven't built with debugging. Try rebuilding with --enable-debug to configure, then re-running the gdb command. When you get a crash and the above message is printed out, you'll get a prompt like:

(gdb)

Type "bt" at that prompt and press enter. The resulting stack trace shows more information about what led up to the crash.

Debugging memory related crashes in C isn't simple. Just because it crashes in libpq doesn't mean the fault is in libpq. It might be, or it might be that some other library is corrupting memory that causes libpq to crash later, corrupting the stack, returning a bad pointer from a function call, library headers not matching linked library sizes so returned struct sizes/offsets are wrong, and lots lots more. It's not simple.

--
Craig Ringer

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

Reply via email to