免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 879 | 回复: 0
打印 上一主题 下一主题

程序死锁求助 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-11-06 17:29 |只看该作者 |倒序浏览
操作系统:solaris 5.7
死锁情况:
用dbx发现是mutex 造成,此mutex 是我们写的代码中的, 地址信息为0x1cb510, 信息显示当前是线程t@48489获得这个mutex. 用thread tid命令查看该线程,发现该线程调用是在调用_tdb_agent时获得mutex的,但我们的程序没有这样的函数,该函数是系统调用吗? 如果是系统调用, 为何它会获取我们代码中的mutex呢?

dbx 信息:
(/../dbx)sync -info  0x1cb510
0x001cb510 (0x1cb510): thread  mutex(locked)
Lock owned by t@48489
Threads blocked by this lock are:
>;    t@1 (0x00107f9  a l@1  ?()      sleep on 0x1cb510       in __lwp_sema_wait()
...

(/../dbx) threads
t@48488  b l@48489 OSThreadMain()    running                 in _poll()
t@48489  b l@48490 ?()       running                 in __lwp_sema_wait()
   
(/../dbx) thread t@48489
t@48489 (l@48490) stopped in __lwp_sema_wait at 0xfeb99f80
0xfeb99f80: __lwp_sema_wait+0x0008:     ta      %icc,%g0 + 8

(/../dbx) where
current thread: t@48489
  [1] __lwp_sema_wait(0xff143b80, 0xff126f84, 0x15b10, 0x0, 0x0, 0x0), at 0xfeb99f80
=>;[2] _tdb_agent(0x0, 0x0, 0xff143918, 0xff143fa4, 0xff143b80, 0xfeac3dc0), at 0xff126f84
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP