NetBSD-Bugs archive

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

toolchain/41936: gdb does not work for threaded programs on sparc64



>Number:         41936
>Category:       toolchain
>Synopsis:       gdb does not work for threaded programs on sparc64
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 25 09:45:00 +0000 2009
>Originator:     Martin Husemann
>Release:        NetBSD 5.99.15
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD nelly.aprisoft.de 5.99.15 NetBSD 5.99.15 (NELLY.MP) #68: Tue Aug 
25 10:55:05 CEST 2009 
martin%emmas.aprisoft.de@localhost:/nelly/usr/src/sys/arch/sparc64/compile/NELLY.MP
 sparc64
Architecture: sparc64
Machine: sparc64
>Description:

Trying to debug a threaded program on sparc64 I get tons of:

Program received signal SIGTRAP, Trace/breakpoint trap.
0x0000000040508f6c in pthread_cond_timedwait () from /usr/lib/libpthread.so.1

With backtrace like:

#0  0x0000000040508f6c in pthread_cond_timedwait ()
   from /usr/lib/libpthread.so.1
#1  0x0000000042627dbc in PRP_NakedNotify ()
   from /usr/pkg/lib/firefox/libnspr4.so
#2  0x0000000042628abc in PR_WaitCondVar ()
   from /usr/pkg/lib/firefox/libnspr4.so
#3  0x0000000041878c78 in NS_GetComponentManager_P ()
   from /usr/pkg/lib/firefox/libxul.so
#4  0x00000000418738a8 in NS_GetComponentManager_P ()
   from /usr/pkg/lib/firefox/libxul.so
#5  0x0000000041830264 in GetSecurityContext ()
   from /usr/pkg/lib/firefox/libxul.so
#6  0x0000000041873fd0 in NS_GetComponentManager_P ()
   from /usr/pkg/lib/firefox/libxul.so
#7  0x000000004262ee48 in PR_JoinThread ()
   from /usr/pkg/lib/firefox/libnspr4.so
#8  0x000000004050c4c4 in pthread_create () from /usr/lib/libpthread.so.1

The strange thing is that the kernel does only ever send SIGTRAP for %pc
somewhere in _rtld_debug_state (which is just "retl; nop"), but gdb seems
to ignore those traps.

Any hints appreciated - I have no clue if this is a sparc64 kernel, libpthread
or gdb issue, but it realy makes debugging userland stuff impossible.

>How-To-Repeat:
On sparc64-current install firefox from pkgsrc and do:

  firefox -g
  run

watch it trap.

>Fix:
no idea, any hints appreciated



Home | Main Index | Thread Index | Old Index