Closed Bug 1837824 Opened 1 year ago Closed 6 months ago

Nightly fails to start in macOS Sonoma virtual machine | Crash in [@ mozilla::widget::GfxInfo::GetDeviceInfo]

Categories

(Core :: Widget: Cocoa, defect, P3)

Firefox 116
Desktop
macOS
defect

Tracking

()

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: sam, Assigned: ran1, NeedInfo)

References

(Blocks 1 open bug)

Details

(Whiteboard: [tbird crash])

Crash Data

Attachments

(2 files, 2 obsolete files)

Hello,
I installed macOS Sonoma in a virtual machine, using VirtualBuddy, which uses Apple's built-in virtualization frameworks. However, Nightly does not start in it, with this crash. Given the nature of the assert, I should note a few items:

  • All transparency effects in the OS are working, indicating graphics acceleration is working.
  • System Information does not list any GPUs.

Crash report: https://crash-stats.mozilla.org/report/index/dfc67b44-dffb-4b83-91ff-b776f0230610

MOZ_CRASH Reason: MOZ_DIAGNOSTIC_ASSERT(mNumGPUsDetected > 0) (Failed to detect any GPUs)

Top 10 frames of crashing thread:

0  XUL  mozilla::widget::GfxInfo::GetDeviceInfo  widget/cocoa/GfxInfo.mm
0  XUL  mozilla::widget::GfxInfo::Init  widget/cocoa/GfxInfo.mm:176
1  XUL  mozilla::xpcom::CreateInstanceImpl  xpcom/components/StaticComponents.cpp:12795
2  XUL  mozilla::xpcom::StaticModule::CreateInstance const  xpcom/components/StaticComponents.cpp:13161
2  XUL    xpcom/components/nsComponentManager.cpp:184
2  XUL  nsComponentManagerImpl::GetServiceLocked  xpcom/components/nsComponentManager.cpp:971
2  XUL  nsComponentManagerImpl::GetServiceByContractID  xpcom/components/nsComponentManager.cpp:1160
3  XUL  CallGetService  xpcom/components/nsComponentManagerUtils.cpp:61
3  XUL  xpc::CIGSHelper  js/xpconnect/src/XPCJSID.cpp:585
4  XUL  CallJSNative  js/src/vm/Interpreter.cpp:486
Component: Graphics: WebRender → Widget: Cocoa

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.
:spohl, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(spohl.mozilla.bugs)
Whiteboard: [tbird crash]

Two different users, basically confirming comment 0:

  • Attempted to run in a macOS VM (Parallels Desktop 18, with macOS Sonoma beta 1; appears to be an issue where the underlying macOS doesn’t find a GPU — and accordingly, Firefox doesn’t run. It appears that while there isn’t hardware graphics, Parallels is somewhat filling in the gap.
  • First launch of Firefox Nightly on a fresh new macOS Sonoma beta 1 virtual machine within macOS Ventura.

Detect GPUs on macOS, including VMs, by searching for IOAccelerators.

This replaces checking for VGA devices, and AGXAccelerator devices on aarch64.

This also removes an unused item from sandbox IOKit property lists.

Assignee: nobody → ran1
Status: NEW → ASSIGNED

Hello, I found a fix to detect virtualization framework GPUs and have submitted a patch for it. This should work for Parallels, though I haven't tested it.

Attachment #9345688 - Attachment is obsolete: true
Assignee: ran1 → nobody
Status: ASSIGNED → NEW

The bug is linked to a topcrash signature, which matches the following criteria:

  • Top 20 desktop browser crashes on beta (startup)
  • Top 5 desktop browser crashes on Mac on beta (startup)

For more information, please visit BugBot documentation.

The registryID property used to get a Metal GPU's IOService is not available before macOS 10.13.

Assignee: nobody → ran1
Status: NEW → ASSIGNED
Attachment #9347549 - Attachment is obsolete: true

Adds a search for AppleParavirtGPUs found on macOS virtual machines.

Based on the topcrash criteria, the crash signature linked to this bug is not a topcrash signature anymore.

For more information, please visit BugBot documentation.

Sorry for removing the keyword earlier but there is a recent change in the ranking, so the bug is again linked to a topcrash signature, which matches the following criterion:

  • Top 5 desktop browser crashes on Mac on beta (startup)

For more information, please visit BugBot documentation.

Interestingly, these crashes don't happen in the Firefox release version, in a UTM virtual machine made using Apple's Virtualization framework. I tested using UTM 4.3.5 (the current version), with Firefox 117, on an Apple Silicon Mac running macOS 14 Beta 7 (build 23A5337a, also the current version). My VM was created using the same version of macOS (macOS 14 Beta 7).

The first page with actual web content takes a long time to load, though -- about five seconds.

Edit: But they do happen with today's mozilla-central nightly:

bp-941c9ca8-b763-4746-8be6-9cd2a0230905
bp-04c36830-6338-40cc-9088-715900230905

(In reply to Steven Michaud [:smichaud] (Retired) from comment #11)

Interestingly, these crashes don't happen in the Firefox release version, in a UTM virtual machine made using Apple's Virtualization framework. I tested using UTM 4.3.5 (the current version), with Firefox 117, on an Apple Silicon Mac running macOS 14 Beta 7 (build 23A5337a, also the current version). My VM was created using the same version of macOS (macOS 14 Beta 7).

The first page with actual web content takes a long time to load, though -- about five seconds.

Edit: But they do happen with today's mozilla-central nightly:

bp-941c9ca8-b763-4746-8be6-9cd2a0230905
bp-04c36830-6338-40cc-9088-715900230905

The crash is a MOZ_DIAGNOSTIC_ASSERT which is only compiled in on DEBUG, Nightly, or early Beta builds. Does the posted patch work for you?

Does the posted patch work for you?

Yes, it does. It doesn't crash when I run it in my macOS 14 VM.

But RAN1's patch doesn't apply to current trunk. Here's an updated version.

Based on the topcrash criteria, the crash signature linked to this bug is not a topcrash signature anymore.

For more information, please visit BugBot documentation.

Sorry for removing the keyword earlier but there is a recent change in the ranking, so the bug is again linked to a topcrash signature, which matches the following criteria:

  • Top 20 desktop browser crashes on beta (startup)
  • Top 5 desktop browser crashes on Mac on beta (startup)

For more information, please visit BugBot documentation.

Based on the topcrash criteria, the crash signature linked to this bug is not a topcrash signature anymore.

For more information, please visit BugBot documentation.

This keeps falling in and out of the Mac topcrasher list. We have a patch for it, and it's been approved. Can we get it landed? :-)

Flags: needinfo?(ran1)
Flags: needinfo?(haftandilian)

Thanks for flagging this, Steven.

@RAN1, the patch needs a rebase to merge cleanly. Are you available to do that today? If not, I should be able to do the rebase and push the patch attributing it to you.

Attachment #9348748 - Attachment description: Bug 1837824 - Detect Mac VM GPUs r?jrmuizel → Bug 1837824 - Nightly fails to start in macOS Sonoma virtual machine r=haik,jrmuizel
Pushed by haftandilian@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/75cb4eab7ed3
Nightly fails to start in macOS Sonoma virtual machine r=jrmuizel,haik
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
Flags: needinfo?(haftandilian)
Severity: -- → S3
Flags: needinfo?(spohl.mozilla.bugs)
Priority: -- → P3
QA Whiteboard: [qa-121b-p2]

These crashes also happen on Intel Macs, when running in a VMware VM:

bp-6342a45d-b51e-40f8-a710-a9e150231128
bp-c8b13c24-ca4b-4f71-99f0-88f420231128

My VM is running macOS 12.7.1 (build 21G920).

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Or maybe I should just open a new bug. I'll do that.

Status: REOPENED → RESOLVED
Closed: 7 months ago6 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: