Skip to content

SIGFPE with rustc 1.61.0 #97255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hgy59 opened this issue May 21, 2022 · 7 comments
Closed

SIGFPE with rustc 1.61.0 #97255

hgy59 opened this issue May 21, 2022 · 7 comments
Labels
C-bug Category: This is a bug. regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@hgy59
Copy link

hgy59 commented May 21, 2022

Code

I tried to build exa v0.10.1 (https://github.com/ogham/exa)

CARGO_HOME=/spksrc/distrib/cargo PATH=:/spksrc/distrib/cargo/bin/:/spksrc/distrib/cargo/bin:/scripts:/usr/local/bin:/usr/bin:/bin:/usr/games PKG_CONFIG_LIBDIR=/spksrc/diyspk/exa/work-x64-6.1/install//var/packages/exa/target/lib/pkgconfig WORK_DIR=/spksrc/diyspk/exa/work-x64-6.1 INSTALL_PREFIX=/var/packages/exa/target TC=syno-x64-6.1  LD="/spksrc/toolchain/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld" LDSHARED="/spksrc/toolchain/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-gcc -shared" CPP="/spksrc/toolchain/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-cpp" NM="/spksrc/toolchain/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-nm" CC="/spksrc/toolchain/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-gcc" AS="/spksrc/toolchain/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-as" RANLIB="/spksrc/toolchain/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ranlib" CXX="/spksrc/toolchain/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-g++" AR="/spksrc/toolchain/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ar" STRIP="/spksrc/toolchain/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-strip" OBJDUMP="/spksrc/toolchain/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-objdump" READELF="/spksrc/toolchain/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-readelf" CFLAGS="-I/spksrc/toolchain/syno-x64-6.1/work/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/include -I/spksrc/diyspk/exa/work-x64-6.1/install//var/packages/exa/target/include " CPPFLAGS="-I/spksrc/toolchain/syno-x64-6.1/work/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/include -I/spksrc/diyspk/exa/work-x64-6.1/install//var/packages/exa/target/include " CXXFLAGS="-I/spksrc/toolchain/syno-x64-6.1/work/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/include -I/spksrc/diyspk/exa/work-x64-6.1/install//var/packages/exa/target/include " LDFLAGS="-L/spksrc/toolchain/syno-x64-6.1/work/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/lib -L/spksrc/diyspk/exa/work-x64-6.1/install//var/packages/exa/target/lib -Wl,--rpath-link,/spksrc/diyspk/exa/work-x64-6.1/install//var/packages/exa/target/lib -Wl,--rpath,/var/packages/exa/target/lib " CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=/spksrc/toolchain/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-gcc cargo install --target=x86_64-unknown-linux-gnu --path /spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1 --root /spksrc/diyspk/exa/work-x64-6.1/install/var/packages/exa/target
  Installing exa v0.10.1 (/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1)
    Updating crates.io index
   Compiling exa v0.10.1 (/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1)
error: could not compile `exa`

Caused by:
  process didn't exit successfully: `rustc --crate-name exa --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto --cfg 'feature="default"' --cfg 'feature="git"' --cfg 'feature="git2"' -C metadata=d99b4db23d0120a9 -C extra-filename=-d99b4db23d0120a9 --out-dir /spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -C linker=/spksrc/toolchain/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-gcc -L dependency=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/release/deps --extern ansi_term=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/deps/libansi_term-df870e4d9b9e157e.rlib --extern datetime=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/deps/libdatetime-84f41c1993bdca61.rlib --extern git2=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/deps/libgit2-a3a34fe09416e79c.rlib --extern glob=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/deps/libglob-01042dfcc9d951c0.rlib --extern lazy_static=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/deps/liblazy_static-014330bac8bfba68.rlib --extern libc=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/deps/liblibc-1ec8277da51729b8.rlib --extern locale=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/deps/liblocale-bb520fb040060b3e.rlib --extern log=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/deps/liblog-2d39266cf4c3e9d4.rlib --extern natord=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/deps/libnatord-397f149577a369eb.rlib --extern num_cpus=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/deps/libnum_cpus-271b37a05b5da98d.rlib --extern number_prefix=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/deps/libnumber_prefix-e58c477461dcfd28.rlib --extern scoped_threadpool=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/deps/libscoped_threadpool-efd8a85896ae34f5.rlib --extern term_grid=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/deps/libterm_grid-94aff8e341953ab7.rlib --extern term_size=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/deps/libterm_size-5c6cb8b2f4b236cf.rlib --extern unicode_width=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/deps/libunicode_width-aa6703706b00a397.rlib --extern users=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/deps/libusers-17dca92bbb84decf.rlib --extern zoneinfo_compiled=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/deps/libzoneinfo_compiled-0fc43351406bc04a.rlib -L native=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/build/libgit2-sys-03da96a70734fc5e/out/build -L native=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/build/libz-sys-035ebad90e77b091/out/lib -L native=/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target/x86_64-unknown-linux-gnu/release/build/libz-sys-035ebad90e77b091/out/lib` (signal: 8, SIGFPE: erroneous arithmetic operation)
error: failed to compile `exa v0.10.1 (/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1)`, intermediate artifacts can be found at `/spksrc/diyspk/exa/work-x64-6.1/exa-0.10.1/target`
make[3]: *** [../../mk/spksrc.cross-rust.mk:120: rust_build_and_install_target] Error 101

I expected to see this happen: successful build

Instead, this happened: (signal: 8, SIGFPE: erroneous arithmetic operation), see log output above

Version it worked on

It most recently worked on: Rust 1.60.0

Version with regression

Rust 1.61.0

rustc --version --verbose:

rustc 1.61.0 (fe5b13d68 2022-05-18)
binary: rustc
commit-hash: fe5b13d681f25ee6474be29d748c65adcd91f69e
commit-date: 2022-05-18
host: x86_64-unknown-linux-gnu
release: 1.61.0
LLVM version: 14.0.0

Affected targets

Build fails for targets:

  • x86_64-unknown-linux-gnu
  • i686-unknown-linux-gnu
  • armv5te-unknown-linux-gnueabi
  • aarch64-unknown-linux-gnu
  • powerpc-unknown-linux-gnu

Build succeeds for targets:

  • armv7-unknown-linux-gnueabihf
  • armv7-unknown-linux-gnueabi

Backtrace

Backtrace

<backtrace>

@hgy59 hgy59 added C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. labels May 21, 2022
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label May 21, 2022
@hgy59
Copy link
Author

hgy59 commented May 21, 2022

This is probably related to #94762 (former was for 1.61.0 nightly, but this is for 1.61.0 stable).

@JohnTitor JohnTitor added regression-from-stable-to-stable Performance or correctness regression from one stable version to another. and removed regression-untriaged Untriaged performance or correctness regression. labels May 23, 2022
@apiraino
Copy link
Contributor

apiraino commented May 23, 2022

Note: to reproduce the issue, need to compile the crate in release mode, ex. cargo build --release.

Does not reproduce on 1.62.0-beta.2 (daf68b1f7 2022-05-19) and rustc 1.63.0-nightly (b2eed72a6 2022-05-22)

@apiraino apiraino added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label May 23, 2022
@gyakovlev
Copy link

gyakovlev commented May 25, 2022

in gentoo we've added those 2 patches on top of 1.61.0 and it fixes the problem
downstream bug: https://bugs.gentoo.org/847421

rust-lang/llvm-project@fe8a27a
and
rust-lang/llvm-project@67a2904

I think it's the first one, but I added second one too.

too bad we can't patch released tarball of 1.61.0.

maybe it's serious enough to cut 1.61.1 ? Users start reporting this failure.

@apiraino
Copy link
Contributor

Will revisit this once the new stable is out (beta and nightly do not reproduce the issue)

@rustbot label -I-prioritize

@rustbot rustbot removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Jun 15, 2022
@hgy59
Copy link
Author

hgy59 commented Jul 1, 2022

fixed with rust 1.62.0

@hgy59 hgy59 closed this as completed Jul 1, 2022
webmaster128 added a commit to CosmWasm/cw-template that referenced this issue Sep 19, 2022
@vblazhkun
Copy link

I am unable to compile exa using the updated rustc version:

... (signal: 8, SIGFPE: erroneous arithmetic operation)
error: failed to compile `exa v0.10.1`, intermediate artifacts can be found at `/tmp/cargo-install1R1xAR`
$ rustc --version
rustc 1.65.0

@apiraino
Copy link
Contributor

@vblazhkun I can compile exa (cargo build --release) on host x86_64-unknown-linux-gnu with the latest rustc stable and nightly:

$ rustc --version
rustc 1.63.0 (4b91a6ea7 2022-08-08)
$ rustc +nightly --version
rustc 1.73.0-nightly (993deaa0b 2023-07-11)

if you are experiencing a regression, can you please open a new issue detailing how to reproduce it? thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants