Skip to content
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

1.13.0 armhf stage0 segfaults when building 1.14.0 #39017

Closed
infinity0 opened this issue Jan 12, 2017 · 2 comments
Closed

1.13.0 armhf stage0 segfaults when building 1.14.0 #39017

infinity0 opened this issue Jan 12, 2017 · 2 comments

Comments

@infinity0
Copy link
Contributor

No logs available, I ran this manually on harris.debian.org. This machine has NEON enabled, to work around #36913. But it should produce 1.14.0 armhf host binaries that don't need NEON (as discussed in #35590).

This is after applying #38650 and #38675; The LLVM diff between Debian vs Rust is here.

There are some ARM-related LLVM patches that we haven't yet applied in Debian (see here), however this error is in the stage0 compiler so it is probably not Debian-specific. (Though it could be that the stage0 compiler itself is buggy, and needs to be recompiled with these LLVM patches.)

CFG_LLVM_LINKAGE_FILE=/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/rt/llvmdeps.rs LD_LIBRARY_PATH=/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage0/lib:/usr/lib/llvm-3.9/lib:$LD_LIBRARY_PATH   armv7-unknown-linux-gnueabihf/stage0/bin/rustc --cfg stage0 -C link-args=-Wl,-z,relro -O --cfg rtopt -Cdebuginfo=1 -C rpath -C prefer-dynamic -C no-stack-check --target=armv7-unknown-linux-gnueabihf   -L "armv7-unknown-linux-gnueabihf/rt" -L native="/usr/lib/llvm-3.9/lib"     --out-dir armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib -C extra-filename=-f5a209a9 -C metadata=f5a209a9 src/libcore/lib.rs
warning: this feature has been stable since 1.14.0. Attribute no longer needed, #[warn(stable_features)] on by default
  --> src/libcore/lib.rs:92:29
   |
92 | #![cfg_attr(stage0, feature(question_mark))]
   |                             ^^^^^^^^^^^^^

Segmentation fault
/home/infinity0/rustc/mk/target.mk:191: recipe for target 'armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/stamp.core' failed

Re-running manually for a stack trace:

rustc$ RUSTC_BOOTSTRAP=1 RUSTC_BOOTSTRAP_KEY=62b3e239 CFG_LLVM_LINKAGE_FILE=/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/rt/llvmdeps.rs LD_LIBRARY_PATH=/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage0/lib:/usr/lib/llvm-3.9/lib:$LD_LIBRARY_PATH  gdb armv7-unknown-linux-gnueabihf/stage0/bin/rustc
GNU gdb (Debian 7.12-4) 7.12
[..]
(gdb) run --cfg stage0 -C link-args=-Wl,-z,relro -O --cfg rtopt -Cdebuginfo=1 -C rpath -C prefer-dynamic -C no-stack-check --target=armv7-unknown-linux-gnueabihf   -L "armv7-unknown-linux-gnueabihf/rt" -L native="/usr/lib/llvm-3.9/lib"     --out-dir armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib -C extra-filename=-f5a209a9 -C metadata=f5a209a9 src/libcore/lib.rs
Starting program: /home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage0/bin/rustc --cfg stage0 -C link-args=-Wl,-z,relro -O --cfg rtopt -Cdebuginfo=1 -C rpath -C prefer-dynamic -C no-stack-check --target=armv7-unknown-linux-gnueabihf   -L "armv7-unknown-linux-gnueabihf/rt" -L native="/usr/lib/llvm-3.9/lib"     --out-dir armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib -C extra-filename=-f5a209a9 -C metadata=f5a209a9 src/libcore/lib.rs
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0xb3dff270 (LWP 15815)]
warning: this feature has been stable since 1.14.0. Attribute no longer needed, #[warn(stable_features)] on by default
  --> src/libcore/lib.rs:92:29
   |
92 | #![cfg_attr(stage0, feature(question_mark))]
   |                             ^^^^^^^^^^^^^


Thread 2 "rustc" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb3dff270 (LWP 15815)]
0xb51a2974 in llvm::LiveRangeEdit::scanRemattable(llvm::AAResults*) () from /home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage0/bin/../lib/../lib/librustc_llvm-91a6b62b230b4784.so
(gdb) bt
#0  0xb51a2974 in llvm::LiveRangeEdit::scanRemattable(llvm::AAResults*) () from /home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage0/bin/../lib/../lib/librustc_llvm-91a6b62b230b4784.so
#1  0xb51a29ee in llvm::LiveRangeEdit::anyRematerializable(llvm::AAResults*) () from /home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage0/bin/../lib/../lib/librustc_llvm-91a6b62b230b4784.so
#2  0xb528c72e in llvm::SplitEditor::reset(llvm::LiveRangeEdit&, llvm::SplitEditor::ComplementSpillMode) ()
   from /home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage0/bin/../lib/../lib/librustc_llvm-91a6b62b230b4784.so
#3  0xb5247154 in (anonymous namespace)::RAGreedy::selectOrSplitImpl(llvm::LiveInterval&, llvm::SmallVectorImpl<unsigned int>&, llvm::SmallSet<unsigned int, 16u, std::less<unsigned int> >&, unsigned int) ()
   from /home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage0/bin/../lib/../lib/librustc_llvm-91a6b62b230b4784.so
#4  0xb52465e2 in (anonymous namespace)::RAGreedy::selectOrSplitImpl(llvm::LiveInterval&, llvm::SmallVectorImpl<unsigned int>&, llvm::SmallSet<unsigned int, 16u, std::less<unsigned int> >&, unsigned int) ()
   from /home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage0/bin/../lib/../lib/librustc_llvm-91a6b62b230b4784.so
#5  0xb52465e2 in (anonymous namespace)::RAGreedy::selectOrSplitImpl(llvm::LiveInterval&, llvm::SmallVectorImpl<unsigned int>&, llvm::SmallSet<unsigned int, 16u, std::less<unsigned int> >&, unsigned int) ()
   from /home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage0/bin/../lib/../lib/librustc_llvm-91a6b62b230b4784.so
#6  0xb52465e2 in (anonymous namespace)::RAGreedy::selectOrSplitImpl(llvm::LiveInterval&, llvm::SmallVectorImpl<unsigned int>&, llvm::SmallSet<unsigned int, 16u, std::less<unsigned int> >&, unsigned int) ()
   from /home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage0/bin/../lib/../lib/librustc_llvm-91a6b62b230b4784.so
#7  0xb52465e2 in (anonymous namespace)::RAGreedy::selectOrSplitImpl(llvm::LiveInterval&, llvm::SmallVectorImpl<unsigned int>&, llvm::SmallSet<unsigned int, 16u, std::less<unsigned int> >&, unsigned int) ()
   from /home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage0/bin/../lib/../lib/librustc_llvm-91a6b62b230b4784.so
#8  0xb5247992 in (anonymous namespace)::RAGreedy::selectOrSplit(llvm::LiveInterval&, llvm::SmallVectorImpl<unsigned int>&) ()
   from /home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage0/bin/../lib/../lib/librustc_llvm-91a6b62b230b4784.so
#9  0xb523a9a0 in llvm::RegAllocBase::allocatePhysRegs() () from /home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage0/bin/../lib/../lib/librustc_llvm-91a6b62b230b4784.so
#10 0xb5244c54 in (anonymous namespace)::RAGreedy::runOnMachineFunction(llvm::MachineFunction&) () from /home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage0/bin/../lib/../lib/librustc_llvm-91a6b62b230b4784.so
#11 0xb51da24a in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) () from /home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage0/bin/../lib/../lib/librustc_llvm-91a6b62b230b4784.so
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) 

@brson
Copy link
Contributor

brson commented Jan 12, 2017

Thanks for filing these tier 2 platform bugs @infinity0 .

I'd guess this is the same as #37813

@infinity0
Copy link
Contributor Author

Following the links, this comment explains the issue and it seems simplest if we in Debian just wait for the next version in order to bootstrap armhf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants