Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

会发生死锁,it may lead to dead lock #21

Open
zhongqishi opened this issue Mar 21, 2018 · 3 comments
Open

会发生死锁,it may lead to dead lock #21

zhongqishi opened this issue Mar 21, 2018 · 3 comments

Comments

@zhongqishi
Copy link

zhongqishi commented Mar 21, 2018

此组件在一些情况下会发生死锁,不知道项目大神们有没有什么建议
未能稳定复现此问题,故不知道原因在哪

This project will lead to deadlock under certain circumstances. Still trying to find what happened.

@zhongqishi zhongqishi changed the title 会发生死锁 会发生死锁,it may lead to dead lock Mar 22, 2018
@zhongqishi zhongqishi reopened this Oct 21, 2018
@zhongqishi
Copy link
Author

阅读源码后已解决会出现的死锁以及崩溃bug,死锁的出现时因为之前版本采用的OSSpinLock,你下载最新版本,最新采用的是pthread_mutex_lock锁,良好运行测试两天未出现死锁问题了。
崩溃出现的问题在于,有几率开启mmap不成功,但是内存却超过了设定的dump日志限制,这时HighSpeedLogger这个C++对象是NULL,从而导致崩溃,比较简单的处理就是没有mmap成功就不开启定时dump日志,并且直接调用stop方法,停止这次内存监控。

感谢回复,这几天学习iOS技术的时候发现了OSSpinLock因为系统线程优先级造成的死锁,正在找机会改进

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@zhongqishi and others