社区
C语言
帖子详情
pthread_mutex_lock.c:62: __pthread_mutex_lock: Assertion `mutex->__data.__owner
笑Smile3721
2013-08-23 03:58:05
工程比较复杂,上锁的地方比较多,出现这程序运行几分钟就出现此错误。
...全文
789
3
打赏
收藏
pthread_mutex_lock.c:62: __pthread_mutex_lock: Assertion `mutex->__data.__owner
工程比较复杂,上锁的地方比较多,出现这程序运行几分钟就出现此错误。
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
3 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
笑Smile3721
2013-08-27
打赏
举报
回复
是程序问题,加锁不合理造成的
qq120848369
2013-08-24
打赏
举报
回复
程序问题,找bug吧。
赵4老师
2013-08-23
打赏
举报
回复
上锁者不是锁的拥有者。 即调用pthread_mutex_lock的程序之前没有调用pthread_mutex_init或者调用pthread_mutex_init了但又调了pthread_mutex_destroy
get_status_tool: p
thread
_
mutex
_
lock
.c:312: __p
thread
_
mutex
_
lock
_full:
Assertion
`(-(e)) != 3 || !rob
mutex
位于动态分配结构体中,出现上述错误,移至静态区,不再报错。 get_status_tool: p
thread
_
mutex
_
lock
.c:312: __p
thread
_
mutex
_
lock
_full:
Assertion
`(-(e)) != 3 || !robust' failed. Aborted (core dumped) ...
./nptl/p
thread
_
mutex
_
lock
.c:81: __p
thread
_
mutex
_
lock
:
Assertion
`
mutex
->__
data
.__
owner
== 0' failed
#include<iostream> #include<p
thread
.h> #include<stdlib.h> #include<string.h> #include<unistd.h> #include<errno.h> using namespace std; p
thread
_cond_t taxiarrive = ...
linux下错误使用p
thread
_
mutex
_
lock
导致程序奔溃问题分析
在进行程序开发过程中,错误使用了p
thread
_
mutex
_
lock
导致程序概率性的奔溃,奔溃时报如下错误: 问题分析: 本文分析在Linux应用程序中错误使用p
thread
_
mutex
锁时会概率性触发SIG_ABRT信号而导致程序崩溃(库打印输出 :
Assertion
`
mutex
->__
data
.__
owner
== 0' failed)的原因。 首先给出出错的示例程序:
p
thread
_
mutex
_cond_
lock
_full
上周使用p
thread
_cond_wait时遇到一个从来没见过的错误,程序core在这里: ../nptl/p
thread
_
mutex
_
lock
.c:350: __p
thread
_
mutex
_cond_
lock
_full:
Assertion
`(-(e)) != 3 || !robust' failed. 经过观察和分析,推断是
mutex
的状态被破坏了。 排查代码,主线程退出时,
mutex
对象被...
p
thread
_
mutex
_
lock
p
thread
_
mutex
_
lock
p
thread
_
mutex
_
lock
(p
thread
_
mutex
_t *
mutex
); int p
thread
_
mutex
_try
lock
(p
thread
_
mutex
_t *
mutex
); int p
thread
_
mutex
_un
lock
(p
thread
_
mutex
_t *
mutex
); 描述 p
thread
_
mutex
_loc
C语言
70,023
社区成员
243,263
社区内容
发帖
与我相关
我的任务
C语言
C语言相关问题讨论
复制链接
扫一扫
分享
社区描述
C语言相关问题讨论
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章