From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17701 invoked by alias); 25 Apr 2009 13:57:08 -0000 Received: (qmail 17671 invoked by uid 22791); 25 Apr 2009 13:57:04 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,WEIRD_PORT X-Spam-Check-By: sourceware.org Received: from web38107.mail.mud.yahoo.com (HELO web38107.mail.mud.yahoo.com) (209.191.124.134) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Sat, 25 Apr 2009 13:56:56 +0000 Received: (qmail 84004 invoked by uid 60001); 25 Apr 2009 13:56:54 -0000 Message-ID: <786195.79367.qm@web38107.mail.mud.yahoo.com> Received: from [86.134.33.210] by web38107.mail.mud.yahoo.com via HTTP; Sat, 25 Apr 2009 06:56:54 PDT Date: Sat, 25 Apr 2009 14:43:00 -0000 From: x x Subject: gdb stack trace unreadable for a pthreads application To: gdb@sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-04/txt/msg00193.txt.bz2 Hello, I have this server app that creates a pool of 24 threads. I had a core dump= the other day and tried to investigate the cause. I can view the stack tra= ce of the thread that caused the segmentation fault, but I cannot view the = stack trace of the other threads. The stack trace of the other threads is i= mportant for me to determine the cause of the crash. Except for thread 2 th= ese other threads are blocked inside a pthread_mutex_lock call. But the sta= ck trace doesn't make any sense. Please view the gdb output in the bottom. Should I upgrade my gdb version? Can you help? Thanks Ian $ uname -a Linux ds5632 2.6.22-8-server #1 SMP Thu Jul 12 16:28:57 GMT 2007 i686 GNU/L= inux $lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 6.06 LTS Release: 6.06 Codename: dapper $gdb mfsrv core.31589 GNU gdb 6.4-debian Copyright 2005 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 condition= s. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i486-linux-gnu"...Using host libthread_db libra= ry "/lib/tls/i686/cmov/libthread_db.so.1". Failed to read a valid object file image from memory. Core was generated by `./mfsrv mf MundialFoot 1'. Program terminated with signal 11, Segmentation fault. warning: Can't read pathname for load map: Input/output error. Reading symbols from /usr/lib/libstdc++.so.6...done. Loaded symbols for /usr/lib/libstdc++.so.6 Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...done. Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0 Reading symbols from /usr/lib/libmysqlclient_r.so.15...done. Loaded symbols for /usr/lib/libmysqlclient_r.so.15 Reading symbols from /usr/lib/libz.so.1...done. Loaded symbols for /usr/lib/libz.so.1 Reading symbols from /lib/tls/i686/cmov/libcrypt.so.1...done. Loaded symbols for /lib/tls/i686/cmov/libcrypt.so.1 Reading symbols from /lib/tls/i686/cmov/libnsl.so.1...done. Loaded symbols for /lib/tls/i686/cmov/libnsl.so.1 Reading symbols from /lib/tls/i686/cmov/libm.so.6...done. Loaded symbols for /lib/tls/i686/cmov/libm.so.6 Reading symbols from /lib/libgcc_s.so.1...done. Loaded symbols for /lib/libgcc_s.so.1 Reading symbols from /lib/tls/i686/cmov/libc.so.6...done. Loaded symbols for /lib/tls/i686/cmov/libc.so.6 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 #0 0xb7b9c443 in memmove () from /lib/tls/i686/cmov/libc.so.6 (gdb) info threads 24 process 31589 0xffffe410 in ?? () 23 process 31591 0xffffe410 in ?? () 22 process 31592 0xffffe410 in ?? () 21 process 31593 0xffffe410 in ?? () 20 process 31594 0xffffe410 in ?? () 19 process 31595 0xffffe410 in ?? () 18 process 31600 0xffffe410 in ?? () 17 process 31601 0xffffe410 in ?? () 16 process 31602 0xffffe410 in ?? () 15 process 31603 0xffffe410 in ?? () 14 process 31608 0xffffe410 in ?? () 13 process 31609 0xffffe410 in ?? () 12 process 31610 0xffffe410 in ?? () 11 process 31611 0xffffe410 in ?? () 10 process 31616 0xffffe410 in ?? () 9 process 31617 0xffffe410 in ?? () 8 process 31618 0xffffe410 in ?? () 7 process 31619 0xffffe410 in ?? () 6 process 31624 0xffffe410 in ?? () 5 process 31625 0xffffe410 in ?? () 4 process 31626 0xffffe410 in ?? () 3 process 31632 0xffffe410 in ?? () 2 process 31633 0xffffe410 in ?? () * 1 process 31627 0xb7b9c443 in memmove () from /lib/tls/i686/cmov/libc.so= .6 (gdb) bt 12 #0 0xb7b9c443 in memmove () from /lib/tls/i686/cmov/libc.so.6 #1 0x08066b62 in IE_Sock::Recv (this=3D0x8098268, pch=3D0x8098264 "", cbTo= Recv=3D4, iSecs=3D-1) at IE_Sock.cc:284 #2 0x08066d51 in IE_Sock::RecvInt (this=3D0x8098268, pi=3D0x8098264, iSecs= =3D-1) at IE_Sock.cc:257 #3 0x08070b3f in Thread::InitConnection (this=3D0x8097dfc) at commands.cc:= 45 #4 0x08062d73 in Thread::Start (this=3D0x8097dfc) at SMthreads.cc:195 #5 0x08062ec7 in Thread::Thread_Start (pv=3D0x8097dfc) at SMthreads.cc:37 #6 0xb7e3f341 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #7 0xb7bfa4ee in clone () from /lib/tls/i686/cmov/libc.so.6 (gdb) thread 2 [Switching to thread 2 (process 31633)]#0 0xffffe410 in ?? () (gdb) bt 12 #0 0xffffe410 in ?? () #1 0xacaf8258 in ?? () #2 0xb7e493b4 in ?? () from /lib/tls/i686/cmov/libpthread.so.0 #3 0xacaf8220 in ?? () #4 0xb7e44778 in accept () from /lib/tls/i686/cmov/libpthread.so.0 #5 0x080661fd in IE_SockSrv::Accept (this=3D0x8099530, psock=3D0x8099100, = sz=3D0x0, sl=3D0) at IE_Sock.cc:74 #6 0x0808039c in admin_thread::thread_start (pv=3D0x0) at admin_thread.cc:= 44 #7 0xb7e3f341 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #8 0xb7bfa4ee in clone () from /lib/tls/i686/cmov/libc.so.6 (gdb) thread 3 [Switching to thread 3 (process 31632)]#0 0xffffe410 in ?? () (gdb) bt 12 #0 0xffffe410 in ?? () #1 0xad2f940c in ?? () #2 0x00000021 in ?? () #3 0x00000000 in ?? () and all remaining the threads (4 to 24) have the same screwed up stack Veja quais s=E3o os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com