Jump to content
  • Advertisement
Sign in to follow this  
g_tarun

Mutex lock __status

This topic is 4064 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi All, Would greatly appriciate in any help in the following problem. Getting a deadlock problem in a multithread application using a Queue. I suspect the Mutex lock being used for this Queue goes into a state where __m_lock structure of Mutex has __status = 3. Following is the gdb dump of the QueueMgr. (gdb) print *this $2 = {<StatCollectorInf> = {_vptr.StatCollectorInf = 0xb7007098}, iQueueCount = 2048, ptHeadPtr = 0x8b79f84, ptTailPtr = 0x8b70038, ptFreeList = 0x0, iFreeNodes = 0, tEventQueueMutex = {__m_reserved = 0, __m_count = 0, __m_owner = 0x0, __m_kind = 0, __m_lock = {__status = 3, __spinlock = 0}}, waitingFeederCond = {__c_lock = {__status = 0, _spinlock = 0}, __c_waiting = 0x1, __padding = '\0' <repeats 20 times>, "d| \t\000\000\000", __align = 0}, waitingConsumerCond = {__c_lock = {__status = 0, _spinlock = 0}, __c_waiting = 0x0, __padding = '\0' <repeats 27 times>, __align = 0}, bQueueStopped = false, flowControlEnabled = true, lowWaterMark = 1024, highWaterMark = 2048, waitingFeeders = 1, waitingConsumers = 0, sleepingFeeders = 1, sleepingConsumers = 1, feederData = {{condition = {__c_lock = {__status = 0, __spinlock = 0}, __c_waiting = 0x1, __padding = '\0' <repeats 20 times>, "d| \t\000\000\000", __align = 0}, count = 1}}, consumerData = {{condition = {__c_lock = {__status = 0, __spinlock = 0}, __c_waiting = 0x2527b4, __padding = "\000\000\000\000´'%\000\000\000\000\000³'%\000\000\000\000\000d| \t\000\000\000", __align = 0}, count = 1}}, minFeeder = 0, minConsumer = 0, iDequeueWaitTimeout = 0, _cleanupFunc = 0xb725cd7c <CCM_CCM_PktDispatcher::cleanupUnprocessedMsg(_queue_data)>, _name = {static npos = 4294967295, _M_dataplus = {<allocator<char>> = {<No data fields>}, _M_p = 0x8e01acc "PeerCCM[6004]-Dispatcher"}, static _S_empty_rep_storage = {0, 0, 51543, 0}}} This shows the QueueManager’s mutex state and Producer and consumer thread’s pthread condition (feederData & consumerData conditions) states. Mutex state seems to be wrong because __status ideally should have values 0, 1 or <address of waiting thread> as per the pthread lib. I suspect a glibc bug for this mutex state. I am using glibc 2.3.2-95.3 RHEL3. Thanks!! Tarun

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!