-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Possible issue with Android ASan and std::thread? #1216
Comments
Hmm, oddly, this issue doesn't occur when using pthreads. So it must be an issue with ASan and std::thread? Which is a little bit strange as I would imagine std::thread uses pthreads internally anyway... |
|
Ok that’s good to know. So with wrap.sh unfortunately I’m then back to it terminating app process due to seccomp violation. |
Have you found reason of this issue? |
No I gave up in the end. I assume Asan just isn't compatible with std::thread. |
So I have been setting up ASan in my project, and I can't get past an abort() that occurs whenever the thread function from a std::thread returns:
Take a look at this:
2020-03-31 16:36:48.375 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: =================================================================
2020-03-31 16:36:48.375 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: ==18800==ERROR: AddressSanitizer: SEGV on unknown address 0x0043d98001e8 (pc 0x007eb18727a4 bp 0x007e1541a390 sp 0x007e1541a360 T2)
2020-03-31 16:36:48.375 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: ==18800==The signal is caused by a READ memory access.
2020-03-31 16:36:48.450 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #0 0x7eb18727a0 (/system/lib64/libc.so+0xb27a0)
2020-03-31 16:36:48.450 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #1 0x7eb1872ce8 (/system/lib64/libc.so+0xb2ce8)
2020-03-31 16:36:48.451 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #2 0x7eb18519b4 (/system/lib64/libc.so+0x919b4)
2020-03-31 16:36:48.451 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #3 0x7eb1851414 (/system/lib64/libc.so+0x91414)
2020-03-31 16:36:48.451 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #4 0x7eb18512dc (/system/lib64/libc.so+0x912dc)
2020-03-31 16:36:48.451 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #5 0x7eb17e3dcc (/system/lib64/libc.so+0x23dcc)
2020-03-31 16:36:48.452 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: AddressSanitizer can not provide additional info.
2020-03-31 16:36:48.452 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: SUMMARY: AddressSanitizer: SEGV (/system/lib64/libc.so+0xb27a0)
2020-03-31 16:36:48.452 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: Thread T2 created by T1 here:
2020-03-31 16:36:48.453 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #0 0x7e150f15a0 (/data/app/com.olivercollyer.emuplayer-MUdNt0VtPKkpD6zajCJpqw==/lib/arm64/libclang_rt.asan-aarch64-android.so+0x915a0)
2020-03-31 16:36:48.453 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #1 0x7e11db16d0 (/data/app/com.olivercollyer.emuplayer-MUdNt0VtPKkpD6zajCJpqw==/lib/arm64/libemu-player.so+0x76d6d0)
2020-03-31 16:36:48.454 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #2 0x7e11daeb64 (/data/app/com.olivercollyer.emuplayer-MUdNt0VtPKkpD6zajCJpqw==/lib/arm64/libemu-player.so+0x76ab64)
2020-03-31 16:36:48.454 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #3 0x7e11dae1e0 (/data/app/com.olivercollyer.emuplayer-MUdNt0VtPKkpD6zajCJpqw==/lib/arm64/libemu-player.so+0x76a1e0)
2020-03-31 16:36:48.455 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #4 0x7e11eab05c (/data/app/com.olivercollyer.emuplayer-MUdNt0VtPKkpD6zajCJpqw==/lib/arm64/libemu-player.so+0x86705c)
2020-03-31 16:36:48.455 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #5 0x7e11eb0f5c (/data/app/com.olivercollyer.emuplayer-MUdNt0VtPKkpD6zajCJpqw==/lib/arm64/libemu-player.so+0x86cf5c)
2020-03-31 16:36:48.455 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #6 0x7eb18512d8 (/system/lib64/libc.so+0x912d8)
2020-03-31 16:36:48.456 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #7 0x7eb17e3dcc (/system/lib64/libc.so+0x23dcc)
2020-03-31 16:36:48.456 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: Thread T1 created by T0 here:
2020-03-31 16:36:48.456 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #0 0x7e150f15a0 (/data/app/com.olivercollyer.emuplayer-MUdNt0VtPKkpD6zajCJpqw==/lib/arm64/libclang_rt.asan-aarch64-android.so+0x915a0)
2020-03-31 16:36:48.457 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #1 0x7e11eaa764 (/data/app/com.olivercollyer.emuplayer-MUdNt0VtPKkpD6zajCJpqw==/lib/arm64/libemu-player.so+0x866764)
2020-03-31 16:36:48.457 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #2 0x7e11ea9770 (/data/app/com.olivercollyer.emuplayer-MUdNt0VtPKkpD6zajCJpqw==/lib/arm64/libemu-player.so+0x865770)
2020-03-31 16:36:48.457 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #3 0x7eafc7660c (/system/lib64/libandroid_runtime.so+0xc860c)
2020-03-31 16:36:48.457 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #4 0x73385d10 (/system/framework/arm64/boot-framework.oat+0x43ed10)
2020-03-31 16:36:48.458 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #5 0x7e2e476cc8 (/system/lib64/libart.so+0xcfcc8)
2020-03-31 16:36:48.458 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #6 0x7e2e6276c0 (/system/lib64/libart.so+0x2806c0)
2020-03-31 16:36:48.458 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #7 0x7e2e6227ec (/system/lib64/libart.so+0x27b7ec)
2020-03-31 16:36:48.459 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #8 0x7e2e8d1a00 (/system/lib64/libart.so+0x52aa00)
2020-03-31 16:36:48.459 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #9 0x7e2e8f2914 (/system/lib64/libart.so+0x54b914)
2020-03-31 16:36:48.459 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #10 0x7e2e5fb31c (/system/lib64/libart.so+0x25431c)
2020-03-31 16:36:48.459 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #11 0x7e2e600e10 (/system/lib64/libart.so+0x259e10)
2020-03-31 16:36:48.460 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #12 0x7e2e6216ac (/system/lib64/libart.so+0x27a6ac)
2020-03-31 16:36:48.460 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #13 0x7e2e8cf524 (/system/lib64/libart.so+0x528524)
2020-03-31 16:36:48.460 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #14 0x7e2e8f2594 (/system/lib64/libart.so+0x54b594)
2020-03-31 16:36:48.461 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #15 0x7e2e5fb31c (/system/lib64/libart.so+0x25431c)
2020-03-31 16:36:48.461 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #16 0x7e2e600e10 (/system/lib64/libart.so+0x259e10)
2020-03-31 16:36:48.461 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #17 0x7e2e6216ac (/system/lib64/libart.so+0x27a6ac)
2020-03-31 16:36:48.461 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #18 0x7e2e8cf524 (/system/lib64/libart.so+0x528524)
2020-03-31 16:36:48.461 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #19 0x7e2e8f2594 (/system/lib64/libart.so+0x54b594)
2020-03-31 16:36:48.462 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #20 0x7e2e5fb31c (/system/lib64/libart.so+0x25431c)
2020-03-31 16:36:48.462 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #21 0x7e2e600e10 (/system/lib64/libart.so+0x259e10)
2020-03-31 16:36:48.462 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #22 0x7e2e6216ac (/system/lib64/libart.so+0x27a6ac)
2020-03-31 16:36:48.463 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #23 0x7e2e8cee8c (/system/lib64/libart.so+0x527e8c)
2020-03-31 16:36:48.463 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #24 0x7e2e8f2514 (/system/lib64/libart.so+0x54b514)
2020-03-31 16:36:48.463 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #25 0x7e2e5fb31c (/system/lib64/libart.so+0x25431c)
2020-03-31 16:36:48.463 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #26 0x7e2e600e10 (/system/lib64/libart.so+0x259e10)
2020-03-31 16:36:48.464 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #27 0x7e2e6216ac (/system/lib64/libart.so+0x27a6ac)
2020-03-31 16:36:48.464 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #28 0x7e2e8d1ed0 (/system/lib64/libart.so+0x52aed0)
2020-03-31 16:36:48.464 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #29 0x7e2e8f6294 (/system/lib64/libart.so+0x54f294)
2020-03-31 16:36:48.464 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #30 0x7e2e5fb31c (/system/lib64/libart.so+0x25431c)
2020-03-31 16:36:48.465 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #31 0x7e2e600e10 (/system/lib64/libart.so+0x259e10)
2020-03-31 16:36:48.465 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #32 0x7e2e6216ac (/system/lib64/libart.so+0x27a6ac)
2020-03-31 16:36:48.465 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #33 0x7e2e8cee8c (/system/lib64/libart.so+0x527e8c)
2020-03-31 16:36:48.465 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #34 0x7e2e8f2514 (/system/lib64/libart.so+0x54b514)
2020-03-31 16:36:48.465 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #35 0x7e2e5fb31c (/system/lib64/libart.so+0x25431c)
2020-03-31 16:36:48.465 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #36 0x7e2e600e10 (/system/lib64/libart.so+0x259e10)
2020-03-31 16:36:48.466 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #37 0x7e2e6216ac (/system/lib64/libart.so+0x27a6ac)
2020-03-31 16:36:48.466 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #38 0x7e2e8cee8c (/system/lib64/libart.so+0x527e8c)
2020-03-31 16:36:48.466 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #39 0x7e2e8f2514 (/system/lib64/libart.so+0x54b514)
2020-03-31 16:36:48.466 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #40 0x7e2e5fb31c (/system/lib64/libart.so+0x25431c)
2020-03-31 16:36:48.467 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #41 0x7e2e600e10 (/system/lib64/libart.so+0x259e10)
2020-03-31 16:36:48.467 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #42 0x7e2e6216ac (/system/lib64/libart.so+0x27a6ac)
2020-03-31 16:36:48.467 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #43 0x7e2e8d01cc (/system/lib64/libart.so+0x5291cc)
2020-03-31 16:36:48.467 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #44 0x7e2e8f2614 (/system/lib64/libart.so+0x54b614)
2020-03-31 16:36:48.468 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #45 0x7e2e5fb31c (/system/lib64/libart.so+0x25431c)
2020-03-31 16:36:48.468 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #46 0x7e2e600e10 (/system/lib64/libart.so+0x259e10)
2020-03-31 16:36:48.468 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #47 0x7e2e6216ac (/system/lib64/libart.so+0x27a6ac)
2020-03-31 16:36:48.468 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #48 0x7e2e8cee8c (/system/lib64/libart.so+0x527e8c)
2020-03-31 16:36:48.469 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #49 0x7e2e8f2514 (/system/lib64/libart.so+0x54b514)
2020-03-31 16:36:48.469 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #50 0x7e2e5fb31c (/system/lib64/libart.so+0x25431c)
2020-03-31 16:36:48.469 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #51 0x7e2e600e10 (/system/lib64/libart.so+0x259e10)
2020-03-31 16:36:48.469 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #52 0x7e2e6216ac (/system/lib64/libart.so+0x27a6ac)
2020-03-31 16:36:48.469 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #53 0x7e2e8cee8c (/system/lib64/libart.so+0x527e8c)
2020-03-31 16:36:48.470 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #54 0x7e2e8f2514 (/system/lib64/libart.so+0x54b514)
2020-03-31 16:36:48.470 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #55 0x7e2e5fb31c (/system/lib64/libart.so+0x25431c)
2020-03-31 16:36:48.470 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #56 0x7e2e600e10 (/system/lib64/libart.so+0x259e10)
2020-03-31 16:36:48.470 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #57 0x7e2e6216ac (/system/lib64/libart.so+0x27a6ac)
2020-03-31 16:36:48.470 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #58 0x7e2e8cee8c (/system/lib64/libart.so+0x527e8c)
2020-03-31 16:36:48.470 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #59 0x7e2e8f2514 (/system/lib64/libart.so+0x54b514)
2020-03-31 16:36:48.471 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #60 0x7e2e5fb31c (/system/lib64/libart.so+0x25431c)
2020-03-31 16:36:48.471 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #61 0x7e2e600e10 (/system/lib64/libart.so+0x259e10)
2020-03-31 16:36:48.471 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #62 0x7e2e6216ac (/system/lib64/libart.so+0x27a6ac)
2020-03-31 16:36:48.471 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #63 0x7e2e8cee8c (/system/lib64/libart.so+0x527e8c)
2020-03-31 16:36:48.471 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #64 0x7e2e8f2514 (/system/lib64/libart.so+0x54b514)
2020-03-31 16:36:48.471 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #65 0x7e2e5fb31c (/system/lib64/libart.so+0x25431c)
2020-03-31 16:36:48.472 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #66 0x7e2e600e10 (/system/lib64/libart.so+0x259e10)
2020-03-31 16:36:48.472 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #67 0x7e2e6216ac (/system/lib64/libart.so+0x27a6ac)
2020-03-31 16:36:48.472 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #68 0x7e2e8cee8c (/system/lib64/libart.so+0x527e8c)
2020-03-31 16:36:48.472 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #69 0x7e2e8f2514 (/system/lib64/libart.so+0x54b514)
2020-03-31 16:36:48.472 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #70 0x7e2e5fb31c (/system/lib64/libart.so+0x25431c)
2020-03-31 16:36:48.473 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #71 0x7e2e600e10 (/system/lib64/libart.so+0x259e10)
2020-03-31 16:36:48.473 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #72 0x7e2e6216ac (/system/lib64/libart.so+0x27a6ac)
2020-03-31 16:36:48.473 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #73 0x7e2e8cee8c (/system/lib64/libart.so+0x527e8c)
2020-03-31 16:36:48.473 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #74 0x7e2e8f2514 (/system/lib64/libart.so+0x54b514)
2020-03-31 16:36:48.473 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #75 0x7e2e5fb31c (/system/lib64/libart.so+0x25431c)
2020-03-31 16:36:48.473 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #76 0x7e2e600e10 (/system/lib64/libart.so+0x259e10)
2020-03-31 16:36:48.474 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #77 0x7e2e6216ac (/system/lib64/libart.so+0x27a6ac)
2020-03-31 16:36:48.474 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #78 0x7e2e8d0390 (/system/lib64/libart.so+0x529390)
2020-03-31 16:36:48.474 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #79 0x7e2e8f2694 (/system/lib64/libart.so+0x54b694)
2020-03-31 16:36:48.474 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #80 0x7e2e5fb31c (/system/lib64/libart.so+0x25431c)
2020-03-31 16:36:48.474 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #81 0x7e2e8bf720 (/system/lib64/libart.so+0x518720)
2020-03-31 16:36:48.474 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #82 0x7e2e9090fc (/system/lib64/libart.so+0x5620fc)
2020-03-31 16:36:48.474 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #83 0x7e2e476ce8 (/system/lib64/libart.so+0xcfce8)
2020-03-31 16:36:48.475 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #84 0x7e2e8056b8 (/system/lib64/libart.so+0x45e6b8)
2020-03-31 16:36:48.475 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #85 0x7e2e80710c (/system/lib64/libart.so+0x46010c)
2020-03-31 16:36:48.475 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #86 0x7e2e796790 (/system/lib64/libart.so+0x3ef790)
2020-03-31 16:36:48.475 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #87 0x71d0e7e4 (/system/framework/arm64/boot.oat+0x11f7e4)
2020-03-31 16:36:48.475 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #88 0x7e2e476cc8 (/system/lib64/libart.so+0xcfcc8)
2020-03-31 16:36:48.476 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #89 0x7e2e6276c0 (/system/lib64/libart.so+0x2806c0)
2020-03-31 16:36:48.476 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #90 0x7e2e6216c8 (/system/lib64/libart.so+0x27a6c8)
2020-03-31 16:36:48.476 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #91 0x7e2e8cee8c (/system/lib64/libart.so+0x527e8c)
2020-03-31 16:36:48.476 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #92 0x7e2e8f2514 (/system/lib64/libart.so+0x54b514)
2020-03-31 16:36:48.476 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #93 0x7e2e5fb31c (/system/lib64/libart.so+0x25431c)
2020-03-31 16:36:48.476 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #94 0x7e2e8bf720 (/system/lib64/libart.so+0x518720)
2020-03-31 16:36:48.476 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: #95 0x7e2e9090fc (/system/lib64/libart.so+0x5620fc)
2020-03-31 16:36:48.477 18800-18840/com.olivercollyer.emuplayer I/com.olivercollyer.emuplayer: ==18800==ABORTING
So that's the ASan output, and in logcat I get the corresponding:
020-03-31 16:36:48.563 18848-18848/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2020-03-31 16:36:48.563 18848-18848/? A/DEBUG: Build fingerprint: 'samsung/gtowifieea/gtowifi:9/PPR1.180610.011/T290XXU2ASL3:user/release-keys'
2020-03-31 16:36:48.563 18848-18848/? A/DEBUG: Revision: '4'
2020-03-31 16:36:48.563 18848-18848/? A/DEBUG: ABI: 'arm64'
2020-03-31 16:36:48.563 18848-18848/? A/DEBUG: pid: 18800, tid: 18840, name: llyer.emuplayer >>> com.olivercollyer.emuplayer <<<
2020-03-31 16:36:48.563 18848-18848/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
2020-03-31 16:36:48.563 18848-18848/? A/DEBUG: Abort message too long: claimed length = 7324
2020-03-31 16:36:48.563 18848-18848/? A/DEBUG: x0 0000000000000000 x1 0000000000004998 x2 0000000000000006 x3 0000000000000008
2020-03-31 16:36:48.563 18848-18848/? A/DEBUG: x4 fefeff7d143fff46 x5 fefeff7d143fff46 x6 fefeff7d143fff46 x7 7f7f7f7f7f7f7f7f
2020-03-31 16:36:48.563 18848-18848/? A/DEBUG: x8 0000000000000083 x9 0497dd809ef6a78f x10 0000000000000000 x11 fffffffc7ffffbdf
2020-03-31 16:36:48.563 18848-18848/? A/DEBUG: x12 0000000000000001 x13 000000005e834770 x14 001b697c2ab74186 x15 00010b7ecce8f467
2020-03-31 16:36:48.563 18848-18848/? A/DEBUG: x16 0000007eb18bf2a0 x17 0000007eb17efb5c x18 0000000000000010 x19 0000000000004970
2020-03-31 16:36:48.563 18848-18848/? A/DEBUG: x20 0000000000004998 x21 0000007e15271e18 x22 0000007e151e8040 x23 0000007e15271e00
2020-03-31 16:36:48.564 18848-18848/? A/DEBUG: x24 0000007eb18c7d68 x25 0000007e1541a728 x26 0000007e1560c588 x27 0000000000000016
2020-03-31 16:36:48.564 18848-18848/? A/DEBUG: x28 0000007fe0c69054 x29 0000007e2b1801c0
2020-03-31 16:36:48.564 18848-18848/? A/DEBUG: sp 0000007e2b180180 lr 0000007eb17e2198 pc 0000007eb17e21c0
2020-03-31 16:36:48.566 18848-18848/? A/DEBUG: backtrace:
2020-03-31 16:36:48.566 18848-18848/? A/DEBUG: #00 pc 00000000000221c0 /system/lib64/libc.so (abort+116)
2020-03-31 16:36:48.566 18848-18848/? A/DEBUG: #1 pc 000000000004d60c /data/app/com.olivercollyer.emuplayer-MUdNt0VtPKkpD6zajCJpqw==/lib/arm64/libclang_rt.asan-aarch64-android.so (offset 0x43000)
2020-03-31 16:36:48.566 18848-18848/? A/DEBUG: #2 pc 000000000004c5d8 /data/app/com.olivercollyer.emuplayer-MUdNt0VtPKkpD6zajCJpqw==/lib/arm64/libclang_rt.asan-aarch64-android.so (offset 0x43000)
2020-03-31 16:36:48.566 18848-18848/? A/DEBUG: #3 pc 00000000000a3300 /data/app/com.olivercollyer.emuplayer-MUdNt0VtPKkpD6zajCJpqw==/lib/arm64/libclang_rt.asan-aarch64-android.so (offset 0x43000)
2020-03-31 16:36:48.566 18848-18848/? A/DEBUG: #4 pc 00000000000a2f84 /data/app/com.olivercollyer.emuplayer-MUdNt0VtPKkpD6zajCJpqw==/lib/arm64/libclang_rt.asan-aarch64-android.so (offset 0x43000)
2020-03-31 16:36:48.566 18848-18848/? A/DEBUG: #5 pc 00000000000a2944 /data/app/com.olivercollyer.emuplayer-MUdNt0VtPKkpD6zajCJpqw==/lib/arm64/libclang_rt.asan-aarch64-android.so (offset 0x43000)
2020-03-31 16:36:48.566 18848-18848/? A/DEBUG: #6 pc 000000000000068c [vdso:0000007eb5403000]
2020-03-31 16:36:48.566 18848-18848/? A/DEBUG: #7 pc 00000000000b27a0 /system/lib64/libc.so (ifree+84)
2020-03-31 16:36:48.566 18848-18848/? A/DEBUG: #8 pc 00000000000b2ce8 /system/lib64/libc.so (je_free+116)
2020-03-31 16:36:48.566 18848-18848/? A/DEBUG: #9 pc 00000000000919b4 /system/lib64/libc.so (pthread_key_clean_all()+128)
2020-03-31 16:36:48.566 18848-18848/? A/DEBUG: #10 pc 0000000000091414 /system/lib64/libc.so (pthread_exit+72)
2020-03-31 16:36:48.566 18848-18848/? A/DEBUG: #11 pc 00000000000912dc /system/lib64/libc.so (__pthread_start(void*)+40)
2020-03-31 16:36:48.566 18848-18848/? A/DEBUG: #12 pc 0000000000023dcc /system/lib64/libc.so (__start_thread+68)
And here is the code that I can reproduce this with, which I call at the start of running my application:
static void thread_func(void* ptr)
{
__android_log_print(ANDROID_LOG_ERROR, "", "thread_func started");
__android_log_print(ANDROID_LOG_ERROR, "", "sleeping for 5s...");
std::this_thread::sleep_for(std::chrono::seconds(5));
__android_log_print(ANDROID_LOG_ERROR, "", "...now exiting");
}
void make_asan_crash_the_app()
{
std::thread* thread = new std::thread(thread_func, (void*)nullptr);
thread->join();
delete thread;
}
Literally, I run this and after 5s, it crashes as per the above. Without ASan it behaves as I would expect.
Also, in my real scenario, this happens later on in execution of my application i.e. the application appears to run normally up until it first encounters a thread exiting and then...boom, as above.
I also did a test to see if ASan is basically working:
void* d = malloc(1000);
memset(d, 0, 2000);
...and as expected, ASan gives me a sensible report about overwriting the heap, so this suggests ASan is working correctly.
I'm at a loss as to figure out what is causing this? Is this a bug? It seems pretty fundamentally broken if so, but maybe I am missing something?
This is all running on an Android Samsung Tablet A8 (2019), with Android 9 (API 28) and Android Studio 3.5.3 on macOS 10.15, with NDK 21.0.6113669.
I've built all my code with fsanitize=address -fno-omit-frame-pointer and linked with fsanitize=address. This is all built into a shared library and I then do the final step using Android Studio to package up the APK.
One thing I did find was that wrap.sh was unnecessary for me - in fact, whenever I used wrap.sh as described in the documentation (https://developer.android.com/ndk/guides/asan) I get a different crash on startup as reported in this thread (see my post)
#1101
In my case, it seems sufficient to just ensure the asan shared library exists in the same location as my built shared library and stdc++ shared and there is no need for wrap.sh, although I guess if I wanted to set some Asan options I'd need to get that to work.
The text was updated successfully, but these errors were encountered: