Cannot Install Rust on shared hosting

Dear List,

We are experiencing problems installing rust on a shared hosting provider. See below. We set verbose and debugging. Any help would be appreciated.

Thanks,
Dennis

(uiserver):username:~/tmp$ ./rustup-init -v

Welcome to Rust!

This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.

Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:

/kunden/homepages/36/directory/htdocs/.rustup

This can be modified with the RUSTUP_HOME environment variable.

The Cargo home directory located at:

/kunden/homepages/36/directory/htdocs/.cargo

This can be modified with the CARGO_HOME environment variable.

The cargo, rustc, rustup and other commands will be added to
Cargo's bin directory, located at:

/kunden/homepages/36/directory/htdocs/.cargo/bin

This path will then be added to your PATH environment variable by
modifying the profile file located at:

/kunden/homepages/36/directory/htdocs/.profile

You can uninstall at any time with rustup self uninstall and
these changes will be reverted.

Current installation options:

default host triple: x86_64-unknown-linux-gnu
default toolchain: stable (default)
profile: default
modify PATH variable: yes

  1. Proceed with installation (default)
  2. Customize installation
  3. Cancel installation

1

info: profile set to 'default'
info: default host triple is x86_64-unknown-linux-gnu
verbose: installing toolchain 'stable-x86_64-unknown-linux-gnu'
verbose: toolchain directory: '/kunden/homepages/36/directory/htdocs/.rustup/toolchains/stable-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
verbose: creating temp root: /kunden/homepages/36/directory/htdocs/.rustup/tmp
verbose: creating temp file: /kunden/homepages/36/directory/htdocs/.rustup/tmp/on8z5w94dy7muv0n_file
verbose: downloading file from: 'url://static.rust-lang.org/dist/channel-rust-stable.toml.sha256'
verbose: downloading with reqwest
verbose: deleted temp file: /kunden/homepages/36/directory/htdocs/.rustup/tmp/on8z5w94dy7muv0n_file
verbose: no update hash at: '/kunden/homepages/36/directory/htdocs/.rustup/update-hashes/stable-x86_64-unknown-linux-gnu'
verbose: creating temp file: /kunden/homepages/36/directory/htdocs/.rustup/tmp/i8n7l52t34c93aru_file.toml
verbose: downloading file from: 'url://static.rust-lang.org/dist/channel-rust-stable.toml'
verbose: downloading with reqwest
verbose: checksum passed
verbose: creating temp file: /kunden/homepages/36/directory/htdocs/.rustup/tmp/qr0k3p8h3y6rb7if_file
verbose: downloading file from: 'url://static.rust-lang.org/dist/channel-rust-stable.toml.asc'
verbose: downloading with reqwest
verbose: deleted temp file: /kunden/homepages/36/directory/htdocs/.rustup/tmp/qr0k3p8h3y6rb7if_file
verbose: Good signature from on url://static.rust-lang.org/dist/channel-rust-stable.toml from:
verbose: from builtin Rust release key
verbose: RSA/85AB96E6-FA1BE5FE - Rust Language (Tag and Release Signing Key) rust-key@rust-lang.org
verbose: Fingerprint: 108F 6620 5EAE B0AA A8DD 5E1C 85AB 96E6 FA1B E5FE
verbose: deleted temp file: /kunden/homepages/36/directory/htdocs/.rustup/tmp/i8n7l52t34c93aru_file.toml
info: latest update on 2020-10-08, rust version 1.47.0 (18bf6b4f0 2020-10-07)
info: downloading component 'cargo'
verbose: creating Download Directory directory: '/kunden/homepages/36/directory/htdocs/.rustup/downloads'
verbose: downloading file from: 'url://static.rust-lang.org/dist/2020-10-08/cargo-0.48.0-x86_64-unknown-linux-gnu.tar.xz'
verbose: downloading with reqwest
verbose: checksum passed
info: downloading component 'clippy'
verbose: downloading file from: 'url://static.rust-lang.org/dist/2020-10-08/clippy-0.0.212-x86_64-unknown-linux-gnu.tar.xz'
verbose: downloading with reqwest
verbose: checksum passed
info: downloading component 'rust-docs'
verbose: downloading file from: 'url://static.rust-lang.org/dist/2020-10-08/rust-docs-1.47.0-x86_64-unknown-linux-gnu.tar.xz'
verbose: downloading with reqwest
verbose: checksum passed
info: downloading component 'rust-std'
verbose: downloading file from: 'url://static.rust-lang.org/dist/2020-10-08/rust-std-1.47.0-x86_64-unknown-linux-gnu.tar.xz'
verbose: downloading with reqwest
verbose: checksum passed
info: downloading component 'rustc'
verbose: downloading file from: 'url://static.rust-lang.org/dist/2020-10-08/rustc-1.47.0-x86_64-unknown-linux-gnu.tar.xz'
verbose: downloading with reqwest
verbose: checksum passed
info: downloading component 'rustfmt'
verbose: downloading file from: 'url://static.rust-lang.org/dist/2020-10-08/rustfmt-1.4.20-x86_64-unknown-linux-gnu.tar.xz'
verbose: downloading with reqwest
verbose: checksum passed
info: installing component 'cargo'
verbose: creating temp directory: /kunden/homepages/36/directory/htdocs/.rustup/tmp/meexlr99vdnl6qbe_dir
thread 'main' panicked at 'called Result::unwrap() on an Err value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }', /cargo/registry/src/github.com-1ecc6299db9ec823/threadpool-1.8.1/src/lib.rs:738:5
stack backtrace:
0: <std::sys_common::backtrace::print::DisplayBacktrace as core::fmt::Display>::fmt
1: core::fmt::write
2: std::io::Write::write_fmt
3: std::panicking::default_hook::{{closure}}
4: std::panicking::default_hook
5: std::panicking::rust_panic_with_hook
6: rust_begin_unwind
7: core::panicking::panic_fmt
8: core::option::expect_none_failed
9: threadpool::spawn_in_pool
10: rustup::diskio::get_executor
11: rustup::dist::component::package::unpack_without_first_dir
12: rustup::dist::manifestation::Manifestation::update
13: rustup::dist::dist::update_from_dist

14: rustup::install::InstallMethod::install
15: rustup::toolchain::DistributableToolchain::install_from_dist
16: rustup::cli::self_update::install
17: rustup::cli::setup_mode::main
18: rustup_init::main
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
thread 'main' panicked at 'No process instance', src/currentprocess.rs:126:17
stack backtrace:
0: 0x56227433affd - <std::sys_common::backtrace::print::DisplayBacktrace as core::fmt::Display>::fmt::hf78227137afc7565
1: 0x562273fc524c - core::fmt::write::h543cdf60775f89bf
2: 0x56227433a904 - std::io::Write::write_fmt::h0c7f3ce24c679426
3: 0x56227433a105 - std::panicking::default_hook::{{closure}}::ha6c807149ce20f8f
4: 0x5622743398f4 - std::panicking::default_hook::he49a9c12e358cc45
5: 0x5622743393b6 - std::panicking::rust_panic_with_hook::h93f74f5ef2f71f31
6: 0x5622741d8064 - std::panicking::begin_panic::h8cc8dbc25d6e865f
7: 0x5622741d6bf8 - rustup::currentprocess::home_process::h3bd9211416f58185
8: 0x5622741d5431 - rustup::cli::term2::stderr::ha11a038386f65e41
9: 0x56227420dd37 - rustup::cli::common::set_globals::{{closure}}::ha7a3fb8d7580c5c4
10: 0x5622741f1f64 - rustup::config::Cfg::from_env::{{closure}}::h3bdd3d9ffea26dd5
11: 0x56227425d299 - <rustup::dist::temp::Dir as core::ops::drop::Drop>::drop::ha78d9c1297bc754b
12: 0x562274262a7c - core::ptr::drop_in_place::hcc8eb12ca3b63bc5
13: 0x56227424a5c8 - rustup::dist::manifestation::Manifestation::update::hacf67fad3b44f03a
14: 0x56227423563c - rustup::dist::dist::update_from_dist
::h1462627f9c58c494
15: 0x56227423227a - rustup::install::InstallMethod::install::hbb6430b2dfaf5792
16: 0x562274230d21 - rustup::toolchain::DistributableToolchain::install_from_dist::h7b9bf9317c9aa2c5
17: 0x562274325aa2 - rustup::cli::self_update::install::h8ca0f61a773526a9
18: 0x56227432bd3d - rustup::cli::setup_mode::main::h4d335e1871435d70
19: 0x562273f3f42a - rustup_init::main::h22da971c634937a2
20: 0x562274353e83 - std::sys_common::backtrace::__rust_begin_short_backtrace::h1f01c818c00c4f70
21: 0x562273f4053f - main
22: 0x7fbe0603009b - __libc_start_main
23: 0x562273f3b029 -
thread panicked while panicking. aborting.
Illegal instruction
(uiserver):username:~/tmp$

The error seems to be about it not being able to start a new thread. I would open a bug report about the error not being handled properly.

I would expect you would get problems compiling even if it installed so maybe a good thing it fails early.
Check hosts restrictions with;

ulimit -a

Note the compiler isn't needed to run a binary (once you have built your project elsewhere.)

Thanks:
$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 1
file size (blocks, -f) unlimited
pending signals (-i) 768201
max locked memory (kbytes, -l) 65536
max memory size (kbytes, -m) unlimited
open files (-n) 512
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) 1800
max user processes (-u) 42
virtual memory (kbytes, -v) 786432
file locks (-x) unlimited

Would there be any way to make it work?

Can you run ps -u $(id -u) -L to show all processes and threads of the current user? Is it close to the 42 limit?

(uiserver):username:~$ ps -u $(id -u) -L
   PID    LWP TTY          TIME CMD
123999 123999 ?        00:00:00 sshd
124003 124003 pts/0    00:00:00 bash
126284 126284 pts/0    00:00:00 ps
(uiserver):username:~$ ps -ax
   PID TTY      STAT   TIME COMMAND
123999 ?        SN     0:00 sshd: username@pts/0
124003 pts/0    SNs    0:00 -bash
126370 pts/0    RN+    0:00 ps -ax
(uiserver):username:~$

It doesn't seem to be caused by trying to create too much processes/threads. It is not clear to me which resource is "temporarily unavailable".

Would it be possible to find out by placing a binary?

Interestingly, while the directories ".rustup/tmp/" were created successfully, the last directory ".rustup/tmp/meexlr99vdnl6qbe_dir" is never to be found?

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.