Closed
Description
In rust-lang/rust#125016 (comment), android tests are timing out attempting to update CB to 0.1.113. I'm just making this issue for a place to track the debugging effort.
#598 seems to have caused this; I tested reverting it and the job passed rust-lang/rust#127561 (comment). Also reverted VisionOS to avoid conflicts, but that should be unrelated.
@maurer tested locally and was able to identify these tests as failing:
[ui] tests/ui/hashmap/hashmap-memory.rs
[ui] tests/ui/issues/issue-87707.rs
[ui] tests/ui/process/multi-panic.rs
[ui] tests/ui/test-attrs/terse.rs
[ui] tests/ui/threads-sendsync/mpsc_stress.rs
Metadata
Metadata
Assignees
Labels
No labels
Activity
tgross35 commentedon Jul 11, 2024
For reference - I compiled for the target (
cargo rustc --target arm-linux-androideabi --release -- -C codegen-units=1
) and listed the symbols (nm -gC
) here. Excludes namespaced symbols.Symbols available from current master (06db2de)
Symbols available from my revert test (tgross35/android-testing, 42538d8). `weak-intrinsics` feature not enabled.
Looks like most of the
__aeabi_*
symbols have always been weak (with some exceptions) as well as math symbols, Nothing too surprising.tgross35 commentedon Jul 11, 2024
Building one of the failing tests
tests/ui/process/multi-panic.rs
for that target gives these undefined symbols:Complete shot in the dark here but I wonder if the
__sync_*
symbols could be the problem, since they used to be strong but became weak. And all the failing tests seem to have something to do with threads / synchronization. And assuming that if any of thecore
/std
symbols had problems, they would have shown up elsewhere.tgross35 commentedon Jul 11, 2024
Missing dunder symbols for each:
hashmap-memory.o
issue-87707.o
mpsc-stress.o
multi-panic.o
terse.o
__sync_val_compare_and_swap_4
exists on all butterse
, maybe something to check. Disassembly of our version:extern "C"
onunsafe
intrinsics #642tgross35 commentedon Jul 18, 2024
Making the
__sync_*
symbols strong again fixed this. rust-lang/rust#127561 (comment)tgross35 commentedon Jul 18, 2024
I just realized that another thing changed by #598, probably inadvertently, is that
extern "C"
was dropped. See this part of the diff,$abi
is missing https://github.com/rust-lang/compiler-builtins/pull/598/files#diff-315c02cd05738da173861537577d159833f70f79cfda8cd7cf1a0d7a28ace31bR457-R465.It seems unlikely but if (1) the system
__sync_*
symbols are weak or do not exist, and (2) Rust is using its own ABI, then this could be problematic.I'm going to do another try run with only this fix just to get a better answer here.
Edit: try rust-lang/rust#127561 (comment)
Mark atomic `__sync_*` intrinsics always strong on android
tgross35 commentedon Jul 18, 2024
Looks like maybe it's only the ABI and not weak/strong, see #642 (comment)
tgross35 commentedon Jul 18, 2024
With the ABI fix at e7fd5be that adds
extern "C"
backIdentical asm except for which registers get pushed or popped. Got you!