-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[Bug]: lld randomly crashing since update to 16.0.0 #15867
Comments
does it still happen with 16.0.1? |
Yep, but maybe a little less. |
MTE can be disabled just like what we have done in java, see #7332. |
I'd rather find the problem and fix it. |
Trying to narrowing down a bit. My guess is this is not just an issue of tagged pointers but an instance of more general memory issue. Tests suggested on older Android that does not care for tagged pointers.
This address value is peculiar at a glance. The lower 32 bits are zeroed. |
I think you are right, this is probably some kind of memory leak in lld, that is occasionally being caught by tagged pointers. Right now, Bionic's malloc always sets |
I opened an issue upstream and found that I could only reproduce on Snapdragon devices. Could others with Snapdragon devices try this out and let me know what you find?
If that shows no linker crash, a |
To voluntary testers, I recommend using a debug build of LLD. PR #16395 provides a build of LLD with assertions, debug symbols and ASan. Please share the full stack trace output of the crashing command. Also sharing the output of cat /proc/cpuinfo command is suggested when reporting a crash, along with |
I cannot reproduce this issue on my Snapdragon device, but swift sometimes hangs on my device.
|
@licy183, how many times did you run the swift build command to check? Any one run is unlikely to trigger this linker segfault, the failure rate is less than 5%. Where does swift hang, does it usually say something like "wrapping the AST for..." and get stuck? That is a known race in the swift build that happens 5-10% of the time. |
I tried 30 times using bash script, but I cannot reproduce this linker crash.
Yes, it sometimes hangs after outputing "wrapping the AST for". |
Did you run |
I've tried |
I have reported this upstream. @xtkoba, you said you were not able to reproduce, can you let us know what CPUs you tried? |
Not yet reproduced on:
|
Thanks, will let them know. Let me know if anything changes on the Snapdragon. |
I'm able to reproduce with the debug build of lld 16, but it is somewhat useless as it simply trips an assertion on the few occasions that it fails:
When I tried to run it in lldb to get a backtrace, it immediately errors out and prints a message that the LeakSanitizer cannot be run under a debugger:
I'm going to rebuild lld-debug without the sanitizer, so I can actually run this in lldb, will report what I find. |
@licy183, would you try the procedure I just detailed upstream on your MIX4 and any other Snapdragon devices you have? |
Yeah, I can reproduce the crash on following devices:
On this device, I got some weird errors. The lld-debug package complains about
|
Thanks a lot, @licy183, any non-Snapdragon devices you can try on? I could not reproduce on an Exynos 2100 phone, would also help if we could provide some more negative evidence that this is only a Qualcomm issue. |
I'm afraid not. The CPU model of all my mobile phones is Snapdragon... Maybe I could test it out on my roommate's device, but I'm not sure he'd agree or not. |
Should be worked around by e4dd29c, please reopen if you still see crashes with 16.0.4-1 or later, going to track the underlying issue upstream. |
Problem description
I see random crashes when linking, that always go away if I run the same command again, ie it's usually not reproducible. This is only since the LLVM 16 update, LLVM 15 worked well.
Sometimes, it'll just segfault:
Other times, it'll claim issues with memory tagging:
Posting this here so that others can chime in, and maybe we can track it down.
What steps will reproduce the bug?
Linking various software
What is the expected behavior?
No crashes
System information
termux-info:
The text was updated successfully, but these errors were encountered: