Comments (5)
跑测试跑了24个小时,出现4次core,原因都是一样,
有线程私有变量如下导致:
`
(gdb) p info
$145 = (co::ThreadLocalInfo &) @0x232e910: {
thread_id = 66,
sleep_ms = 0 '\000',
proc = 0x0
}
(gdb) pdequeue run_proc_list_
$146 = (co::Processer *) 0x23534a0
......
$211 = (co::Processer *) 0x23548f0
Dequeue size = 66
(gdb) p *(co::Processer *) 0x23548f0
$212 = {
......
id_ = 66,
static s_id_ = {
<std::__atomic_base> = {
_M_i = 66
}, }
}
`
thread_id为66,根据代码,proc不应该为0;
看代码中对deque取size有两处是不拿锁,一处是拿锁的,怀疑是size在不拿锁调用下有概率不准(偏大)
from libgo.
通过原子量维护run_proc_list_的size,使用默认的memory order,测试目前没有发现问题;
至于是内存乱序还是什么原因导致的问题暂时不细究
from libgo.
感谢指出问题,请提交一个pr修复这个问题吧
from libgo.
能否提供一下测试代码?
from libgo.
3.x版本不再有这个问题 关闭
from libgo.
Related Issues (20)
- mutex destroyed while busy HOT 4
- 这个是跨平台的类go编程风格的C++库 HOT 2
- windows-vs2015测试co_pool例子会崩溃
- 运行 sample10_co_pool.cpp 例子崩溃 HOT 3
- sem up HOT 1
- MacOS X M1 segmentation fault
- hello world,error C2061: syntax error: identifier 'RefObject' HOT 2
- 有一些编译警告瑕疵希望能修复
- [建议]建议定时器增加连续的定时执行接口
- Apple M2编译成功,但是调用时报错 HOT 1
- 这个库是废了吗 HOT 2
- mutex destroyed while busy问题找到了
- 如果我使用了这个库,是不是我的mysql所有操作,自动就协程化了?同步写代码,实际已经异步i/o。 HOT 1
- stable3.1实现协程亲缘性了吗 HOT 2
- 使用g++11等高版本的编译器去编译master分支,会出现编译错误 HOT 3
- cpu占用高 HOT 6
- 协程内外都调用的同一个函数,函数内有锁有休眠,必锁
- linux下编译错误 undefined reference to 'libgo_jump_fcontext' HOT 1
- hook机制中使用epoll事件唤醒,为什么全部唤醒,直接唤醒fd对应的entry性能不是更高吗?
- windows下协程
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libgo.