bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gdb pthread? problem on IA64 turbolinux


From: gjertsen
Subject: gdb pthread? problem on IA64 turbolinux
Date: Thu, 14 Dec 2000 12:30:28 -0500

I wanted to see if there are any ideas on the following 2 problems
we are seeing with gdb and a multithreaded c/c++ app. Things look OK
when using gdb on regular apps without threads.

Thanks,

--Rob

Environment
-------------------
IA64 2proc Big Sur with TurboLinux Beta2 release on 112300
kernel-2.4.0test10-55
GNU gdb 20001124     (also happens with default TL gdb 5.0)
gcc version 2.97 20001002    (upgraded to avoid g++ self-referential bug
                                                          that blows up
gdb)
glibc-2.2-001117           (default with TL release)

I probably need to build a copy of glibc with "-g" to provide more info.
We have already encountered one bug in pthreads when trying
to reduce the thread stack size, so this may also be a pthreads problem.

I think that these two problems are related, so I'm listing both of
them here; we can work around the second problem.

Problem #1
-----------------
When trying to look at a core file for some reason
gdb is trying to attach to a process. In the following
case I purposely set up a segv in our code before
spawning a lot of threads.

----------------------------------------------------------------------------
address@hidden mmfsd]# gdb ./mmfsd -c core
GNU gdb 20001124
This GDB was configured as "ia64-unknown-linux"...
Core was generated by `./mmfsd'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libpthread.so.0...done.
rw_common (): write: Success.

warning: unable to set global thread event mask
[New Thread 1024 (LWP 20648)]
rw_common (): write: Success.

warning: stop_or_attach_thread: generic error
Loaded symbols for /lib/libpthread.so.0
Reading symbols from
/home/gjertsen/clone_64bit/ts/lib/libha_gs_r.so...done.
Loaded symbols for /home/gjertsen/clone_64bit/ts/lib/libha_gs_r.so
Reading symbols from /lib/libm.so.6.1...done.
Loaded symbols for /lib/libm.so.6.1
Reading symbols from /lib/libc.so.6.1...done.
Loaded symbols for /lib/libc.so.6.1
Reading symbols from /lib/ld-linux-ia64.so.2...done.
Loaded symbols for /lib/ld-linux-ia64.so.2
#0  0x4000000000032350 in main (argc=1, argvPP=0x9ffffffffffffbc8)
    at mastdep.C:1024
1024      *brk = '\n';
----------------------------------------------------------------------------

I have also encountered the message:

"Error while reading shared library symbols:
attach_thread: No such process."

instead of the previous message:

"warning: stop_or_attach_thread: generic error"

Problem #2
-----------------
Our code runs fine as is, but when I try to run the code in gdb we
consistantly get a segv as follows:

----------------------------------------------------------------------------
address@hidden mmfsd]# gdb ./mmfsd -s ./mmfsd.map
GNU gdb 20001124
(gdb) run
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1026 (LWP 20084)]
0x20000000001fa170 in chunk_alloc () from /lib/libc.so.6.1
----------------------------------------------------------------------------

I can work around the problem by running our
program and then attaching to it later on, although
for some screwy reason gdb goes into the background
when attaching and I need to use "fg" to finally
get at the gdb console. Everything looks OK once I get
to the gdb console.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]