Linux简单死锁程序,程序死锁了

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

#12 0xb7a4cf7e in clone () from /lib/tls/libc.so.6

Thread 4 (Thread -1628562480 (LWP 4908)):

#0  __lll_mutex_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/i386/i586/../i486/lowlevellock.S:59

#1  0xb7faf7c8 in _L_mutex_lock_147 () from /lib/tls/libpthread.so.0

#2  0xbfa68620 in ?? ()

#3  0x08094048 in __JCR_LIST__ ()

#4  0xbfa68620 in ?? ()

#5  0x9eee1bd0 in ?? ()

#6  0x9eedbdd8 in ?? ()

#7  0x08051924 in CThreadLockBase::Lock (this=0xbfa68658) at CThreadLock.h:39

#8  0x08051924 in CThreadLockBase::Lock (this=0xbfa68654) at CThreadLock.h:39

#9  0x0806fee1 in CSocketHandle::QueueFunImg (this=0xbfa68620, lParam=0xa8c02de8) at SocketHandle.cpp:60

---Type  to continue, or q  to quit---

#10 0x0806fd3c in CSocketHandle::QueueFun (lParam=0xa8c02dd8) at SocketHandle.cpp:26

#11 0xb7fad587 in start_thread (arg=0x9eee1bd0) at pthread_create.c:261

#12 0xb7a4cf7e in clone () from /lib/tls/libc.so.6

Thread 3 (Thread -1630659632 (LWP 4909)):

#0  __lll_mutex_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/i386/i586/../i486/lowlevellock.S:59

#1  0xb7faf7c8 in _L_mutex_lock_147 () from /lib/tls/libpthread.so.0

#2  0xbfa68620 in ?? ()

#3  0x08094048 in __JCR_LIST__ ()

#4  0xbfa68620 in ?? ()

#5  0x9ece1bd0 in ?? ()

#6  0x9ecdbdd8 in ?? ()

#7  0x08051924 in CThreadLockBase::Lock (this=0xbfa68658) at CThreadLock.h:39

#8  0x08051924 in CThreadLockBase::Lock (this=0xbfa68654) at CThreadLock.h:39

#9  0x0806fee1 in CSocketHandle::QueueFunImg (this=0xbfa68620, lParam=0xa8c02e60) at SocketHandle.cpp:60

#10 0x0806fd3c in CSocketHandle::QueueFun (lParam=0xa8c02e50) at SocketHandle.cpp:26

#11 0xb7fad587 in start_thread (arg=0x9ece1bd0) at pthread_create.c:261

#12 0xb7a4cf7e in clone () from /lib/tls/libc.so.6

Thread 2 (Thread -1632756784 (LWP 4910)):

#0  __lll_mutex_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/i386/i586/../i486/lowlevellock.S:59

#1  0xb7faf7c8 in _L_mutex_lock_147 () from /lib/tls/libpthread.so.0

#2  0xbfa68620 in ?? ()

#3  0x08094048 in __JCR_LIST__ ()

#4  0xbfa68620 in ?? ()

#5  0x9eae1bd0 in ?? ()

#6  0x9eadbdd8 in ?? ()

#7  0x08051924 in CThreadLockBase::Lock (this=0xbfa68658) at CThreadLock.h:39

#8  0x08051924 in CThreadLockBase::Lock (this=0xbfa68654) at CThreadLock.h:39

#9  0x0806fee1 in CSocketHandle::QueueFunImg (this=0xbfa68620, lParam=0xa8c02ed8) at SocketHandle.cpp:60

#10 0x0806fd3c in CSocketHandle::QueueFun (lParam=0xa8c02ec8) at SocketHandle.cpp:26

#11 0xb7fad587 in start_thread (arg=0x9eae1bd0) at pthread_create.c:261

#12 0xb7a4cf7e in clone () from /lib/tls/libc.so.6

Thread 1 (Thread -1215375680 (LWP 4203)):

#0  0xb7a0d27c in __nanosleep_nocancel () from /lib/tls/libc.so.6

#1  0xb7a0d096 in __sleep (seconds=0) at sleep.c:137

#2  0x0805d2b9 in main (argc=1, argv=0xbfa68724) at main.cpp:52

Current language:  auto; currently c

#0  0xb7a0d27c in __nanosleep_nocancel () from /lib/tls/libc.so.6

大家帮我看看,程序为什么死锁了?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值