Skip to content

Fix android backtraces #43444

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

Closed
wants to merge 3 commits into from

Conversation

roblabla
Copy link
Contributor

Fixes #17520

If backtrace_syminfo fails to return the symbol, attempt using backtrace_pcinfo to get it. For whatever reason, this fixes the backtraces on android with PIE.

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @sfackler (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@sfackler
Copy link
Member

r? @alexcrichton

@carols10cents carols10cents added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 24, 2017
@alexcrichton
Copy link
Member

Thanks! Could you be sure to enable the various backtrace-related tests for android as well?

@alexcrichton
Copy link
Member

Could backtrace-debuginfo.rs also get un-ignored?

@roblabla
Copy link
Contributor Author

Woops, sorry, I missed it. This should do it.

@alexcrichton
Copy link
Member

@bors: r+

Thanks!

@bors
Copy link
Collaborator

bors commented Jul 24, 2017

📌 Commit e307fad has been approved by alexcrichton

@bors
Copy link
Collaborator

bors commented Jul 26, 2017

⌛ Testing commit e307fad with merge 8c7bd997251c42a45ff4e0b1cf6e6444be7c4f4a...

@bors
Copy link
Collaborator

bors commented Jul 26, 2017

💔 Test failed - status-travis

@kennytm
Copy link
Member

kennytm commented Jul 26, 2017

The run-pass/backtrace.rs and run-pass/backtrace-debuginfo.rs still failed on Android.

[00:58:11] thread 'main' panicked at 'Some tests failed', /checkout/src/tools/compiletest/src/main.rs:323:21
[00:58:11] ---- [run-pass] run-pass/backtrace.rs stdout ----
[00:58:11] 	
[00:58:11] error: test run failed!
[00:58:11] status: exit code: 101
[00:58:11] command: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/remote-test-client run /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/backtrace.stage2-arm-linux-androideabi
[00:58:11] stdout:
[00:58:11] ------------------------------------------
[00:58:11] uploaded "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/backtrace.stage2-arm-linux-androideabi", waiting for result
[00:58:11] 
[00:58:11] ------------------------------------------
[00:58:11] stderr:
[00:58:11] ------------------------------------------
[00:58:11] thread 'main' panicked at 'bad output: thread 'main' panicked at 'explicit panic', /checkout/src/test/run-pass/backtrace.rs:23:8
[00:58:11] stack backtrace:
[00:58:11]    0: <unknown>
[00:58:11]    1: <unknown>
[00:58:11]    2: <unknown>
[00:58:11]    3: <unknown>
[00:58:11]    4: <unknown>
[00:58:11]    5: <unknown>
[00:58:11]    6: <unknown>
[00:58:11]    7: <unknown>
[00:58:11]    8: <unknown>
[00:58:11]    9: <unknown>
[00:58:11]   10: <unknown>
[00:58:11] ', /checkout/src/test/run-pass/backtrace.rs:58:4
[00:58:11] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:58:11] 
[00:58:11] ------------------------------------------
[00:58:11] 
[00:58:11] thread '[run-pass] run-pass/backtrace.rs' panicked at 'explicit panic', /checkout/src/tools/compiletest/src/runtest.rs:2479:8
[00:58:11] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:58:11] 
[00:58:11] ---- [run-pass] run-pass/backtrace-debuginfo.rs stdout ----
[00:58:11] 	
[00:58:11] error: test run failed!
[00:58:11] status: exit code: 101
[00:58:11] command: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/remote-test-client run /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/backtrace-debuginfo.stage2-arm-linux-androideabi
[00:58:11] stdout:
[00:58:11] ------------------------------------------
[00:58:11] uploaded "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/backtrace-debuginfo.stage2-arm-linux-androideabi", waiting for result
[00:58:11] 
[00:58:11] ------------------------------------------
[00:58:11] stderr:
[00:58:11] ------------------------------------------
[00:58:11] thread 'main' panicked at 'trace does not match position list: test case 0
[00:58:11] thread 'main' panicked at 'explicit panic', /checkout/src/test/run-pass/backtrace-debuginfo.rs:79:4
[00:58:11] stack backtrace:
[00:58:11]    0: 0xb6e609f7 - <unknown>
[00:58:11]    1: 0xb6e5a9f7 - <unknown>
[00:58:11]    2: 0xb6e6c50f - <unknown>
[00:58:11]    3: 0xb6e6c1ff - <unknown>
[00:58:11]    4: 0xb6e6cb23 - <unknown>
[00:58:11]    5: 0xb6f2c2cf - <unknown>
[00:58:11]    6: 0xb6f2e6f7 - <unknown>
[00:58:11]    7: 0xb6f2e7b7 - <unknown>
[00:58:11]    8: 0xb6f2eeb3 - <unknown>
[00:58:11]    9: 0xb6eaf61b - <unknown>
[00:58:11]   10: 0xb6e6d92b - <unknown>
[00:58:11]   11: 0xb6d9fb4f - <unknown>
[00:58:11] 
[00:58:11] ---
[00:58:11] backtrace-debuginfo.rs:120
[00:58:11] backtrace-debuginfo.rs:168
[00:58:11] ', /checkout/src/test/run-pass/backtrace-debuginfo.rs:134:4
[00:58:11] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:58:11] 
[00:58:11] ------------------------------------------
[00:58:11] 
[00:58:11] thread '[run-pass] run-pass/backtrace-debuginfo.rs' panicked at 'explicit panic', /checkout/src/tools/compiletest/src/runtest.rs:2479:8
[00:58:11] 
[00:58:11] 
[00:58:11] failures:
[00:58:11]     [run-pass] run-pass/backtrace-debuginfo.rs
[00:58:11]     [run-pass] run-pass/backtrace.rs
[00:58:11] 
[00:58:11] test result: �[31mFAILED�(B�[m. 2700 passed; 2 failed; 19 ignored; 0 measured; 0 filtered out

@roblabla
Copy link
Contributor Author

Anyone know how I can get the tests to run on an android ? When running ./x.py test --target arm-linux-androideabi (with an emulator running), I get the following error : https://gist.github.com/roblabla/cc4a1f6019062eb4fbb0fdd1b1504f29

@Mark-Simulacrum
Copy link
Member

I'd try something like ./src/ci/docker/run.sh arm-android.

@alexcrichton
Copy link
Member

@bors: retry r-

trying to kick bors...

@aidanhs
Copy link
Member

aidanhs commented Aug 3, 2017

@roblabla have you had a chance to look at the android test failures? Just want to make sure this doesn't get lost.

@roblabla
Copy link
Contributor Author

roblabla commented Aug 3, 2017

I haven't yet. I'll get to it next week, probably.

@aidanhs aidanhs added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 10, 2017
@carols10cents
Copy link
Member

Friendly ping to keep this on your radar @roblabla !

@arielb1
Copy link
Contributor

arielb1 commented Aug 22, 2017

🕸 This PR had been inactive for 2 weeks. Closing it to keep our queue clean. Feel free to reopen. 🕸

@arielb1 arielb1 closed this Aug 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

backtraces broken on the Android bot
10 participants