LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-08-2009, 08:34 AM   #1
qnomans2k
LQ Newbie
 
Registered: Feb 2009
Posts: 2

Rep: Reputation: 0
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 ()
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible for me to write in front of queue in case of message queue? hemanthv414 Linux - Newbie 1 11-17-2008 04:40 PM
Message Queue sarcastodon Programming 0 12-26-2006 10:09 AM
signal interrupts reading from queue aral Programming 2 10-10-2006 08:24 PM
problem with sendmail over ppp - message queue stuck julot Slackware 1 07-17-2006 04:44 AM
Qmail Message Queue dadepfan Linux - Software 0 07-22-2004 03:54 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration