[postgres@tux3 bao.d]$ gdb pgbch 14728 GNU gdb Red Hat Linux (5.1.90CVS-5) Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux"... Attaching to program: /home/postgres/bao.d/pgbch, process 14728 Reading symbols from /lib/i686/libpthread.so.0...done. [New Thread 1024 (LWP 14728)] [New Thread 2049 (LWP 14729)] [New Thread 2051 (LWP 14732)] Loaded symbols for /lib/i686/libpthread.so.0 Reading symbols from /usr/local/pgsql/lib/libecpg.so.4...done. Loaded symbols for /usr/local/pgsql/lib/libecpg.so.4 Reading symbols from /lib/i686/libc.so.6...done. Loaded symbols for /lib/i686/libc.so.6 Reading symbols from /usr/local/pgsql/lib/libpgtypes.so.1...done. Loaded symbols for /usr/local/pgsql/lib/libpgtypes.so.1 Reading symbols from /usr/local/pgsql/lib/libpq.so.3...done. Loaded symbols for /usr/local/pgsql/lib/libpq.so.3 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /lib/i686/libm.so.6...done. Loaded symbols for /lib/i686/libm.so.6 Reading symbols from /lib/libcrypt.so.1...done. Loaded symbols for /lib/libcrypt.so.1 Reading symbols from /lib/libresolv.so.2...done. Loaded symbols for /lib/libresolv.so.2 Reading symbols from /lib/libnsl.so.1...done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /lib/libnss_files.so.2...done. Loaded symbols for /lib/libnss_files.so.2 0x420292e5 in sigsuspend () from /lib/i686/libc.so.6 (gdb) thread 1 [Switching to thread 1 (Thread 1024 (LWP 14728))]#0 0x420292e5 in sigsuspend () from /lib/i686/libc.so.6 (gdb) where #0 0x420292e5 in sigsuspend () from /lib/i686/libc.so.6 #1 0x40031679 in __pthread_wait_for_restart_signal () from /lib/i686/libpthread.so.0 #2 0x4002e85a in pthread_join () from /lib/i686/libpthread.so.0 #3 0x0804a065 in main (argc=9, argv=0xbffff924) at pgbch.pgc:718 #4 0x42017499 in __libc_start_main () from /lib/i686/libc.so.6 (gdb) thread 2 [Switching to thread 2 (Thread 2049 (LWP 14729))]#0 0x420e0037 in poll () from /lib/i686/libc.so.6 (gdb) where #0 0x420e0037 in poll () from /lib/i686/libc.so.6 #1 0x4002ec70 in __pthread_manager () from /lib/i686/libpthread.so.0 (gdb) thread 3 [Switching to thread 3 (Thread 2051 (LWP 14732))]#0 0x420e0037 in poll () from /lib/i686/libc.so.6 (gdb) where #0 0x420e0037 in poll () from /lib/i686/libc.so.6 #1 0x40063b64 in pqSocketPoll () from /usr/local/pgsql/lib/libpq.so.3 #2 0x40063a85 in pqSocketCheck () from /usr/local/pgsql/lib/libpq.so.3 #3 0x400639b7 in pqWaitTimed () from /usr/local/pgsql/lib/libpq.so.3 #4 0x4006398d in pqWait () from /usr/local/pgsql/lib/libpq.so.3 #5 0x400618f2 in PQgetResult () from /usr/local/pgsql/lib/libpq.so.3 #6 0x40061c4b in PQexecFinish () from /usr/local/pgsql/lib/libpq.so.3 #7 0x4004447d in ECPGexecute () from /usr/local/pgsql/lib/libecpg.so.4 #8 0x400449d8 in ECPGdo () from /usr/local/pgsql/lib/libecpg.so.4 #9 0x080490d8 in doOne (arg=0x1) at pgbch.pgc:326 #10 0x4002efef in pthread_start_thread () from /lib/i686/libpthread.so.0