当前位置: 技术问答>linux和unix
读写锁unlock时产生死锁
来源: 互联网 发布时间:2017-04-30
本文导语: 最近使用读写锁的时候遇到了一个奇怪的死锁现象:调用pthread_rwlock_unlock竟然阻塞了。 堆栈: (gdb) t 10 [Switching to thread 10 (Thread 0x7ffd621fc700 (LWP 17864))]#0 0x000000363b80e054 in __lll_lock_wait () from /lib64/libpthread.so.0...
最近使用读写锁的时候遇到了一个奇怪的死锁现象:调用pthread_rwlock_unlock竟然阻塞了。
堆栈:
(gdb) t 10
[Switching to thread 10 (Thread 0x7ffd621fc700 (LWP 17864))]#0 0x000000363b80e054 in __lll_lock_wait () from /lib64/libpthread.so.0
(gdb) bt
#0 0x000000363b80e054 in __lll_lock_wait () from /lib64/libpthread.so.0
#1 0x000000363b80ae90 in pthread_rwlock_unlock () from /lib64/libpthread.so.0
#2 0x000000000040e2b9 in OutboundServer::OutbdExcute (this=0x80, outbd_uuid=..., app_name=..., app_arg=..., app_exe_uuid=..., event_lock=253) at ../os/mutex.h:64
#3 0x0000000000413234 in IxApi::execute_lua (this=0x17b7350, lua_name=..., lua_arg=..., cuid=..., event_lock=false) at ixapi.cpp:1089
#4 0x00007ffd8f55b42c in TelMgr::play_agent_num (this=0x17bb920, cuid=..., language=..., agent_num=...) at TelMgr.cpp:2790
#5 0x00007ffd8f574bb8 in QueueMgr::OnEvent_Answer (this=0x17ce780, msg=0x17ce788) at ../queue_and_acd/QueueMgr.cpp:876
#6 0x00007ffd8f57528c in QueueMgr::processMsg (this=0x17ce780, event=0x80) at ../queue_and_acd/QueueMgr.cpp:473
#7 0x00007ffd8f5755a7 in QueueMgrThread::run (this=0x17d1f40) at ../queue_and_acd/QueueMgr.cpp:421
#8 0x000000000042a717 in util::Thread::threadFun (this=0x17d1f40) at thread.cpp:92
#9 0x000000000042a4aa in util::Thread::begin (pArg=0x7ffd8802ae78) at thread.cpp:35
#10 0x000000363b807851 in start_thread () from /lib64/libpthread.so.0
#11 0x000000363b0e890d in clone () from /lib64/libc.so.6
代码:
std::string OutboundServer::OutbdExcute(const string outbd_uuid,const std :: string app_name,const std :: string app_arg,const std :: string app_exe_uuid,bool event_lock)
{
Oubound_handle_t *handle = ListenThread->otbdConnections.find(outbd_uuid);
if(!handle)
{
TelError
堆栈:
(gdb) t 10
[Switching to thread 10 (Thread 0x7ffd621fc700 (LWP 17864))]#0 0x000000363b80e054 in __lll_lock_wait () from /lib64/libpthread.so.0
(gdb) bt
#0 0x000000363b80e054 in __lll_lock_wait () from /lib64/libpthread.so.0
#1 0x000000363b80ae90 in pthread_rwlock_unlock () from /lib64/libpthread.so.0
#2 0x000000000040e2b9 in OutboundServer::OutbdExcute (this=0x80, outbd_uuid=..., app_name=..., app_arg=..., app_exe_uuid=..., event_lock=253) at ../os/mutex.h:64
#3 0x0000000000413234 in IxApi::execute_lua (this=0x17b7350, lua_name=..., lua_arg=..., cuid=..., event_lock=false) at ixapi.cpp:1089
#4 0x00007ffd8f55b42c in TelMgr::play_agent_num (this=0x17bb920, cuid=..., language=..., agent_num=...) at TelMgr.cpp:2790
#5 0x00007ffd8f574bb8 in QueueMgr::OnEvent_Answer (this=0x17ce780, msg=0x17ce788) at ../queue_and_acd/QueueMgr.cpp:876
#6 0x00007ffd8f57528c in QueueMgr::processMsg (this=0x17ce780, event=0x80) at ../queue_and_acd/QueueMgr.cpp:473
#7 0x00007ffd8f5755a7 in QueueMgrThread::run (this=0x17d1f40) at ../queue_and_acd/QueueMgr.cpp:421
#8 0x000000000042a717 in util::Thread::threadFun (this=0x17d1f40) at thread.cpp:92
#9 0x000000000042a4aa in util::Thread::begin (pArg=0x7ffd8802ae78) at thread.cpp:35
#10 0x000000363b807851 in start_thread () from /lib64/libpthread.so.0
#11 0x000000363b0e890d in clone () from /lib64/libc.so.6
代码:
std::string OutboundServer::OutbdExcute(const string outbd_uuid,const std :: string app_name,const std :: string app_arg,const std :: string app_exe_uuid,bool event_lock)
{
Oubound_handle_t *handle = ListenThread->otbdConnections.find(outbd_uuid);
if(!handle)
{
TelError
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
站内导航:
特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!
©2012-2021,