Closed Bug 1450111 Opened 6 years ago Closed 6 years ago

Crash in mozalloc_abort | abort | core::result::unwrap_failed<T> | audioipc_client::context::{{impl}}::init

Categories

(Core :: Audio/Video: cubeb, defect, P2)

Unspecified
Linux
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: mccr8, Assigned: u480271)

Details

(Keywords: crash)

Crash Data

This bug was filed from the Socorro interface and is
report bp-d81139ba-bae3-4fa8-a8c9-6c3aa0180323.
=============================================================

Top 10 frames of crashing thread:

0 firefox mozalloc_abort memory/mozalloc/mozalloc_abort.cpp:33
1 firefox abort memory/mozalloc/mozalloc_abort.cpp:80
2 libxul.so std::panicking::rust_panic src/libpanic_abort/lib.rs:59
3 libxul.so std::panicking::rust_panic_with_hook src/libstd/panicking.rs:593
4 libxul.so std::panicking::begin_panic<alloc::string::String> src/libstd/panicking.rs:538
5 libxul.so std::panicking::begin_panic_fmt src/libstd/panicking.rs:522
6 libxul.so core::panicking::panic_fmt src/libstd/panicking.rs:498
7 libxul.so core::result::unwrap_failed<std::io::error::Error> src/libcore/macros.rs:23
8 libxul.so audioipc_client::context::{{impl}}::init src/libcore/result.rs:782
9 libxul.so audioipc_client::audioipc_client_init third_party/rust/cubeb-backend/src/capi.rs:69

=============================================================

I only see 4 of these crashes on Linux, from two installations. The crash reason is this:

called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 11, message: "Resource temporarily unavailable" } } 

(For two of them, the message is in Spanish.)

The line it is crashing on is this:
  let context = _try!(CTX::init(context_name));

So basically it seems like the code could try to handle this error gracefully, rather than just crashing.
Rank: 15
Flags: needinfo?(kinetik)
Flags: needinfo?(dglastonbury)
Priority: -- → P2
Huh, interesting. I thought that should handle things gracefully. I'll that a look.
Assignee: nobody → dglastonbury
Flags: needinfo?(dglastonbury)
Flags: needinfo?(kinetik)
Curious that code 11, "Resource temporarily unavailable", is EAGAIN.  I'm trying to disassemble where the panic is arising from but because of Rust's deep inlining the addresses in the stack aren't pointing to the code where the panic is.
Looks like this is coming from std::sys::unix::thread::Thread::new(). EAGAIN appears to indicate that the system was unable to create anymore threads.  The work in Bug 1446233 should help here but we should also not panic.
futures-cpupool doesn't handle thread creation failure.

https://github.com/rust-lang-nursery/futures-rs/pull/939
Closing because no crashes reported for 12 weeks.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.