Compiler errors remote environment

Edit: Issue created:

I'm attempting to do the tokio tutorial on a server I am ssh'd into (this is for a class; all of my assignments will need to compile on this server). Rustc version is 1.39.0

I very quickly run into compiler errors after these steps

cargo init
cargo install mini-redis

Here is the log

I am able to compile the exact same project on my machine with rustc 1.39.0 so I assume it's something with the remote machine.

sclark@DESKTOP-7ALA21N:~/mini_redis$ rustup run 1.39.0 cargo build
   Compiling mini_redis v0.1.0 (/home/sclark/mini_redis)
    Finished dev [unoptimized + debuginfo] target(s) in 0.20s

You have triggered a bug in the compiler. Please submit a bug report at the link found in the logs.

As for how you can proceed now, it appears that the compiler is failing to spawn more threads. Try changing the number of codegen units by adding the following to your Cargo.toml.

codegen-units = 1

codegen-units = 1

Out of curiosity, which class are you using Tokio's tutorial for?

Here's a related issue:

Those changes don't seem to have much of an effect

It's for a networking class - the language is up to us, there's nothing specific about using tokio, but I figured why not learn some async. I'm more trying to derisk using rust for the class rather than actually doing the tutorial (I could easily do it on my machine).

I assume there's no other information about the compiler besides version? I notice that when I run rustc --version on rust 1.39.0 with rustup locally, I get a date along with the version, but I don't get this on the server (the server also does not have rustup). Any other relevant info I should put in the bug report besides OS?


sclark@DESKTOP-7ALA21N:~/mini_redis$ rustup run 1.39.0 rustc --version
rustc 1.39.0 (4560ea788 2019-11-04)


-bash-4.2$ rustc --version
rustc 1.39.0

Might be relevant to also report the output of the commands listed on the issue.

ps -AL --no-headers | wc -l
cat /proc/meminfo
ulimit -Sa
ulimit -Ha
cat /proc/sys/kernel/threads-max
cat /proc/sys/vm/max_map_count
cat /proc/sys/kernel/pid_max
systemctl --version
systemctl status user-$UID.slice
cat /proc/sys/vm/overcommit_*

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.