Closed Bug 1560877 Opened 5 years ago Closed 4 years ago

Crash in [@ __GI___setrlimit]

Categories

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

Unspecified
Linux
defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox-esr60 --- unaffected
firefox67 --- unaffected
firefox67.0.1 --- unaffected
firefox68 --- unaffected
firefox69 --- disabled
firefox75 --- disabled
firefox76 --- disabled
firefox77 --- disabled
firefox78 --- disabled

People

(Reporter: calixte, Assigned: padenot)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: crash, regression)

Crash Data

This bug is for crash report bp-9f14f576-9e54-4160-8d09-319ce0190623.

Top 10 frames of crashing thread:

0 libc-2.28.so __GI___setrlimit 
1 libxul.so audio_thread_priority::promote_current_thread_to_real_time third_party/rust/audio_thread_priority/src/lib.rs:73
2 libxul.so audioipc_client::context::register_thread media/audioipc/client/src/context.rs:89
3 libxul.so audioipc::core::spawn_thread::{{closure}}::{{closure}} media/audioipc/audioipc/src/core.rs:85
4 libxul.so std::sys_common::backtrace::__rust_begin_short_backtrace src/libstd/sys_common/backtrace.rs:136
5 libxul.so std::thread::Builder::spawn_unchecked::{{closure}} src/libstd/thread/mod.rs:469
6 libxul.so call_once<>> src/liballoc/boxed.rs:702
7 libxul.so thread_start src/libstd/sys/unix/thread.rs:80
8 libpthread-2.28.so libpthread-2.28.so@0x7a9c 
9 libc-2.28.so __GI___clone 

There are 10 crashes (from 2 installations) in nightly 69 starting with buildid 20190622093934. In analyzing the backtrace, the regression may have been introduced by patch [1] to fix bug 1429847.

[1] https://hg.mozilla.org/mozilla-central/rev?node=15fadc5ad294

Flags: needinfo?(padenot)

This is seccomp preventing a call to setrlimit. It's a bit weird that we're reaching this point: dbus should have failed to initialize instead, and we should have returned early. This seem to happen if the user has changed the default sandbox value: sockets are allowed, but not setrlimit.

Flags: needinfo?(padenot)
Assignee: nobody → padenot
Priority: -- → P2
Crash Signature: [@ __GI___setrlimit] → [@ __GI___setrlimit] [@ __setrlimit64]

There was a bit of a spike in the 6-27 build, but since then there has been relatively few crashes.

I need to figure out how to use gecko prefs from rust, and then this is easy.

maybe like

fn eval_prefers_color_scheme(device: &Device, query_value: Option<PrefersColorScheme>) -> bool {
    let prefers_color_scheme =
        unsafe { bindings::Gecko_MediaFeatures_PrefersColorScheme(device.document()) };
    match query_value {
        Some(v) => prefers_color_scheme == v,                                                                                   
        None => prefers_color_scheme != PrefersColorScheme::NoPreference,
    }
}
    /// Returns whether document colors are enabled.
    #[inline]
    pub fn use_document_colors(&self) -> bool {
        let doc = self.document();
        if doc.mIsBeingUsedAsImage() {
            return true;
        }
        let document_color_use =
            unsafe { structs::StaticPrefs::sVarCache_browser_display_document_color_use };
        let prefs = self.pref_sheet_prefs();
        match document_color_use {                                                                                              
            1 => true,
            2 => prefs.mIsChrome,
            _ => !prefs.mUseAccessibilityTheme,
        }
    }

I don't know, I grep-ed

(In reply to Emma Humphries, Bugmaster ☕️🎸🧞‍♀️✨ (she/her) [:emceeaich] (UTC-8) needinfo? me from comment #7)

I can reproduce this crash reliably on Linux AMD64 Nightly going to https://slate.com/news-and-politics/2020/03/coronavirus-tsa-liquid-purell-paid-leave-rules.html?via=taps_top

Are any of your prefs prefixed with "security.sandbox.content" (except tempDirSuffix) set to a non-default value? Is that with autoplay permitted on the page or some media on the page playing? Do you have a link to a crash report, or is it identical to the initial report?

Flags: needinfo?(ehumphries)
  1. security.sandbox.content was reset to 2 (this is on a non-work machine) to try the dat:// protocol add-on.
  2. Autoplay is false
  3. https://crash-stats.mozilla.org/report/index/4b9a06f7-ec4a-44f7-8e42-6111e0200320
Flags: needinfo?(ehumphries)

Closing because no crashes reported for 12 weeks.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.