Closed Bug 1736384 Opened 3 years ago Closed 3 years ago

Regression: FF segfault with GTK_DEBUG=interactive (GTK inspector)

Categories

(Core :: Widget: Gtk, defect, P2)

defect

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox94 --- wontfix
firefox95 --- wontfix
firefox96 --- fixed

People

(Reporter: valentin, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Launching Firefox with GTK_DEBUG=interactive results in a segfault.

I tracked it down to this commit (not sure exactly why):

Bug 1721347 - Add OS theme info to about:support.

I’m using GTK 3.24.5-5 on a x86_64 Debian 10 system.

See also Thunderbird’s bug 1736369.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: General → Widget: Gtk
Product: Firefox → Core

Can you please backtrace of the crash? You can find it at about:crashes - please submit it.
Thanks.

Flags: needinfo?(valentin)

(In reply to Martin Stránský [:stransky] (ni? me) from comment #2)

Can you please backtrace of the crash?

Sure: there you go.

Flags: needinfo?(valentin)

Will look at it, Thanks.

Flags: needinfo?(stransky)

This is a recursion in gfxPlatform::Init(), we call gtk_init(nullptr, nullptr) here, then mozilla::widget::IMContextWrapper::OnThemeChanged() which leads back to gfxPlatform::Init().

Flags: needinfo?(stransky)

Hm, may the new LookAndFeel::GetThemeInfo() call at nsSystemInfo::Init() cause it?

Priority: -- → P2
Status: UNCONFIRMED → NEW
Ever confirmed: true
Regressed by: 1721347
Has Regression Range: --- → yes

I can reproduce it but I'm not sure where to put the check we're already in the nested loop. Emilio, any idea?
Thanks.

Flags: needinfo?(emilio)

I can't repro on a debug build, does this need an opt build or something?

Flags: needinfo?(stransky)

I don't know whether all this style provider business is still
necessary looking at bug 1461307, but this should help by avoiding
initializing LookAndFeel too early in any case.

Assignee: nobody → emilio
Status: NEW → ASSIGNED

I think that should help, but I couldn't repro the bug so if you could confirm it'd be great.

Flags: needinfo?(emilio)

Set release status flags based on info from the regressing bug 1721347

(In reply to Emilio Cobos Álvarez (:emilio) from comment #9)

I can't repro on a debug build, does this need an opt build or something?

I can reproduce that on nightly binaries produced by Mozilla under Wayland / Fedora 34.

Flags: needinfo?(stransky)
Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/6cebf8df6b78
Don't create IMContextWrapper GTK style provider unnecessarily. r=stransky

I can reproduce it using daily builds:

$ mozregression -c 'sh -c "GTK_DEBUG=interactive {binary}"'
INFO: Using local file: /tmp/mozregression/persist/2021-11-09--mozilla-central--firefox-96.0a1.en-US.linux-x86_64.tar.bz2
INFO: Running mozilla-central build for 2021-11-09
INFO: application_buildid: 20211109190508
 INFO: application_version: 96.0a1
 INFO: Running test command: `sh -c "GTK_DEBUG=interactive /tmp/tmplm_4d2pn/firefox/firefox"`
ExceptionHandler::GenerateDump cloned child ExceptionHandler::WaitForContinueSignal waiting for continue signal...
10832
ExceptionHandler::SendContinueSignalToChild sent continue signal to child
INFO: Test command result: 11 (build is bad)

This is on two GNU/Linux x86_64 installs, one Debian oldstable and one Fedora rawhide.

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch

The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(emilio)

Martin can you confirm the fix? Should we uplift this?

Flags: needinfo?(emilio) → needinfo?(stransky)

Yes, I can confirm the fix. I don't thin we need to uplift it as GTK_DEBUG=interactive is a debugging and rather unused feature.

Flags: needinfo?(stransky)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: