Closed vi closed 1 week ago
@vi Is a more recent version of Linux functional?
I am slightly hesitant to update to it remotely, if it does not come back online it would be tricky to set it up again.
Other (non-Rust) musl-based programs also seem to have problems with time there.
Related: #115921.
Hacking musl source code to avoid 64-bit time functions in clock_gettime
worked around the issue in another (non-Rust) program.
I am slightly hesitant to update to it remotely, if it does not come back online it would be tricky to set it up again.
Understandable, I only asked in the event it was relatively easy to set and reset.
@vi Can you update the Rust application remotely with relative ease?
I am also curious to know if this is resolved by using -Ctarget-feature=-crt-static
for the build.
How will it run without musl dynamic libraries around?
Or does Rust distribution conveniently ships relevant *.so
files to make non-static builds portable-ish (e.g. with ./ld.so --library-path
trick)?
Oh. Well, it wouldn't. I wasn't sure whether the Linux distro in question supplied any such runtime libraries, really.
Cross post from #115921:
This is the infamous broken Synology kernel. Synology hijacked syscall numbers that were unassigned at the time to use for their own hacks to implement MSDOS fs emulation operations. Systems honoring the Linux ABI are unaffected; only the broken Synology kernels are affected. The only solution is to install seccomp filters to block the hijacked syscall range (make them all return -ENOSYS) so that fallback to time32 syscalls will happen.
Right, that confirms this is a complete duplicate of that other issue then.
There is more debugging / hotfix-related advice (use at your own discretion) in that issue.
Thank you, @richfelker!
Can't run Rust programs that use
std::time
build with 1.71+ for staticarm-unknown-linux-musleabi
on a synology_armada38x_ds218j NAS box running Linux3.10.105
.Code
I expected to see this happen:
Instead, this happened:
Version it worked on
For example, 1.70
strace is short:
Version with regression
For example, 1.71.1:
or, for example, recent 1.82.0:
backtrace
``` thread 'main' panicked at std/src/sys/pal/unix/time.rs:130:68: called `Result::unwrap()` on an `Err` value: Os { code: 22, kind: InvalidInput, message: "Invalid argument" } stack backtrace: 0: rust_begin_unwind at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panicking.rs:662:5 1: core::panicking::panic_fmt at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/panicking.rs:74:14 2: core::result::unwrap_failed at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/result.rs:1677:5 3: core::result::ResultI suspect is is related to Musl library update in 1.71.
@rustbot modify labels: +regression-from-stable-to-stable -regression-untriaged