Problem in Message Queue Reading
I have three queues A B C and two process P1, P2. Each process has two threads P1T1,P1T2 for process P1 and P2T1,P2T2 for process P2.
Now P1T1 calls blocking msgrcv for P1TI on queue A.
P2T1 calls blocking msgrcv for P1TI on queue B.
and the other thread of both process calls blocking msgrcv on queue C.
P1T1 and P2T1 works. And are responsive to messages on their respective queues.
But there is a problem with T2 of both process. Most of the time they are unresponsive to the messages on queue C. Behavior is random some times they pick the message and some times the message remains there on queue.
But when the calls are non blocking on queue C then it works fine.
I guess there is some sort of deadlock. But i can;t see any lock function in gbb backtrace. Though msgrcv is declared thread safe.
Please help !!!!
Here is the stack trace
#0 0x002b37a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x00398031 in msgrcv () from /lib/tls/libc.so.6
#2 0x080b6171 in xxx::xxxx() at locale_facets.tcc:2443
#3 0x080b5de6 in xxx::xxxx() at locale_facets.tcc:2443
#4 0x080be8bf in xxxx::xxxx() at locale_facets.tcc:2443
#5 0x0817e878 in xxxx::xxxx ()
both process remains stuck in _dl_sysinfo_int80 ()
|