Open truchi opened 4 years ago
Unfortunately the code provided is not compilable as there are definitions (for MyVertex
and MyEdge
) and an enclosing function missing. Could you please update your code with a self-contained example
Oops sorry missed that. Updated.
I've run the example on a server with 32GiB RAM and 48GiB swap memory using rustc 1.42.0-nightly (31dd4f4ac 2020-01-13)
. The OOM killer was on guard and killed rustc
after 6.8min:
Compiling compile-test v0.1.0 (/home/jfrimmel/compile-test)
error: could not compile `compile-test`.
Caused by:
process didn't exit successfully: `rustc --edition=2018 --crate-name compile_test src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=a40bb9266b098d04 -C extra-filename=-a40bb9266b098d04 --out-dir /home/jfrimmel/compile-test/target/debug/deps -C incremental=/home/jfrimmel/compile-test/target/debug/incremental -L dependency=/home/jfrimmel/compile-test/target/debug/deps` (signal: 9, SIGKILL: kill)
I took a screenshot of HTOP after ~4min. You can say, that the memory usage is quite high :smile:
Below you find the relevant part of dmesg
:
[2254946.092252] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/session-93.scope,task=rustc,pid=136409,uid=1000
[2254946.092262] Out of memory: Killed process 136409 (rustc) total-vm:134493012kB, anon-rss:31864240kB, file-rss:0kB, shmem-rss:0kB
[2254949.915967] oom_reaper: reaped process 136409 (rustc), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
As you can see, the memory rustc
tried to acquire was up to 128GiB...
Triage: no change, still happens with
rustc +nightly --version --verbose
rustc 1.47.0-nightly (5180f3da5 2020-08-23)
binary: rustc
commit-hash: 5180f3da5fd72627a8d38558ad1297df38793acd
commit-date: 2020-08-23
host: x86_64-unknown-linux-gnu
release: 1.47.0-nightly
LLVM version: 11.0
Gentlemen,
The following code causes my computer to freeze when attempting compilation (variant: takes a long time to compile and errs with "...infinite size..."). It should have warned about the infinite size type.
Hope this helps.