[Pkg-rust-maintainers] Bug#1099528: rust-zune-jpeg executes avx code during the build resulting in SIGILL: illegal instruction

Jochen Sprickerhof jspricke at debian.org
Tue Mar 4 14:39:07 GMT 2025


Source: rust-zune-jpeg
Version: 0.4.14-1
Severity: minor

Hi,

I noticed that the build of rust-zune-jpeg fails on reproduce.debian.net
using a Intel Xeon X5690 but succeeds on my system with a i7-8565U:

https://reproduce.debian.net/amd64/#librust-zune-jpeg-dev

The relevant log is:

process didn't exit successfully: `CARGO=/usr/bin/cargo CARGO_MANIFEST_DIR=/build/reproducible-path/rust-zune-jpeg-0.4.14 CARGO_MANIFEST_PATH=/build/reproducible-path/rust-zune-jpeg-0.4.14/Cargo.toml CARGO_PKG_AUTHORS='caleb <etemesicaleb at gmail.com>' CARGO_PKG_DESCRIPTION='A fast, correct and safe jpeg decoder' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0 OR Zlib' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=zune-jpeg CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/etemesi254/zune-image/tree/dev/crates/zune-jpeg' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.4.14 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=4 CARGO_PKG_VERSION_PATCH=14 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/build/reproducible-path/rust-zune-jpeg-0.4.14/target/x86_64-unknown-linux-gnu/debug/deps:/build/reproducible-path/rust-zune-jpeg-0.4.14/target/x86_64-unknown-linux-gnu/debug:/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib' /build/reproducible-path/rust-zune-jpeg-0.4.14/target/x86_64-unknown-linux-gnu/debug/deps/zune_jpeg-9a5a94aed6dbf985` (signal: 4, SIGILL: illegal instruction)

Attaching gdb gives:

(gdb) bt
#0  core::core_arch::x86::avx::_mm256_loadu_si256 (mem_addr=0x7ffff7ca514c) at /usr/src/rustc-1.85.0/library/core/src/../../stdarch/crates/core_arch/src/x86/avx.rs:1547
#1  0x000055555557027f in zune_jpeg::idct::avx2::idct_int_avx2_inner (in_vector=0x7ffff7ca514c, out_vector=..., stride=8) at src/idct/avx2.rs:80
#2  0x000055555557019d in zune_jpeg::idct::avx2::idct_avx2 (in_vector=0x7ffff7ca514c, out_vector=..., stride=8) at src/idct/avx2.rs:57
#3  0x00005555555785ec in zune_jpeg::idct::tests::do_idct_test1 () at src/idct.rs:99
#4  0x0000555555578c07 in zune_jpeg::idct::tests::do_idct_test1::{closure#0} () at src/idct.rs:93
#5  0x000055555556f4b6 in core::ops::function::FnOnce::call_once<zune_jpeg::idct::tests::do_idct_test1::{closure_env#0}, ()> () at /usr/src/rustc-1.85.0/library/core/src/ops/function.rs:250
#6  0x00005555555804bb in core::ops::function::FnOnce::call_once<fn() -> core::result::Result<(), alloc::string::String>, ()> () at library/core/src/ops/function.rs:250
#7  test::__rust_begin_short_backtrace<core::result::Result<(), alloc::string::String>, fn() -> core::result::Result<(), alloc::string::String>> (f=0x7ffff7ca514c) at library/test/src/lib.rs:632
#8  0x00005555555b2d92 in test::types::RunnableTest::run (self=...) at library/test/src/types.rs:145
#9  0x0000555555580622 in test::run_test_in_process::{closure#0} () at library/test/src/lib.rs:655
#10 core::panic::unwind_safe::{impl#23}::call_once<core::result::Result<(), alloc::string::String>, test::run_test_in_process::{closure_env#0}> (self=...) at library/core/src/panic/unwind_safe.rs:272
#11 std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<test::run_test_in_process::{closure_env#0}>, core::result::Result<(), alloc::string::String>> (data=<error reading variable: Cannot access memory at address 0x0>) at library/std/src/panicking.rs:584
#12 std::panicking::try<core::result::Result<(), alloc::string::String>, core::panic::unwind_safe::AssertUnwindSafe<test::run_test_in_process::{closure_env#0}>> (f=...) at library/std/src/panicking.rs:547
#13 std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<test::run_test_in_process::{closure_env#0}>, core::result::Result<(), alloc::string::String>> (f=...) at library/std/src/panic.rs:358
#14 test::run_test_in_process (id=..., desc=..., nocapture=<optimized out>, report_time=<optimized out>, runnable_test=..., monitor_ch=..., time_opts=...) at library/test/src/lib.rs:655
#15 0x0000555555582bba in test::run_test::{closure#0} () at library/test/src/lib.rs:576
#16 test::run_test::{closure#1} () at library/test/src/lib.rs:606
#17 std::sys::backtrace::__rust_begin_short_backtrace<test::run_test::{closure_env#1}, ()> (f=...) at library/std/src/sys/backtrace.rs:152
#18 0x0000555555598911 in std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure#0}<test::run_test::{closure_env#1}, ()> () at library/std/src/thread/mod.rs:564
#19 core::panic::unwind_safe::{impl#23}::call_once<(), std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<test::run_test::{closure_env#1}, ()>> (self=<error reading variable: Cannot access memory at address 0x18>) at library/core/src/panic/unwind_safe.rs:272
#20 std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<test::run_test::{closure_env#1}, ()>>, ()> (data=<error reading variable: Cannot access memory at address 0x0>) at library/std/src/panicking.rs:584
#21 std::panicking::try<(), core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<test::run_test::{closure_env#1}, ()>>> (f=...) at library/std/src/panicking.rs:547
#22 std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<test::run_test::{closure_env#1}, ()>>, ()> (f=...) at library/std/src/panic.rs:358
#23 std::thread::{impl#0}::spawn_unchecked_::{closure#1}<test::run_test::{closure_env#1}, ()> () at library/std/src/thread/mod.rs:562
#24 core::ops::function::FnOnce::call_once<std::thread::{impl#0}::spawn_unchecked_::{closure_env#1}<test::run_test::{closure_env#1}, ()>, ()> () at library/core/src/ops/function.rs:250
#25 0x00005555555d494b in alloc::boxed::{impl#28}::call_once<(), dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global> (self=..., args=<optimized out>) at library/alloc/src/boxed.rs:1993
#26 alloc::boxed::{impl#28}::call_once<(), alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global>, alloc::alloc::Global> (self=0x55555565e340, args=<optimized out>) at library/alloc/src/boxed.rs:1993
#27 std::sys::pal::unix::thread::{impl#2}::new::thread_start (main=0x55555565e340) at library/std/src/sys/pal/unix/thread.rs:106
#28 0x00007ffff7d3babd in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#29 0x00007ffff7db97b8 in ?? () from /lib/x86_64-linux-gnu/libc.so.6

So it is using avx which is not in the Debian baseline:

https://wiki.debian.org/ArchitectureSpecificsMemo#amd64

As far as I can see the executable is not shipped in the binary package
and we can use a different machine for reproduce.d.n so setting to
minor.

Cheers Jochen



More information about the Pkg-rust-maintainers mailing list