ws4kp
ws4kp copied to clipboard
Consistent Firefox Crashing
Been encountering this consistently since the latest update. Curious if others face the same issue.
Web browser and OS: Mozilla Firefox 137.0 running on Raspbian 6.12.20+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.20-1+rpt1~bpo12+1 (2025-03-19) aarch64 GNU/Linux
Location for which you are viewing a forecast: 04011
AdapterDeviceID: 0x0441
AdapterDriverVendor: mesa/vc4
AdapterDriverVersion: 24.2.8.0
AdapterVendorID: 0x6c50
Add-ons: uBlock0%40raymondhill.net:1.63.2,jid1-TSgSxBhncsPBWQ%40jetpack:1.1.0,uanaughtylist%40raspberrypi.com:1.1,formautofill%40mozilla.org:1.0.1,pictureinpicture%40mozilla.org:1.0.0,webcompat%40mozilla.org:137.7.0,default-theme%40mozilla.org:1.4.1,addons-search-detection%40mozilla.com:2.0.0
AvailablePageFile: 0
AvailablePhysicalMemory: 169574400
AvailableSwapMemory: 174915584
AvailableVirtualMemory: 1144176640
BackgroundTaskMode: 0
BuildID: 20250327043313
ContentSandboxCapabilities: 119
ContentSandboxCapable: 1
ContentSandboxLevel: 4
CrashTime: 1743984414
DOMFissionEnabled: 1
DOMIPCEnabled: 1
DesktopEnvironment: lxde
EMCheckCompatibility: true
GpuSandboxLevel: 0
GraphicsNumActiveRenderers: 1
GraphicsNumRenderers: 1
HeadlessMode: 0
InstallTime: 1743983327
IsWayland: 0
LastInteractionDuration: 1017
LastStartupWasCrash: 0
LinuxUnderMemoryPressure: 0
NimbusEnrollments: persist-search-term-rollout-phase-1:control-rollout,product-insight-telemetry-via-server-knobs-rollout-release:control-rollout,upgrade-spotlight-rollout:treatment,address-autofill-desktop-pref-release-rollout:enable-address-autofill,encrypted-client-hello-fallback-mechanism:control,fpp-floating-point-protection-rollout-linux-only:control,fx-accounts-ping-release-rollout-2:control,disable-ads-startup-cache:control,us-rollout-compact-layout-thumbs-updown:rollout,extensions-migration-in-import-wizard-116-rollout:control,us-review-checker-rollout-v3:treatment-a,account-spotlight-modal-english-rollout-v2:rollout,unified-api-for-spocs-and-top-sites-controlled-rollout-for-release-133:control,certificate-transparency-desktop-rollout:certificate-transparency-enforced,ai-chatbot-rollout-in-the-old-sidebar:treatment-d,pdf-annotations-highlight-treatment-b-rollout:treatment-b,crlite-rollout:rollout,https-upgrades-fallback-time-bugfix:rollout,desktop-release-show-relay-to-all-browsers:next-sign-up-modal-cta,long-term-holdback-2025h1-growth-desktop:delivery,fx-view-discoverability-2025-rollout:treatment-b,default-ui-experiment-logo-in-corner-rollout:logo-in-corner,mozilla-vpn-in-private-browsing-treatment-d-rollout-en-only:treatment-d,pdf-annotations-signatures-ab-experiment:treatment-c
Notes: Debian GNU/Linux 12 (bookworm)FP(D10-L1000-W0000000-T01) WR? WR+ EGL? EGL- GL Context? GL Context+ WebGL? WebGL+
ProductID: {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
ProductName: Firefox
RDDProcessStatus: Running
ReleaseChannel: release
SafeMode: 0
SecondsSinceLastCrash: 1207
StartupCacheValid: 0
StartupCrash: 0
StartupTime: 1743983327
SubmittedFrom: Client
TelemetryClientId: 0e8add29-28d6-454b-8d91-ec2548923e5c
TelemetryEnvironment: {"build":{"applicationId":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","applicationName":"Firefox","architecture":"aarch64","buildId":"20250327043313","version":"137.0","vendor":"Mozilla","displayVersion":"137.0","platformVersion":"137.0","xpcomAbi":"aarch64-gcc3","updaterAvailable":false},"partner":{"distributionId":"raspberrypios","distributionVersion":"1.0","partnerId":null,"distributor":null,"distributorChannel":null,"partnerNames":[]},"system":{"memoryMB":8044,"virtualMaxMB":null,"cpu":{"count":4,"cores":4,"pcount":4,"mcount":0,"ecount":0,"vendor":"ARM","name":"Cortex-A76","family":65,"model":3339,"stepping":4,"l2cacheKB":512,"l3cacheKB":2048,"speedMHz":2400,"extensions":["hasNEON"]},"os":{"name":"Linux","version":"6.12.20+rpt-rpi-2712","locale":"en-US","distro":"Debian","distroVersion":"12"},"hdd":{"profile":{"model":null,"revision":null,"type":null},"binary":{"model":null,"revision":null,"type":null},"system":{"model":null,"revision":null,"type":null}},"gfx":{"D2DEnabled":null,"DWriteEnabled":null,"ContentBackend":"Skia","Headless":false,"TargetFrameRate":85,"textScaleFactor":1,"adapters":[{"description":"V3D 7.1.7.0","vendorID":"0x6c50","deviceID":"0x0441","subsysID":null,"RAM":0,"driver":null,"driverVendor":"mesa/vc4","driverVersion":"24.2.8.0","driverDate":null,"GPUActive":true}],"monitors":[{"screenWidth":1024,"screenHeight":768,"defaultCSSScaleFactor":1,"contentsScaleFactor":1}],"features":{"compositor":"webrender","hwCompositing":{"status":"available"},"gpuProcess":{"status":"unused"},"webrender":{"status":"available"},"wrCompositor":{"status":"blocklisted:FEATURE_FAILURE_WEBRENDER_COMPOSITOR_DISABLED"},"openglCompositing":{"status":"available"},"omtp":{"status":"unused"}}},"appleModelId":null,"hasWinPackageId":null},"settings":{"blocklistEnabled":true,"e10sEnabled":true,"e10sMultiProcesses":8,"fissionEnabled":true,"locale":"en-US","intl":{"requestedLocales":["en-US"],"availableLocales":["en-US"],"appLocales":["en-US"],"systemLocales":["en-US"],"regionalPrefsLocales":["en-US"],"acceptLanguages":["en-US","en"]},"update":{"channel":"release","enabled":false,"autoDownload":false,"background":false},"userPrefs":{"browser.search.region":"US","browser.urlbar.autoFill":true,"browser.urlbar.autoFill.adaptiveHistory.enabled":false,"browser.urlbar.dnsResolveSingleWordsAfterSearch":0,"browser.urlbar.quicksuggest.dataCollection.enabled":false,"browser.urlbar.suggest.quicksuggest.nonsponsored":true,"browser.urlbar.suggest.quicksuggest.sponsored":true,"media.gmp-gmpopenh264.lastInstallStart":1742541558,"media.gmp-gmpopenh264.lastDownload":1742541558,"media.gmp-gmpopenh264.lastUpdate":1742541558,"media.gmp-manager.lastCheck":1743983400,"media.gmp-manager.lastEmptyCheck":1743983400,"network.http.microsoft-entra-sso.enabled":false,"network.trr.strict_native_fallback":false,"widget.content.gtk-high-contrast.enabled":true},"sandbox":{"effectiveContentProcessLevel":4,"contentWin32kLockdownState":3},"addonCompatibilityCheckEnabled":true,"isDefaultBrowser":true,"defaultSearchEngine":"google-b-1-d","defaultSearchEngineData":{"loadPath":"[app]google","name":"Google","origin":"default","submissionURL":"https://www.google.com/search?q="}},"profile":{"creationDate":20011,"firstUseDate":20011},"addons":{"activeAddons":{"jid1-TSgSxBhncsPBWQ@jetpack":{"version":"1.1.0","scope":1,"type":"extension","updateDay":20011,"isSystem":false,"isWebExtension":true,"multiprocessCompatible":true,"blocklisted":false,"description":"Makes YouTube stream H.264 videos instead of VP8/VP9 videos","name":"h264ify","userDisabled":false,"appDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"installDay":20011,"signedState":2,"signedTypes":"[2,0]","quarantineIgnoredByApp":false,"quarantineIgnoredByUser":false},"[email protected]":{"version":"1.1","scope":1,"type":"extension","updateDay":20011,"isSystem":false,"isWebExtension":true,"multiprocessCompatible":true,"blocklisted":false,"description":"Override user-agent for a specific set of websites which discriminate against Firefox on rpi","name":"UANaughtyList","userDisabled":false,"appDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"installDay":20011,"signedState":2,"signedTypes":"[2,0]","quarantineIgnoredByApp":false,"quarantineIgnoredByUser":false},"[email protected]":{"version":"1.63.2","scope":1,"type":"extension","updateDay":20170,"isSystem":false,"isWebExtension":true,"multiprocessCompatible":true,"blocklisted":false,"description":"Finally, an efficient blocker. Easy on CPU and memory.","name":"uBlock Origin","userDisabled":false,"appDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"installDay":20011,"signedState":2,"signedTypes":"[2,1]","quarantineIgnoredByApp":true,"quarantineIgnoredByUser":false},"[email protected]":{"version":"1.0.1","scope":1,"type":"extension","updateDay":20180,"isSystem":true,"isWebExtension":true,"multiprocessCompatible":true,"blocklisted":false,"description":null,"name":"Form Autofill","userDisabled":false,"appDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"installDay":19970,"quarantineIgnoredByApp":true,"quarantineIgnoredByUser":false},"[email protected]":{"version":"1.0.0","scope":1,"type":"extension","updateDay":20180,"isSystem":true,"isWebExtension":true,"multiprocessCompatible":true,"blocklisted":false,"description":"Fixes for web compatibility with Picture-in-Picture","name":"Picture-In-Picture","userDisabled":false,"appDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"installDay":19970,"quarantineIgnoredByApp":true,"quarantineIgnoredByUser":false},"[email protected]":{"version":"137.7.0","scope":1,"type":"extension","updateDay":20180,"isSystem":true,"isWebExtension":true,"multiprocessCompatible":true,"blocklisted":false,"description":"Urgent post-release fixes for web compatibility.","name":"Web Compatibility Interventions","userDisabled":false,"appDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"installDay":19970,"quarantineIgnoredByApp":true,"quarantineIgnoredByUser":false}},"theme":{"id":"[email protected]","blocklisted":false,"description":"Follow the operating system setting for buttons, menus, and windows.","name":"System theme — auto","userDisabled":false,"appDisabled":false,"version":"1.4.1","scope":4,"foreignInstall":false,"hasBinaryComponents":false,"installDay":20011,"updateDay":20011},"activeGMPlugins":{"gmp-gmpopenh264":{"version":"2.6.0","userDisabled":false,"applyBackgroundUpdates":1}}},"experiments":{"desktop-release-show-relay-to-all-browsers":{"branch":"next-sign-up-modal-cta","type":"nimbus-nimbus"},"long-term-holdback-2025h1-growth-desktop":{"branch":"delivery","type":"nimbus-nimbus"},"persist-search-term-rollout-phase-1":{"branch":"control-rollout","type":"nimbus-rollout"},"product-insight-telemetry-via-server-knobs-rollout-release":{"branch":"control-rollout","type":"nimbus-rollout"},"upgrade-spotlight-rollout":{"branch":"treatment","type":"nimbus-rollout"},"address-autofill-desktop-pref-release-rollout":{"branch":"enable-address-autofill","type":"nimbus-rollout"},"encrypted-client-hello-fallback-mechanism":{"branch":"control","type":"nimbus-rollout"},"fpp-floating-point-protection-rollout-linux-only":{"branch":"control","type":"nimbus-rollout"},"fx-accounts-ping-release-rollout-2":{"branch":"control","type":"nimbus-rollout"},"disable-ads-startup-cache":{"branch":"control","type":"nimbus-rollout"},"us-rollout-compact-layout-thumbs-updown":{"branch":"rollout","type":"nimbus-rollout"},"extensions-migration-in-import-wizard-116-rollout":{"branch":"control","type":"nimbus-rollout"},"us-review-checker-rollout-v3":{"branch":"treatment-a","type":"nimbus-rollout"},"account-spotlight-modal-english-rollout-v2":{"branch":"rollout","type":"nimbus-rollout"},"unified-api-for-spocs-and-top-sites-controlled-rollout-for-release-133":{"branch":"control","type":"nimbus-rollout"},"certificate-transparency-desktop-rollout":{"branch":"certificate-transparency-enforced","type":"nimbus-rollout"},"ai-chatbot-rollout-in-the-old-sidebar":{"branch":"treatment-d","type":"nimbus-rollout"},"pdf-annotations-highlight-treatment-b-rollout":{"branch":"treatment-b","type":"nimbus-rollout"},"crlite-rollout":{"branch":"rollout","type":"nimbus-rollout"},"https-upgrades-fallback-time-bugfix":{"branch":"rollout","type":"nimbus-rollout"},"fx-view-discoverability-2025-rollout":{"branch":"treatment-b","type":"nimbus-rollout"},"default-ui-experiment-logo-in-corner-rollout":{"branch":"logo-in-corner","type":"nimbus-rollout"},"mozilla-vpn-in-private-browsing-treatment-d-rollout-en-only":{"branch":"treatment-d","type":"nimbus-rollout"},"pdf-annotations-signatures-ab-experiment":{"branch":"treatment-c","type":"nimbus-nimbus"}}}
TelemetryProfileGroupId: dda92a86-5424-442c-8e74-383908c7ca45
TelemetryServerURL: https://incoming.telemetry.mozilla.org
TelemetrySessionId: 622dccc0-2333-4445-bee3-fcb15f6d62ba
Throttleable: 1
TotalPageFile: 8644182016
TotalPhysicalMemory: 8434483200
URL: https://weatherstar.netbymatt.com/
UptimeTS: 1087.45611282
UtilityProcessStatus: Running
Vendor: Mozilla
Version: 137.0
useragent_locale: en-US
There have been a handful of updates in the last week or two. Any thoughts on with which one it started. And am I reading this right, it crashed after only 20 minutes?
In my mind the best candidates are music or the new auto refresh. I know I ran the auto refresh overnight (in chrome) before releasing that. But that's not to say it's perfect.
Some other info that would be helpful for anyone else seeing this:
- Are you playing music?
- what screens are you displaying? (check boxes at the bottom of the page)
- kiosk or full screen mode?
@netbymatt it began with 5.16.0. And yep, crashes fairly quickly.
Not using music (tbh, didn't realize it was a new feature). Running in full screen mode on an external monitor. Running all screens other than Hourly Foreccast and Travel Forecast.
Testing with Chrome currently and it appears to be off to a better start - no crashing yet, will report back if it does.
Thanks for the version number. That will narrow things down a lot. That's the new background refresh changes. I'll have to watch the Firefox console and see what happens there.
Oh, I have a bad feeling I left the update rate at something really short, maybe 10-30 seconds for testing the updates. I'll bump that number up right away back to the 10 minute figure and we'll see where things go from there.
v5.16.3 has the old 10 minute update rate. Let me know if Firefox is happier with that.
Thanks - it looks like, at least preliminarily, that it lasts longer, but it still crashing.
Chromium is running pretty stable as far as I can tell, so I think we'll just use that for now.
In order to fix #77 I had to re-vamp how the background updates are accomplished. Can you check out firefox again and see if v5.16.5 clears up the crashing issue?
For what it's worth I've been running successfully on Windows 11, Firefox 138.0.1 overnight without a crash. I also used a hidden option to crank up the refresh rate by adding this to the url /?settings-refreshTime-select=10000 to take the background refresh rate down to 10 seconds which we earlier determined affected how soon it crashed.
Crashes the current latest mobile safari too.
I haven't yet experienced a crash on Firefox desktop, but the site infinitely and immediately crashes on Firefox iOS and Mobile Safari iOS.
Also, the mere presence of this site's link in an iMessage thread on iOS (presumably due to the preview) causes the iMessage thread to be unusable and glitchy. On desktop Messages.app, the entire app beachballs. The only recourse was to either delete the individual message on iOS and use iCloud syncing to update desktop, OR to delete the entire thread from the device (since entering the thread triggers the issue).
I mainly wanted to report this in case someone else has this issue after :ahem: excitedly sending this site to their friends :ahem: :D Personally it seems like a huge iMessage issue that a site that triggers a safari crash can make iMessage unusable!
Thanks for the all the feedback on this topic!
Let's keep gathering it up and see what we can find. I can work with the Firefox issue. But I don't own any Apple devices to check on what's happening with Safari so help there would be appreciated. I do know that it doesn't crash for all Safari based on what Google Analytics tells me about user/browser/os combinations.
Some more info:
It doesn't crash on desktop Safari. But I have multiple family/friends with iOS devices and it crashed for everyone on the latest iOS version (not refuting google analytics, just sharing!).
I took a look at the live site on my iPhone while it was tethered to the desktop Safari web inspector. Unfortunately, I didn't see anything that indicated a clear root cause. My only hunch right now is the use of OffscreenCanvas. In the past, Safari has had two (among many) issues related to canvas that I'm aware of:
- when a canvas is detached from the DOM Safari can leak memory depending on which operations are performed on it. The details are demonstrated in this code sandbox and seem to still be present if you select "stream from video" and watch the memory usage as you click "Memory Leak". https://codesandbox.io/p/sandbox/safari-webkit-detached-canvas-memory-leak-8p7hz
- It's harder to do now, but in the past, creating a large enough canvas would cause Safari to crash rather than just fail to create the canvas.
Now, neither of these could be at play here, I'm just describing what I've experienced that gives me that hunch.
Looking at the radar code, I see several OffscreenCanvas instances created: https://github.com/netbymatt/ws4kp/blob/095761ee812391ccebc0226cc4b63a1f04a9fbbe/server/scripts/modules/radar-worker.mjs. I can also see these created in the Safari Web Inspector before the process gives up after too many crashes.
Perhaps there is a way to disable the creation of those canvases to see if this is the core issue? I'm not familiar with the code (such as the initialization of the app), so it's hard to guess what else could be happening without digging in deeper.
EDIT: I noticed that when it crashes, it does so before the blob: resources are present in the network inspector.
On the left is the crashed page on my phone, on the right is the loaded page on Safari desktop. Notice how the right side has the blob: after radar but the left side does not since it crashed before getting there. Perhaps it's something to do with using Blobs in Safari iOS?
This is a very good analysis. And yes the off screen canvases do get large. They ingest a map for the entire US, as well as a radar image of the same size and then pull out just the necessary area to display.
I can make a few adjustments to the radar worker that won't affect overall functionality but will allow the page to load without doing any radar canvas work if the checkbox for radar is unchecked.
I'll get the change in tomorrow and let you know when it's ready for testing.
I made the radar image processing (offscreen canvases) not load if the radar checkbox is not checked in v5.21.7. You can force radar off by using this url:
https://weatherstar.netbymatt.com/?radar-checkbox=false
Let me know how Safari on mobile reacts without loading the radar. Thanks!
Let me know how Safari on mobile reacts without loading the radar. Thanks!
Yep, this seems to be the culprit, using the query string I can load the page in iOS Safari. Once I check "Local Radar" the page crashes.
Thanks for checking. I've had a different way of presenting the radar in the pre-stretched-radar branch in the works that will get rid of the need for the canvas. But the branch still needs a bit of work before I publish it.
Disabling radar on Safari for iOS for now c5ffe1542a04c5159ee65daf93b3364d71238546
Yes, I can confirm that it now loads in Mobile Safari without crashing! Great work!
I might try to submit a PR to expand the isIOS check to also include Firefox iOS and Chrome iOS since they all share the same WebKit engine on iOS (I use Firefox iOS and the page is still crashing)
PR Submitted!
I've decided the path forward with this will go down two paths. And it will continue to use the IOS/Webkit detection. For non IOS/Webkit I'll use the current offscreen canvas method as is, because this allows me to preserve the color palette from the original weatherstar hardware.
For the other case, I'll just layer the map, radar and road/boundaries overlay for the display. With a bit of z-index, position-absolute, and overflow-none in CSS I'll have the browser handle layering the images and cropping them directly in the layout engine which I'm guessing will be more stable.
After realizing that OffscreenCanvas is the likely sticking point for ios, and not wanting to duplicate code, I moved processing (crop, pallet change, stretch) of the radar image back on to the main thread. It still uses 3 canvases (times 6 radar frames) that are never attached to the dom, but they are now created with document.createElement('canvas').
@kirbysayshi @imacrayon Can you check out the new branch and see if it's still crashing safari? https://github.com/netbymatt/ws4kp/tree/radar-no-worker All the ios checks previously implemented have been removed from the branch so it should be fast to check out.
Hi Matt. I thought this branch was working on iOS... but once you "Reload" (which you can't see me tapping in the screen recording, but it's when the reload icon turns into an X), it "breaks":
https://github.com/user-attachments/assets/198f3552-3935-4065-ab8f-ca8ab77214c3
Note that where the background gets stuck blue varies:
Not sure if this provides any useful insight, but wanted to show you what I found.
This is mostly good news. The radar image is getting processed correctly (green blobs) and no longer crashing the browser. The blue is the background map tiles aren't loading properly and should be very fixable.
I tried a few things in the latest commit, mainly not asking it to change the tile src attribute if it's already set properly (which it is on refresh).
If it's still weird on refresh, check out the overlay-tiles class on the page with the inspector and see if anything look suspicious. I could see it being some weird layout issue and the images aren't wrapping into the 2x2 group that's necessary.
Your latest changes look good! I've been unable to reproduce the "missing map tile" issue after repeated attempts across different locations.
v5.26.0 has re-enabled radar and has been published to the web site.
I'm going to close this issue. The topic may have strayed from the initial Firefox crash report but we ultimately ended up making significant changes that improve memory consumption and reduce the use of advanced features like web workers. If firefox is still crashing let's re-open a new topic and explore an updated crash report there.