Closed Bug 1999029 Opened 8 months ago Closed 6 months ago

mozilla::detail::InvalidArrayIndex_CRASH | ElementAt | mozilla::widget::WaylandBuffer::IsAttached is still present on Fedora KDE with 144.0.2

Categories

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

Firefox 144
defect

Tracking

()

RESOLVED FIXED
149 Branch
Tracking Status
firefox148 --- wontfix
firefox149 --- fixed

People

(Reporter: arcadiy, Assigned: stransky)

References

(Blocks 2 open bugs)

Details

Crash Data

Attachments

(5 files, 1 obsolete file)

Crash Signature: mozilla::detail::InvalidArrayIndex_CRASH | ElementAt | mozilla::widget::WaylandBuffer::IsAttached
See Also: → 1990430

The bug has a crash signature, thus the bug will be considered confirmed.

Status: UNCONFIRMED → NEW
Ever confirmed: true

The severity field is not set for this bug.
:nika, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(nika)

:emilio, do you have any idea how this might still be happening?

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

Not sure, if this is fedora-only it's a bit suspicious. Martin, are you enabling something wayland-related in Fedora that could explain this? Maybe the array getting modified from another thread could be the other thing that explains it if it's not a miscompilation?

Component: XPCOM → Widget: Gtk
Flags: needinfo?(emilio) → needinfo?(stransky)

(In reply to Emilio Cobos Álvarez [:emilio] from comment #4)

Not sure, if this is fedora-only it's a bit suspicious. Martin, are you enabling something wayland-related in Fedora that could explain this? Maybe the array getting modified from another thread could be the other thing that explains it if it's not a miscompilation?

No, we don't ship any extra patches/features. But we use GCC+PGO+LTO to build Firefox. I've seen the bug coming from Thunderbird too and there may be other GCC regressions there.

Flags: needinfo?(stransky)

AFAIK The original bug is UAF but the new one looks like null crashes at wayland buffer management. But the crashes comes from Gnome/KDE/Sway so not may be compositor related and also affects Fedora 42/43 only (they may use the same GCC version).

Flags: needinfo?(stransky)

Let's try to add proper lock for the transactions access.

Duplicate of this bug: 2006220
Assignee: nobody → stransky
Status: NEW → ASSIGNED
Blocks: wayland
Flags: needinfo?(stransky)
Priority: -- → P3
Attachment #9530813 - Attachment is obsolete: true

The current is 146. Can this be backported to 146 or 147 please?

Duplicate of this bug: 2011120
Priority: P3 → P2

It's also possible that's another GCC/Fedora only bug similar to Bug 1990430.

If this one is GCC misscompilation bug it's related to this array:
https://searchfox.org/firefox-main/rev/e5219f2ad48f6b993c34fc25961e5900ffabfe65/widget/gtk/WaylandBuffer.h#89

AutoTArray<RefPtr<BufferTransaction>, 3> mBufferTransactions;

AutoTArray was created as copyable, so RefPtr may be the factor here?

GCC throws various nsTArray warnings for widget/gtk. Let's investigate and fix that first.

Blocks: 2011283
See Also: → 2011283

The patch landed in nightly and beta is affected.
:stransky, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(stransky)

Backported to Fedora 147.0 packages directly. Let's see if it helps as we have Fedora crashes only so far.

Flags: needinfo?(stransky)
Crash Signature: mozilla::detail::InvalidArrayIndex_CRASH | ElementAt | mozilla::widget::WaylandBuffer::IsAttached → [@ mozilla::detail::InvalidArrayIndex_CRASH | ElementAt | mozilla::widget::WaylandBuffer::IsAttached]

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

Backported to Fedora 147.0 packages directly. Let's see if it helps as we have Fedora crashes only so far.

Thank you! I've installed on the problem machine and waiting for crash reports (if any).

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

Backported to Fedora 147.0 packages directly. Let's see if it helps as we have Fedora crashes only so far.

:stransky, is there any need to uplift this to beta? Just wondering about the Fx148 status

Flags: needinfo?(stransky)

I'd like to report that the crashes continue, unfortunately.

Okay, then it looks like Fedora specific GCC bug then.

There's new Firefox update for Fedora with the patches backported:
https://bodhi.fedoraproject.org/updates/FEDORA-2026-9d760b70d5
Let's see if the volume goes down with the patches there.

The crash volume looks promising - I don't see crashes from builds installed after 2026-01-20 which is the one with backports.

(In reply to Arcadiy Ivanov from comment #27)

I'd like to report that the crashes continue, unfortunately.

Can you please install these builds and test:
https://bodhi.fedoraproject.org/updates/FEDORA-2026-7a3e7d9328
https://bodhi.fedoraproject.org/updates/FEDORA-2026-0e5dfe99f0

and if you see any crashes please submit crash ID here from about:crashes.
Thanks.

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

Hi

Sorry, I'm confused. Would you like me to try one and then another? They contain different patches? Or you want me to try the latest of the two?

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

(In reply to Arcadiy Ivanov from comment #33)

The latest crash is this: https://crash-stats.mozilla.org/report/index/d5b2fd11-fc5e-4afe-b6d9-3ab9b0260120

Please install latest package for your Fedora and try again. This is from the old one.

firefox-147.0.1-5 has the backported fixes:
https://bodhi.fedoraproject.org/updates/FEDORA-2026-b870bff523
https://bodhi.fedoraproject.org/updates/FEDORA-2026-4d2a7298e1

Flags: needinfo?(stransky)

As the patches here fixes the crash here it seems to affects Fedora only so we may not need to uplift them as they're pretty intrusive.

Thanks, but these looks different - I see it crashes at SurfacePoolWayland::ReturnBufferToPool () directly.

Flags: needinfo?(arcadiy)

The latest nightly experienced a different crash: https://bugzilla.mozilla.org/show_bug.cgi?id=2022411

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

Attachment

General

Created:
Updated:
Size: