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

crash at Rb_tree_rebalance_for_erase in libbootstrap #12

Open
noodle1983 opened this issue Dec 20, 2019 · 2 comments
Open

crash at Rb_tree_rebalance_for_erase in libbootstrap #12

noodle1983 opened this issue Dec 20, 2019 · 2 comments

Comments

@noodle1983
Copy link
Owner

两三个项目碰到了这个问题,Unity版本含2017和2019
堆栈如下图(来自sin,thx)
QQ图片20191220215822
QQ图片20191220220332

有几个怀疑的点:

  1. 多线程锁的问题,日志中发现在signal处理函数中,std::mutex会失效,全改成了pthread,看起来没问题
  2. std::map 和 static link的问题, 把map换成了c版的,hash函数直接cache size取余。

新增了个分支, 做了些改动: https://github.com/noodle1983/UnityAndroidIl2cppPatchDemo-libboostrap/tree/crash_in_map_test

来自sin的反馈,暂时没有崩溃;另外还有加载场景卡死的问题,无日志,原因不明,未深入。
求测。

@noodle1983
Copy link
Owner Author

noodle1983 commented Jan 6, 2020

崩溃和加载场景卡死的问题, 已合并到库的master分支,部分机型比较容易出现问题,求测。
改动:

  1. 额外变量存文件系统,去掉mutex,怀疑用户空间的mutex在hook调用里面可能会和系统时钟中断有冲突。
  2. zip alignment,这个改动可能是无效的,因为测试工作量太大,没回滚
  3. 不保存old_xxx函数,应该不相关
  4. 不主动dlopen libil2cpp。

分支:
https://github.com/noodle1983/UnityAndroidIl2cppPatchDemo-libboostrap/tree/master

@noodle1983
Copy link
Owner Author

so库换了spin lock,可能会修正这个问题,并大大优化性能。 这个分支用回global data:https://github.com/noodle1983/UnityAndroidIl2cppPatchDemo-libboostrap/tree/mutex_in_fclose, 求测。

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

1 participant