Skip to content

Compiler panic while compiling libs when /tmp is full #20438

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

Closed
Kingdread opened this issue Jan 2, 2015 · 7 comments
Closed

Compiler panic while compiling libs when /tmp is full #20438

Kingdread opened this issue Jan 2, 2015 · 7 comments
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@Kingdread
Copy link

Running cargo build on a project with external dependencies, it tries to compile them but fails with

thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: couldn't copy path (couldn't write to file (No space left on device; path=/tmp/rs-16901-0-rsar/rustc-serialize-bef146d997674220.o); from=/home/daniel/Code/digital_composer/target/deps/rustc-serialize-bef146d997674220.o; to=/tmp/rs-16901-0-rsar/rustc-serialize-bef146d997674220.o)', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libcore/result.rs:746

The underlying issue is pretty clear (no space left on /tmp), but the error message may sound confusing.

Traceback:

   Compiling rustc-serialize v0.2.1
     Running `rustc /home/daniel/.cargo/registry/src/github.1485827954.workers.dev-1285ae84e5963aae/rustc-serialize-0.2.1/src/lib.rs --crate-name rustc-serialize --crate-type lib -g -C metadata=bef146d997674220 -C extra-filename=-bef146d997674220 --out-dir /home/daniel/Code/digital_composer/target/deps --emit=dep-info,link -L /home/daniel/Code/digital_composer/target/deps -L /home/daniel/Code/digital_composer/target/deps -Awarnings`
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: couldn't copy path (couldn't write to file (No space left on device; path=/tmp/rs-16901-0-rsar/rustc-serialize-bef146d997674220.o); from=/home/daniel/Code/digital_composer/target/deps/rustc-serialize-bef146d997674220.o; to=/tmp/rs-16901-0-rsar/rustc-serialize-bef146d997674220.o)', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libcore/result.rs:746

stack backtrace:
   1: 0xb71ed1f0 - sys::backtrace::write::h8c2ed683dda82704ist
   2: 0xb7210e70 - failure::on_fail::hebe4057108e7dc03xLz
   3: 0xb717b7d0 - rt::unwind::begin_unwind_inner::h420b24b59a4d3530ypz
   4: 0xb717c1f0 - rt::unwind::begin_unwind_fmt::h82a51dddeba5bd4bdnz
   5: 0xb7210b80 - rust_begin_unwind
   6: 0xb725fdb0 - panicking::panic_fmt::h54f05751f027ad53eCl
   7: 0xb68119f0 - back::link::link_rlib::h8250a4523f2e5662tHa
   8: 0xb680d4f0 - back::link::link_binary::h88d6b7cda509381a1ua
   9: 0xb7537050 - driver::phase_6_link_output::hc73f9c1c01d961e2cIa
  10: 0xb75142f0 - driver::compile_input::h05aad328a73a6525wba
  11: 0xb766e160 - thunk::F.Invoke<A, R>::invoke::h118516395371660300
  12: 0xb766cf70 - rt::unwind::try::try_fn::h14176178842317427281
  13: 0xb7280cd0 - rust_try_inner
  14: 0xb7280ca0 - rust_try
  15: 0xb766d2b0 - thunk::F.Invoke<A, R>::invoke::h7075950477878468722
  16: 0xb71fe520 - sys::thread::thread_start::hf2d9dfd6d613d3d2dlw
  17: 0xb35460d0 - start_thread
  18: 0xb704b882 - __clone
  19:        0x0 - <unknown>

Rust version:

rustc 0.13.0-nightly (39d740266 2015-01-01 15:51:08 +0000)
binary: rustc
commit-hash: 39d74026663597a8d4ad0ab04e6d117bf9fd6ad4
commit-date: 2015-01-01 15:51:08 +0000
host: i686-unknown-linux-gnu
release: 0.13.0-nightly
@brson brson added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. I-papercut labels Jan 3, 2015
@brson
Copy link
Contributor

brson commented Jan 3, 2015

Seems like this error be handled properly and not just unwrapped.

@XMPPwocky
Copy link
Contributor

This appears to be fixed already as of rustc 1.0.0-dev (89c4e37 2015-01-17 10:58:43 +0000)

@steveklabnik
Copy link
Member

@Kingdread can you confirm what @XMPPwocky sees?

@Kingdread
Copy link
Author

@steveklabnik The error seems to persist, even with rustc 1.0.0-nightly (d3732a12e 2015-02-06 23:30:17 +0000):

thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: IoError { kind: OtherIoError, desc: "couldn\'t copy path", detail: Some("couldn\'t write to file (No space left on device; path=/tmp/rsar.D7fuw95ZSU5H/rustc-serialize-ec565150ee89f7b5.o); from=\"/home/daniel/Code/digital_composer/target/deps/rustc-serialize-ec565150ee89f7b5.o\"; to=\"/tmp/rsar.D7fuw95ZSU5H/rustc-serialize-ec565150ee89f7b5.o\"") }', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/result.rs:743

@steveklabnik
Copy link
Member

Triage: I'm not aware of any changes here, and I don't have /tmp mounted on a separate partition to be able to try this out.

@istankovic
Copy link
Contributor

I think this one can be closed, I've just tried it out with latest nightly
(rustc 1.9.0-nightly (924da295c 2016-04-10)) and I get a nice error:

error: couldn't create a temp dir: No space left on device (os error 28).

rustc seems to honor the TMPDIR environment variable which allowed me
to simply set it to a loop-mounted filesystem that was made full.

@alexcrichton
Copy link
Member

Yay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

6 participants