Closed staticfloat closed 4 years ago
Upon investigating this further, this is almost certainly a problem in our patched glibc; Initially I thought that dl-load.c
was in rust, but it's actually within libc
, so the most likely issue is that rustc
is triggering a codepath that nothing else in our system does. I will re-open if this turns out to be something pathological inside rustc
, otherwise sorry for the noise!
I am distributing
rust 1.37.0
(obtained throughrustup
) inside of an Alpine linux-based container for cross-compiling software for a large number target architectures. While I have successfully managed to installrustc
in such a way that I can compile (usingrustc --target=${RUST_TRIPLET} -C linker=${TRIPLET}-gcc -o hello hello.rs
) for all the different architectures I want, I have noticed that if I pass--emit
torustc
, (even just--emit=link
, which I believe should be the default) it freezes, spinning forever.I have been unable to determine why this freezing occurs when
--emit
is passed but doesn't occur when it's omitted. Runningrustc
withingdb
gives some hints that something is going wrong, but not many:There are two running threads:
The first is stuck here:
The second is stuck here:
Note that there are a few peculiarities about the system it's running inside of:
This is a dual-libc system; it has both
musl
andglibc
installed side-by-side, with patches applied toglibc
to allow for intelligent dynamic loading of dependencies (to reject selection of dependencies that link againstmusl
).This is a single-user system, as all Alpine-based systems are.
The
rust
installation has had things like itsdoc
andman
pages deleted, to save space. Running this withinstrace
doesn't show any attempts to load these files, but I figured I might as well point out that I've tried to trim things down so that's clear from the beginning, in case it is relevant later.