Bug: Firefox hangs on startup randomly on macOS
Status: RESOLVED
Priority: --
Resolution: WORKSFORME
Created: 2022-02-01 10:12:25+00:00
Resolved: 2022-02-02 13:13:21+00:00

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.175 Safari/537.36

Steps to reproduce:

Just regular browsing, closing the browser and then starting it up (happens randomly).

Version: 96.0.3 (64-bit)


It does start in Troubleshooting mode. I was trying to figure out if it could be done by any extension but disabling all of them one by one (until none was enabled) yield no result.
I cleared history (browsing/download, cookies, cache, forms, offline side data) - nothing.
I closed all pages/session - still nothing.

Basically I can't start firefox normally now... I think that previously clearing everything worked but not this time. And I would prefer to avoid refreshing my configuration because that option sucks (not everything is transferred, firefox sync makes utter mess of bookmarks and startup page)


Actual results:

Instead of being able to browse firefox restores previous windows but doesn't load anything and just hangs with beach ball.



Expected results:

I should be able to browse...

Here's the stacktrace after force-close (I wanted to paste it here but there is a size limit so gist has to be): https://gist.github.com/woj-tek/9727c504c0289cb87d9feec743e335bc

```
Date/Time:        2022-02-01 10:42:11.395 +0100
End time:         2022-02-01 10:44:48.942 +0100
OS Version:       macOS 12.1 (Build 21C52)
Architecture:     arm64e
Report Version:   35
Incident Identifier: E78D8BE4-E525-4188-98E1-33EAB336C675
Share With Devs:  Yes

Data Source:      Stackshots
Shared Cache:     66C33C62-48A9-31E5-B8B5-7A71C9760D07 slid base address 0x184d90000, slide 0x4d90000
Shared Cache:     7B87B74E-726C-3672-8699-6F7BEAA1E114 slid base address 0x1f66fc000, slide 0x766fc000
Shared Cache:     E72A2011-6ACF-3F25-BFE7-730570330401 slid base address 0x7ff801100000, slide 0x1100000

Command:          firefox
Path:             /Applications/Firefox.app/Contents/MacOS/firefox
Identifier:       org.mozilla.firefox
Version:          96.0.3 (9622.1.26)
Team ID:          43AQ936H96
Architecture:     arm64
Parent:           launchd [1]
PID:              93884
Time Since Fork:  12424s

Event:            hang
Duration:         157.55s
Duration Sampled: 1.10s (process was unresponsive for 156 seconds before sampling)
Steps:            11 (100ms sampling interval)

Hardware model:   MacBookPro18,1
Active cpus:      10
HW page size:     16384
VM page size:     16384

Time Awake Since Boot: 1316437s
Time Since Wake:  337s

Fan speed:        0 rpm
Total CPU Time:   2.119s (3.2G cycles, 4.3G instructions, 0.75c/i)
Advisory levels:  Battery -> 3, User -> 2, ThermalPressure -> 0, Combined -> 2
Free disk space:  319.14 GB/926.35 GB, low space threshold 3072 MB

--------------------------------------------------
Timeline format: stacks are sorted chronologically
Use -i and -heavy to re-report with count sorting
--------------------------------------------------


Heaviest stack for the main thread of the target process:
  11  ??? [0x16d7a1310]
  11  ??? (XUL + 7926396) [0x11397327c]
  11  PR_WaitCondVar + 392 (libnss3.dylib + 700952) [0x103347218]
  11  __psynch_cvwait + 8 (libsystem_kernel.dylib + 20672) [0x1850650c0]
 *11  psynch_cvcontinue + 0 (pthread + 18048) [0xfffffe000a532180]


Process:          firefox (Firefox) [93884] [unique pid 391730]
UUID:             76D3F076-5464-3FF4-8F6D-C2AAEC98E278
Path:             /Applications/Firefox.app/Contents/MacOS/firefox
Identifier:       org.mozilla.firefox
Version:          96.0.3 (9622.1.26)
Team ID:          43AQ936H96
Shared Cache:     66C33C62-48A9-31E5-B8B5-7A71C9760D07 slid base address 0x184d90000, slide 0x4d90000
Architecture:     arm64
Parent:           launchd [1]
UID:              501
Footprint:        1525.18 MB
Time Since Fork:  12424s
Num samples:      11 (1-11)
CPU Time:         0.167s (270.8M cycles, 131.8M instructions, 2.06c/i)
Note:             Unresponsive for 156 seconds before sampling
Note:             5 idle work queue threads omitted

  Thread 0x9a3a5d    DispatchQueue "com.apple.main-thread"(1)    Thread name "GeckoMain"    11 samples (1-11)    priority 47 (base 47)
  <process frontmost, thread QoS user interactive (requested user interactive), process unclamped, process received importance donation from WindowServer [360], IO tier 0>
  11  ??? [0x16d7a1310] 1-11
    11  ??? (XUL + 7926396) [0x11397327c] 1-11
      11  PR_WaitCondVar + 392 (libnss3.dylib + 700952) [0x103347218] 1-11
        11  __psynch_cvwait + 8 (libsystem_kernel.dylib + 20672) [0x1850650c0] 1-11
         *11  psynch_cvcontinue + 0 (pthread + 18048) [0xfffffe000a532180] 1-11
…
```