I have a program that doesn't use threads but links to some libs that have pthreads calls in them, allthough i'm not using the classes that do and program seg faults on exit. Also it appears that the pthread lib is being used by libc when it is being loaded, specifically the pthread_mutex_lock api. Following is the debug output from the debugger and you'll notice that all pthread access is before the Main method is hit and after my exit call from main. Any help with this problem would be greatly appreciated!
Sincerly Stephen Alstrin (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /Unix/salst/arch2/bld/linux-24-x86-g++-295-threaded-debug/bin/mofsign -in VA_1_1.mof -out /Unix/salst/arch2/bld/linux-24-x86-g++-295-threaded-debug/mof/VA_1_1.mof 32598:../pth_lib.c:0070: pth_init: enter 32598:../pth_lib.c:0225: pth_spawn: enter 32598:../pth_mctx.c:0247: pth_mctx_set: enter 32598:../pth_mctx.c:0391: pth_mctx_set_trampoline: return to caller 32598:../pth_mctx.c:0395: pth_mctx_set_trampoline: reentered from caller 32598:../pth_mctx.c:0433: pth_mctx_set_trampoline_jumpin: switch back to caller ==== THREAD CONTEXT SWITCH =========================================== 32598:../pth_mctx.c:0363: pth_mctx_set: leave 32598:../pth_lib.c:0322: pth_spawn: leave 32598:../pth_lib.c:0225: pth_spawn: enter 32598:../pth_lib.c:0322: pth_spawn: leave ==== THREAD CONTEXT SWITCH =========================================== 32598:../pth_mctx.c:0440: pth_mctx_set_trampoline_jumpin: reentered from scheduler 32598:../pth_sched.c:0165: pth_scheduler: bootstrapping 32598:../pth_sched.c:0189: pth_scheduler: new thread "main" moved to top of ready queue 32598:../pth_sched.c:0206: pth_scheduler: thread "main" selected (prio=0, qprio=0) 32598:../pth_sched.c:0231: pth_scheduler: switching to thread 0x805b490 ("main") ==== THREAD CONTEXT SWITCH =========================================== 32598:../pth_lib.c:0134: pth_init: leave 32598:../pth_sync.c:0050: pth_mutex_acquire: called from thread "main" 32598:../pth_sync.c:0064: pth_mutex_acquire: immediately locking mutex 32598:../pth_sync.c:0050: pth_mutex_acquire: called from thread "main" 32598:../pth_sync.c:0064: pth_mutex_acquire: immediately locking mutex 32598:../pth_sync.c:0050: pth_mutex_acquire: called from thread "main" 32598:../pth_sync.c:0064: pth_mutex_acquire: immediately locking mutex 32598:../pth_sync.c:0050: pth_mutex_acquire: called from thread "main" 32598:../pth_sync.c:0064: pth_mutex_acquire: immediately locking mutex 32598:../pth_sync.c:0050: pth_mutex_acquire: called from thread "main" 32598:../pth_sync.c:0064: pth_mutex_acquire: immediately locking mutex 32598:../pth_sync.c:0050: pth_mutex_acquire: called from thread "main" 32598:../pth_sync.c:0064: pth_mutex_acquire: immediately locking mutex 32598:../pth_sync.c:0050: pth_mutex_acquire: called from thread "main" 32598:../pth_sync.c:0064: pth_mutex_acquire: immediately locking mutex 32598:../pth_sync.c:0050: pth_mutex_acquire: called from thread "main" 32598:../pth_sync.c:0064: pth_mutex_acquire: immediately locking mutex 32598:../pth_sync.c:0050: pth_mutex_acquire: called from thread "main" 32598:../pth_sync.c:0064: pth_mutex_acquire: immediately locking mutex 32598:../pth_sync.c:0050: pth_mutex_acquire: called from thread "main" 32598:../pth_sync.c:0064: pth_mutex_acquire: immediately locking mutex Entering [/Unix/salst/arch2/bld/linux-24-x86-g++-295-threaded-debug/bin/mofsign]'s main Exiting [/Unix/salst/arch2/bld/linux-24-x86-g++-295-threaded-debug/bin/mofsign]'s main 32598:../pth_sync.c:0050: pth_mutex_acquire: called from thread "main" 32598:../pth_sync.c:0064: pth_mutex_acquire: immediately locking mutex 32598:../pth_sync.c:0050: pth_mutex_acquire: called from thread "main" 32598:../pth_sync.c:0064: pth_mutex_acquire: immediately locking mutex 32598:../pth_sync.c:0050: pth_mutex_acquire: called from thread "main" 32598:../pth_sync.c:0064: pth_mutex_acquire: immediately locking mutex 32598:../pth_lib.c:0143: pth_kill: enter 32598:../pth_lib.c:0154: pth_kill: leave Program received signal SIGSEGV, Segmentation fault. 0x40077498 in fmtstr ( buffer=0x40076690 "Ãë\r", '\220' <repeats 13 times>, "S\203ì\bè", currlen=0x4005e31a, maxlen=1076146944, value=0x4005e33a "h\030", flags=1074127690, min=1074127706, max=1074127722) at ../pth_string.c:369 (gdb) bt #0 0x40077498 in fmtstr ( buffer=0x40076690 "Ãë\r", '\220' <repeats 13 times>, "S\203ì\bè", currlen=0x4005e31a, maxlen=1076146944, value=0x4005e33a "h\030", flags=1074127690, min=1074127706, max=1074127722) at ../pth_string.c:369 #1 0x4007bd00 in str.0 () from /Unix/salst/arch2/thirdparty_software/pth-2-0-0-linux-24-x86/lib/libpthread. so.20 (gdb) P.S. The pth_init call you see above is being called from pthread_mutex_lock, which i'm assuming is being called from the C/C++ shared lib. Also I linked the program static and everything works fine and the pth lib is never being called. ______________________________________________________________________ GNU Portable Threads (Pth) http://www.gnu.org/software/pth/ Development Site http://www.ossp.org/pkg/lib/pth/ Distribution Files ftp://ftp.gnu.org/gnu/pth/ Distribution Snapshots ftp://ftp.ossp.org/pkg/lib/pth/ User Support Mailing List [EMAIL PROTECTED] Automated List Manager (Majordomo) [EMAIL PROTECTED]