what are the compile options for multithread program on bsd with pthread library.
I am using pthread lib for my program. It has 10 threads. It sometimes getting hanged and stack trace for thread seems to be not right. I suspect some issue with the way I am building trace looks like this. please let me know what I should I make sure from build perspective while running multithread program on bsd.
PLEASE NOTE that Same program runs fine on linux
stack trace
I am using pthread lib for my program. It has 10 threads. It sometimes getting hanged and stack trace for thread seems to be not right. I suspect some issue with the way I am building trace looks like this. please let me know what I should I make sure from build perspective while running multithread program on bsd.
PLEASE NOTE that Same program runs fine on linux
stack trace
Code:
(gdb) bt
#0 0x2808f035 in __error () from /lib/libthr.so.3
#1 0x2808ead0 in __error () from /lib/libthr.so.3
#2 0x28226220 in ?? ()
#3 0x0000000d in ?? ()
#4 0x00000000 in ?? ()
#5 0x00000000 in ?? ()
#6 0x00000000 in ?? ()
#7 0x00000005 in ?? ()
#8 0xbf1f6f18 in ?? ()
#9 0x280895a1 in pthread_rwlock_init () from /lib/libthr.so.3
Previous frame identical to this frame (corrupt stack?)
(gdb) info thread
10 Thread 0x28201100 (LWP 100511) 0x2808f037 in __error () from /lib/libthr.so.3
9 Thread 0x28201200 (LWP 100204) 0x2808f037 in __error () from /lib/libthr.so.3
8 Thread 0x28201300 (LWP 100292) 0x2808f037 in __error () from /lib/libthr.so.3
7 Thread 0x28201400 (LWP 100334) 0x2808f037 in __error () from /lib/libthr.so.3
6 Thread 0x28201500 (LWP 100468) 0x2808f037 in __error () from /lib/libthr.so.3
5 Thread 0x28201600 (LWP 100653) 0x2808f037 in __error () from /lib/libthr.so.3
4 Thread 0x28201700 (LWP 100858) 0x2808f037 in __error () from /lib/libthr.so.3
3 Thread 0x28201800 (LWP 100903) 0x2808f037 in __error () from /lib/libthr.so.3
2 Thread 0x28201900 (LWP 101086) 0x2808f037 in __error () from /lib/libthr.so.3
* 1 Thread 0x28201a00 (LWP 101123) 0x2808f035 in __error () from /lib/libthr.so.3
(gdb) thread 3
[Switching to thread 3 (Thread 0x28201800 (LWP 100903))]#0 0x2808f037 in __error ()
from /lib/libthr.so.3
(gdb) bt
#0 0x2808f037 in __error () from /lib/libthr.so.3
#1 0x2808ead0 in __error () from /lib/libthr.so.3
#2 0x28304070 in ?? ()
#3 0x0000000d in ?? ()
#4 0x00000000 in ?? ()
#5 0x00000000 in ?? ()
#6 0x00000000 in ?? ()
#7 0x00000005 in ?? ()
#8 0xbf3f8f18 in ?? ()
#9 0x280895a1 in pthread_rwlock_init () from /lib/libthr.so.3
Previous frame identical to this frame (corrupt stack?)
(gdb)