Closed
Description
$ cd openmod
$ mkdir foo
$ echo 'mod foo; fn main(){}' > a.rs
$ rustc a.rs
a.rs:1:5: 1:8 error: file not found for module `foo`
a.rs:1 mod foo; fn main(){}
^~~
a.rs:1:5: 1:8 help: name the file either foo.rs or foo/mod.rs inside the directory .
a.rs:1 mod foo; fn main(){}
^~~
panicked at 'assertion failed: `(left == right) && (right == left)` (left: `22`, right: `0`)', /home/nodakai/src/rust-HEAD/src/libstd/sys/unix/thread_local.rs:26
run with `RUST_BACKTRACE=1` to see a backtrace
$ rustc --version verbose
rustc 0.13.0-dev (bad1062ca 2014-11-24 09:56:34 +0000)
binary: rustc
commit-hash: bad1062caaaefe0963d7b8513786c8283e74f1e7
commit-date: 2014-11-24 09:56:34 +0000
host: x86_64-unknown-linux-gnu
release: 0.13.0-dev
22 is EINVAL
returned by pthread_setspecific(3)
.
When I set RUST_BACKTRACE=1
, the probability of panicking drops to 1/100. I was lucky enough to get this transcript by running rustc
in shell loop while sleep 0.1; do rustc ... done
, but it wasn't informative after all:
modopen.rs:1:5: 1:9 error: file not found for module `cell`
modopen.rs:1 mod cell;
^~~~
modopen.rs:1:5: 1:9 help: name the file either cell.rs or cell/mod.rs inside the directory .
modopen.rs:1 mod cell;
^~~~
panicked at 'assertion failed: `(left == right) && (right == left)` (left: `22`, right: `0`)', /home/nodakai/src/rust-HEAD/src/libstd/sys/unix/thread_local.rs:26
stack backtrace:
1: 0x7f5eabf67020 - rt::backtrace::imp::write::hc875af40f612e37aLBt
I haven't hit this problem with the current snapshot rustc c9f6d69 2014-11-21 03:41:45 +0000