-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Signal handler in Magisk hide causes deadlock #3976
Comments
This comment has been minimized.
This comment has been minimized.
A similar issue was found by one of the LSPosed users: his module mounting was stuck. And, amazingly, when he removed Besides, once @vvb2060 added some logs to magisk, it amazingly worked without removing well, after debugging with rikka, it seems that her problem is different from mine. just confirmed with that user that magisk works with magisk hide disabled. So, I suppose its the same problem. |
Update 2021-03-05 Found the real reason, wrong inference removed |
Update 2021-03-05 😋🎉: |
- Block signals in logging routine (fix topjohnwu#3976) - Prevent possible deadlock after fork (stdio locks internally) by creating a new FILE pointer per logging call (thread/stack local)
Logs
magisk.log
logcat.txt (filtered with magiskd)
Update 2021-03-05
The signal handler causes the deadlock (during
magisk_log
,localtime_r
locks, then signal comes, anothermagisk_log
andlocaltime_r
start, deadlock 😶).It's highly possible that many weird problems could be explained by this. For example, there are people who encountered the problem of random mount blocked.
libmagisk64.zip (magiskd binary, version 22001)
maps.txt
bt_all.txt (lldb bt all)
thread 2 is Magisk hide.
🎉
With the help of Sui, I can get a root shell when "su" from magisk is unavailable, or this problem may never be investigated.
With the help from @yujincheng08, who teaches me how to use lldb, I can get the full backtrace which "debuggerd" cannot.
The text was updated successfully, but these errors were encountered: