-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustup linux rustc executable not executable (symbol lookup error) #99440
Comments
I think it would be good to get the dynamic linker version, since perf (which also uses Linux) didn't run into this... |
@matthiaskrgr If this is your "default" nightly toolchain that you tried to upgrade and it borked, then it is considered the host toolchain by rustup. |
@workingjubilee this toolchain was installed via Executing different |
cc @Kobzol |
I think we should revert that PR until we figure out why this is broken. |
Heh, that was fast :D I expected obscure errors, but outright failing to execute Filed #99442 |
So the obvious question is: |
@workingjubilee it seems to not happen on every platform, CI obviously ran the tests successfully and @cuviper tested in a bunch of platforms with old glibc versions / toolchains and it worked on those too. |
@matthiaskrgr May we see |
Need to finish investigation, but hopefully this is now not affecting anyone. |
|
I'm not running that kernel, but rustc |
IMO we should reland And only then we could start adding flags (we just need "the next nightly" to be scientific, but still, if LLD I would also recommend landing |
LLD was not landed standalone because it's a regression for us to do so (binary size increases). I suppose we could temporarily land such a change, but it seems like we still are failing to reproduce the bug here, so I'm hesitant to say we'd be able to verify that LLD alone (or safe, or any other options) still cause the problem or not. Maybe we can rely on @matthiaskrgr to test, but that seems horrible (and could be transient, nondeterministic, etc.) |
I already did tests with safe ICF and LLD only. Both fail for @matthiaskrgr . So even with just using LLD, it's broken in some environments. |
Ah, thanks for testing, I wasn't been able to gather that detail from either the Zulip thread or this thread. That's the kind of situation I was imagining switching only one aspect at a time would find. The only thing I can think of for diagnosing LLD is doing something like this: nm -S toolchain/lib/librustc_driver-*.so \
| sed -E 's/^[0-9a-f]* //;s/^ *([a-zA-Z] )/---------------- \1/' \
| sort -k 3 \
> rustc_driver.syms for 2 toolchains, using And then diffing the two outputs. The order might differ, but ideally the (I'm assuming we're using Another experiment that might be interesting is trying to integrate |
Well, ignore all that, this one was user error: @matthiaskrgr had $ ldd ~/.rustup/toolchains/nightly-2022-07-19-x86_64-unknown-linux-gnu/lib/librustc_driver-*.so
ldd: warning: you do not have execution permission for `/home/eddy/.rustup/toolchains/nightly-2022-07-19-x86_64-unknown-linux-gnu/lib/librustc_driver-47fae6bd857f5148.so'
linux-vdso.so.1 (0x00007ffe512b5000)
libstd-1aab30bac2090a15.so => /home/eddy/.rustup/toolchains/nightly-2022-07-19-x86_64-unknown-linux-gnu/lib/../lib/libstd-1aab30bac2090a15.so (0x00007fe700d83000)
libLLVM-14-rust-1.64.0-nightly.so => /home/eddy/.rustup/toolchains/nightly-2022-07-19-x86_64-unknown-linux-gnu/lib/../lib/libLLVM-14-rust-1.64.0-nightly.so (0x00007fe6fb7fb000) $ ldd ~/.rustup/toolchains/nightly-2022-07-19-x86_64-unknown-linux-gnu/lib/librustc_driver-*.so
ldd: warning: you do not have execution permission for `/home/matthias/.rustup/toolchains/nightly-2022-07-19-x86_64-unknown-linux-gnu/lib/librustc_driver-47fae6bd857f5148.so'
linux-vdso.so.1 (0x00007ffcae74c000)
libstd-1aab30bac2090a15.so => /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libstd-1aab30bac2090a15.so (0x00007f3bac800000)
libLLVM-14-rust-1.64.0-nightly.so => /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-14-rust-1.64.0-nightly.so (0x00007f3ba75d2000) (system libs omitted for brevity) Note how in @matthiaskrgr's case, instead of doing the relative That happened because @matthiaskrgr had this value for
We can probably reland the original PR (or just turning LLD on if we want to) and see if anything else breaks. |
Aha! And here's why @matthiaskrgr's setup only broke now: $ ls ~/.rustup/toolchains/nightly-2022-07-{16,17,18,19,20,21,22,23,24}-x86_64-unknown-linux-gnu/lib/librustc_driver-*.so | cat
/home/eddy/.rustup/toolchains/nightly-2022-07-16-x86_64-unknown-linux-gnu/lib/librustc_driver-13073596e99db423.so
/home/eddy/.rustup/toolchains/nightly-2022-07-17-x86_64-unknown-linux-gnu/lib/librustc_driver-aa112a58a2cb5756.so
/home/eddy/.rustup/toolchains/nightly-2022-07-18-x86_64-unknown-linux-gnu/lib/librustc_driver-47fae6bd857f5148.so
/home/eddy/.rustup/toolchains/nightly-2022-07-19-x86_64-unknown-linux-gnu/lib/librustc_driver-47fae6bd857f5148.so
/home/eddy/.rustup/toolchains/nightly-2022-07-20-x86_64-unknown-linux-gnu/lib/librustc_driver-47fae6bd857f5148.so
/home/eddy/.rustup/toolchains/nightly-2022-07-21-x86_64-unknown-linux-gnu/lib/librustc_driver-47fae6bd857f5148.so
/home/eddy/.rustup/toolchains/nightly-2022-07-22-x86_64-unknown-linux-gnu/lib/librustc_driver-47fae6bd857f5148.so
/home/eddy/.rustup/toolchains/nightly-2022-07-23-x86_64-unknown-linux-gnu/lib/librustc_driver-6d0404a4e3a2c33a.so
/home/eddy/.rustup/toolchains/nightly-2022-07-24-x86_64-unknown-linux-gnu/lib/librustc_driver-4ecd731fcabc90db.so Unrelated to the LLD change, in the same nightly, we stopped changing EDIT: added a few more nightlies, looks like Lines 1564 to 1602 in c32dcbb
|
since 246f66a / #99062 the linux rustc executables distributed by rustup are no longer executable:
The toolchain before that merge (263edd4 ) works fine for me.
My target (is that the right term for it?) is
x86_64-unknown-linux-gnu
The text was updated successfully, but these errors were encountered: