Skip to content
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

stacker's smoke test fails on mips64el-unknown-linux-gnuabi64 #85

Open
jamessan opened this issue Apr 2, 2024 · 4 comments
Open

stacker's smoke test fails on mips64el-unknown-linux-gnuabi64 #85

jamessan opened this issue Apr 2, 2024 · 4 comments

Comments

@jamessan
Copy link

jamessan commented Apr 2, 2024

Debian's mips64el rust-stacker package is failing to build due to the smoke test failing:

     Running `/<<PKGBUILDDIR>>/target/mips64el-unknown-linux-gnuabi64/debug/deps/smoke-983e0e8761f2ceb1`

running 5 tests
error: test failed, to rerun pass `--test smoke`

Caused by:
  process didn't exit successfully: `/<<PKGBUILDDIR>>/target/mips64el-unknown-linux-gnuabi64/debug/deps/smoke-983e0e8761f2ceb1` (signal: 11, SIGSEGV: invalid memory reference)
dh_auto_test: error: /usr/share/cargo/bin/cargo test --all returned exit code 101

I was able to reproduce it on one of the mips64el systems Debian has available (and locally via qemu) and this is the backtrace:

#0  _Unwind_GetPtr (context=0xfff4242070, index=7) at ../../../src/libgcc/unwind-dw2.c:249
#1  uw_update_context_1 (context=0xfff4242ef0, fs=0xfff42427f0) at ../../../src/libgcc/unwind-dw2.c:1174
#2  0x000000fff4e2ecfc in uw_update_context (context=0xfff4242ef0, fs=0xfff42427f0) at ../../../src/libgcc/unwind-dw2.c:1267
#3  _Unwind_Backtrace (trace=0xaaae2188f8 <std::backtrace_rs::backtrace::libunwind::trace::trace_fn>, trace_argument=0xfff4243718) at ../../../src/libgcc/unwind.inc:326
#4  0x000000aaae207df8 in std::backtrace_rs::backtrace::libunwind::trace (cb=...) at library/std/src/../../backtrace/src/backtrace/libunwind.rs:93
#5  std::backtrace_rs::backtrace::trace_unsynchronized<std::sys_common::backtrace::_print_fmt::{closure_env#1}> (cb=...) at library/std/src/../../backtrace/src/backtrace/mod.rs:66
#6  std::sys_common::backtrace::_print_fmt (print_fmt=std::backtrace_rs::print::PrintFmt::Short, fmt=<optimized out>) at library/std/src/sys_common/backtrace.rs:65
#7  std::sys_common::backtrace::_print::{impl#0}::fmt (self=<optimized out>, fmt=<optimized out>) at library/std/src/sys_common/backtrace.rs:44
#8  0x000000aaae25ef8c in core::fmt::write (output=..., args=...) at library/core/src/fmt/mod.rs:1254
#9  0x000000aaae245a98 in std::io::Write::write_fmt<alloc::vec::Vec<u8, alloc::alloc::Global>> (self=<optimized out>, fmt=...) at library/std/src/io/mod.rs:1698
#10 0x000000aaae207adc in std::sys_common::backtrace::_print (w=..., format=std::backtrace_rs::print::PrintFmt::Short) at library/std/src/sys_common/backtrace.rs:47
#11 std::sys_common::backtrace::print (w=..., format=<optimized out>) at library/std/src/sys_common/backtrace.rs:34
#12 0x000000aaae2124a4 in std::panicking::default_hook::{closure#1} (err=...) at library/std/src/panicking.rs:266
#13 0x000000aaae211d88 in std::panicking::default_hook (info=<optimized out>) at library/std/src/panicking.rs:285
#14 0x000000aaae20c474 in core::ops::function::Fn::call<fn(&core::panic::panic_info::PanicInfo), (&core::panic::panic_info::PanicInfo)> () at library/core/src/ops/function.rs:79
#15 0x000000aaae19f7a8 in alloc::boxed::{impl#47}::call<(&core::panic::panic_info::PanicInfo), (dyn core::ops::function::Fn<(&core::panic::panic_info::PanicInfo), Output=()> + core::marker::Send + core::marker::Sync), alloc::alloc::Global> (self=0xaab9d93540, args=...) at library/alloc/src/boxed.rs:1987
#16 test::test_main::{closure#0} (info=<optimized out>) at library/test/src/lib.rs:134
#17 0x000000aaae213088 in alloc::boxed::{impl#47}::call<(&core::panic::panic_info::PanicInfo), (dyn core::ops::function::Fn<(&core::panic::panic_info::PanicInfo), Output=()> + core::marker::Send + core::marker::Sync), alloc::alloc::Global> (self=<optimized out>, args=...) at library/alloc/src/boxed.rs:1987
#18 std::panicking::rust_panic_with_hook (payload=..., message=..., location=<optimized out>, can_unwind=<optimized out>) at library/std/src/panicking.rs:695
#19 0x000000aaae187ebc in std::panicking::begin_panic::{closure#0}<&str> () at /usr/src/rustc-1.70.0/library/std/src/panicking.rs:611
#20 0x000000aaae18421c in std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic::{closure_env#0}<&str>, !> (f=...)
    at /usr/src/rustc-1.70.0/library/std/src/sys_common/backtrace.rs:150
#21 0x000000aaae187db4 in std::panicking::begin_panic<&str> (msg=...) at /usr/src/rustc-1.70.0/library/std/src/panicking.rs:610
#22 0x000000aaae195c68 in smoke::catch_panic_leaf::{closure#0}::{closure#0} () at tests/smoke.rs:92
#23 0x000000aaae188440 in std::panicking::try::do_call<smoke::catch_panic_leaf::{closure#0}::{closure_env#0}, ()> (data=0xfff4243cd8)
    at /usr/src/rustc-1.70.0/library/std/src/panicking.rs:485
#24 0x000000aaae188e28 in __rust_try ()
#25 0x000000aaae188294 in std::panicking::try<(), smoke::catch_panic_leaf::{closure#0}::{closure_env#0}> (f=...) at /usr/src/rustc-1.70.0/library/std/src/panicking.rs:449
#26 0x000000aaae190dcc in std::panic::catch_unwind<smoke::catch_panic_leaf::{closure#0}::{closure_env#0}, ()> (f=...) at /usr/src/rustc-1.70.0/library/std/src/panic.rs:140
#27 0x000000aaae195b08 in smoke::catch_panic_leaf::{closure#0} () at tests/smoke.rs:92
#28 0x000000aaae187d28 in stacker::grow::{closure#0}<(), smoke::catch_panic_leaf::{closure_env#0}> () at src/lib.rs:79
#29 0x000000aaae200084 in core::ops::function::impls::{impl#4}::call_once<(), dyn core::ops::function::FnMut<(), Output=()>> (self=..., args=())
    at /usr/src/rustc-1.70.0/library/core/src/ops/function.rs:310
#30 0x000000aaae200054 in core::panic::unwind_safe::{impl#23}::call_once<(), &mut dyn core::ops::function::FnMut<(), Output=()>> (self=...)
    at /usr/src/rustc-1.70.0/library/core/src/panic/unwind_safe.rs:271
#31 0x000000aaae1ffdcc in std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<&mut dyn core::ops::function::FnMut<(), Output=()>>, ()> (data=0xfff4243eb0)
    at /usr/src/rustc-1.70.0/library/std/src/panicking.rs:485
#32 0x000000aaae1fff90 in __rust_try ()
#33 0x000000aaae1ffbfc in std::panicking::try<(), core::panic::unwind_safe::AssertUnwindSafe<&mut dyn core::ops::function::FnMut<(), Output=()>>> (f=...)
    at /usr/src/rustc-1.70.0/library/std/src/panicking.rs:449
#34 0x000000aaae1ff29c in std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<&mut dyn core::ops::function::FnMut<(), Output=()>>, ()> (f=...)
    at /usr/src/rustc-1.70.0/library/std/src/panic.rs:140
#35 0x000000aaae1febd0 in stacker::_grow::{closure#0} () at src/lib.rs:250
#36 0x000000aaae1fd0dc in psm::on_stack::with_on_stack<core::option::Option<alloc::boxed::Box<(dyn core::any::Any + core::marker::Send), alloc::alloc::Global>>, stacker::_grow::{closure_env#0}> (callback_ptr=1099317534008, return_ptr=1099317534024) at /usr/share/cargo/registry/psm-0.1.21/src/lib.rs:190
#37 0x000000aaae2001d4 in rust_psm_on_stack () at src/arch/mips64_eabi.s:76

Please let me know if there's any additional information needed. Cheers!

@nagisa
Copy link
Member

nagisa commented Apr 2, 2024

Hm, this looks like the libgcc's unwinder gets confused, but then gdb was able to stomach whatever that's going wrong...

I imagine its going to be a problem with the .cfi_ annotations. I would say that it ain't a big deal, except that panics can invoke this same implementation of unwind and that could get pretty nasty quite quick...

@mr-c
Copy link

mr-c commented Apr 5, 2024

@nagisa Thanks, should we skip the test on mips64el or wait for a fix?

@nagisa
Copy link
Member

nagisa commented Apr 5, 2024

I think skipping is reasonable enough, I'm not currently working on addressing this and I don't know when I'll have the capacity to.

@mr-c
Copy link

mr-c commented Apr 5, 2024

Thank you @nagisa , I updated Debian's package to skip the smoke tests on mips64el

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants