-
Notifications
You must be signed in to change notification settings - Fork 13.3k
RUST_BACKTRACE=1 segfaults on locally compiled programs #44859
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
Comments
fwiw, here is a backtrace with debug symbols, running rustc commit 9ae6ed7
|
This aws likely fixed by #44525, so closing. |
@alexcrichton this is not fixed, I get exactly the same backtrace with a freshly built rustc from the master branch. |
Just retried with a.rs contains
stacktrace is
|
I sometimes get a smaller stack (note that the invalid memory adress is the same: 0x7ffff7f84195, not sure how relevant that is):
|
Still hitting this issue with current nightly and I really don't know how to debug it further. |
I've observed similar behaviour when building inside a Linux virtualbox running on Mac when the target directory is under a virtualbox |
@alecmocatta are you speaking of building or running on different filesystems? |
@Keruspe Building. I confirmed by building an identical crate on each filesystem, confirming the binaries differed, running and seeing one crash, then swapping the filesystem of the binary and seeing the same behaviour – building on the |
That's an interresting find! The binary that works here was built on an ubuntu/ext4, The one that doesn't on a exherbo/btrfs. Both either work everywhere or fail everywhere, only the build environment counts. @james-darkfox which filesystem are you using? |
Ok, I found a counterexample, I have an ext4 system which produces faulty binaries, so that's not it. Could be some kernel configuration issue maybe? One interresting fact: for the same trivial |
@Keruspe Sorry for the delay. I too use ext4, and just verified for tmpfs, neither work as expected here on Exherbo. That size difference makes me wonder if rustc is assuming some upstream library has some features enabled, that we, on exherbo, have disabled by default? |
@james-darkfox It's not a problem with exherbo, but with some exhebro installations. |
@Keruspe I'm currently running my exherbo environment inside a chroot, for the sake of Xorg, using Debian-based Tails as the host which has its own hardened kernel. However, rust programs compiled outside of the chroot work as expected. Hinting towards exherbo's userland, not kernel. Worse, while under Tails, gdb and ptrace are forbidden. Fortunately I don't have many panics that I'd need to trace anyway. IIUC in
|
To clarify my earlier observation regarding working on ext4 but not under vboxfs – all other things were constant, besides path. i.e. it was the same kernel on the same machine, I just changed the working directory from |
@alecmocatta can you print the output of lsmod for those two systems? vboxfs could cause some additional module to be loaded maybe? |
@Keruspe That wouldn't apply in my case where Debian-tails is the host and Exherbo is the guest chroot. The kernel is constant. The userlands differ. |
@james-darkfox it's worth exploring anyways, could be different ways to trigger it |
@Keruspe It's the same system.
|
Decided to try using musl. No segfault but useless output.
|
Seems to be fixed here since the switch to the libbacktrace submodule |
With current stable, beta and nightly:
@james-darkfox do you still have the problem? |
I test |
Oops, forgot about this issue. As far as I can tell it was fixed. @Keruspe |
Closing per my last comment. |
RUST_BACKTRACE=1
segfaults on locally compiled programs when they panic. Externally built binaries such as those installed through rustup work as expected, yielding the ICE backtrace in #44858 .I use Exherbo Linux. I can use
-C panic=abort
to get traces fromgdb
, but that forbids anything graceful.The text was updated successfully, but these errors were encountered: