rust-gio: armhf autopkgtest failure

Bug #2021531 reported by Jeremy Bícha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rust-gio (Ubuntu)
Invalid
High
Simon Chopin
rust-glib (Ubuntu)
Fix Released
High
Zixing Liu
rustc (Ubuntu)
Invalid
High
Zixing Liu

Bug Description

rust-gio 0.16.7-1 has autopkgtest failures on armhf

https://autopkgtest.ubuntu.com/packages/r/rust-gio/mantic/armhf
https://ci.debian.net/packages/r/rust-gio/unstable/armhf/

This issue is a blocker for the ongoing rust-gtk 0.5 transition.

Revision history for this message
Simon Chopin (schopin) wrote (last edit ):
Download full text (9.1 KiB)

The failing test is subclass::async_initable::tests::test_async_initable_new_failure

It is *supposed* to panic, so there's a high probability the issue is in rustc rather than in rust-gio.

Stack trace at the SIGABRT site:

#4 0xf7c155ac in __GI_abort () at abort.c:79
#5 0x0059b6a0 in std::sys::unix::abort_internal () at library/std/src/sys/unix/mod.rs:347
#6 0x0059e180 in std::panicking::rust_panic (msg=...) at library/std/src/panicking.rs:738
#7 0x0059df04 in std::panicking::rust_panic_with_hook (payload=..., message=..., location=0x613e84, can_unwind=true) at library/std/src/panicking.rs:706
#8 0x005ad534 in std::panicking::begin_panic_handler::{closure#0} () at library/std/src/panicking.rs:579
#9 0x005ad36c in std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::{closure_env#0}, !> (f=...) at library/std/src/sys_common/backtrace.rs:137
#10 0x0059da94 in std::panicking::begin_panic_handler (info=0xf6af89c4) at library/std/src/panicking.rs:575
#11 0x004122f8 in core::panicking::panic_fmt (fmt=...) at library/core/src/panicking.rs:64
#12 0x0056c33c in glib::object::{impl#35}::new_internal::{closure#2} () at src/object.rs:1595
#13 0x00570b54 in core::option::Option<&glib::param_spec::ParamSpec>::unwrap_or_else<&glib::param_spec::ParamSpec, glib::object::{impl#35}::new_internal::{closure_env#2}> (self=..., f=...)
    at /build/rustc-IOgo9m/rustc-1.67.1+dfsg0ubuntu1/library/core/src/option.rs:828
#14 0x0056be00 in glib::object::Object::new_internal (type_=..., properties=...) at src/object.rs:1592
#15 0x0044cbb8 in gio::auto::async_initable::AsyncInitable::with_type_future (type_=..., properties=..., io_priority=...) at src/async_initable.rs:98
#16 0x00483c78 in gio::auto::async_initable::AsyncInitable::new_future<gio::subclass::async_initable::tests::AsyncInitableTestType> (properties=..., io_priority=...) at src/async_initable.rs:45
#17 0x00429f28 in gio::subclass::async_initable::tests::test_async_initable_new_failure::{async_block#0} () at src/subclass/async_initable.rs:296
#18 0x004a6bc4 in glib::main_context_futures::{impl#8}::block_on::{async_block#0}<gio::subclass::async_initable::tests::test_async_initable_new_failure::{async_block_env#0}> () at /usr/share/cargo/registry/glib-0.16.7/src/main_context_futures.rs:312
#19 0x0057369c in futures_task::future_obj::{impl#4}::poll<()> (self=..., cx=0xf6af93a8) at /usr/share/cargo/registry/futures-task-0.3.21/src/future_obj.rs:84
#20 0x0056f28c in glib::main_context_futures::{impl#0}::poll (self=..., ctx=0xf6af93a8) at src/main_context_futures.rs:32
#21 0x0056f928 in glib::main_context_futures::{impl#7}::poll::{closure#0} () at src/main_context_futures.rs:233
#22 0x00572824 in glib::auto::main_context::MainContext::with_thread_default<core::task::poll::Poll<()>, glib::main_context_futures::{impl#7}::poll::{closure_env#0}> (self=0xf6af94c0, func=...) at src/main_context.rs:156
#23 0x0056f834 in glib::main_context_futures::TaskSource::poll (self=0xf4b008d0) at src/main_context_futures.rs:226
#24 0x0056f2e4 in glib::main_context_futures::TaskSource::dispatch (source=0xf4b008d0, callback=..., _user_data=0x0) at src/main_context_futures.rs:67
#25 0xf7db1e...

Read more...

Simon Chopin (schopin)
tags: added: rls-mm-incoming
Changed in rustc (Ubuntu):
status: New → Confirmed
Steve Langasek (vorlon)
description: updated
Revision history for this message
Julian Andres Klode (juliank) wrote :

Simon to patch out test
Zixing to investigate rustc failure.

tags: added: foundations-todo
removed: rls-mm-incoming
Changed in rust-gio (Ubuntu):
assignee: nobody → Zixing Liu (liushuyu-011)
Changed in rustc (Ubuntu):
assignee: nobody → Zixing Liu (liushuyu-011)
Changed in rust-gio (Ubuntu):
assignee: Zixing Liu (liushuyu-011) → Simon Chopin (schopin)
Changed in rustc (Ubuntu):
importance: Undecided → High
Revision history for this message
Zixing Liu (liushuyu-011) wrote (last edit ):

I have investigated this issue and determined this is a rust-glib (note, not rustc or rust-gio) issue which has been fixed upstream.

It looked like a rustc/Rust std bug because the FFI wrapper inside rust-gio corrupted the stack so severely that libunwind could not call the clean-up function (it returned URC_FAILURE and transferred control back to the program). The Rust std panic handler did not expect this to happen (unwind clean-up will terminate the program, it should not return when the unwinding succeeds).

This only happened on armhf because URC_FAILURE is ARM-specific (and when using EHABI, see
 Chapter 8 in https://github.com/ARM-software/abi-aa/releases/download/2021Q1/ehabi32.pdf).

I will submit a backported patch in a moment.

Revision history for this message
Zixing Liu (liushuyu-011) wrote :
Changed in rustc (Ubuntu):
status: Confirmed → Invalid
Changed in rust-glib (Ubuntu):
importance: Undecided → High
status: New → Confirmed
assignee: nobody → Zixing Liu (liushuyu-011)
Revision history for this message
Zixing Liu (liushuyu-011) wrote :
Jeremy Bícha (jbicha)
Changed in rust-glib (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "0001-glib-support-return-values-and-catching-panics-in-sp.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Simon Chopin (schopin) wrote :

The patch has been merged and uploaded in Debian by Jeremy, I've sync-ed it to mantic-proposed.

Changed in rust-gio (Ubuntu):
status: Triaged → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rust-glib - 0.16.7-3

---------------
rust-glib (0.16.7-3) unstable; urgency=medium

  * Package glib 0.16.7 from crates.io using debcargo 2.6.0

 -- Matthias Geiger <email address hidden> Sun, 25 Jun 2023 20:53:44 +0200

Changed in rust-glib (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.