Crash in [@ stackoverflow | to_computed_color]: repeatedly interrupted transitions of currentcolor-based colors nest color-mix() without bound
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| thunderbird_esr153 | --- | affected |
| firefox-esr140 | --- | unaffected |
| firefox150 | --- | unaffected |
| firefox151 | --- | unaffected |
| firefox152 | --- | fix-optional |
People
(Reporter: mkmelin, Assigned: tlouw)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: crash, regression, topcrash-thunderbird, Whiteboard: [tbird topcrash])
Crash Data
Attachments
(3 files, 2 external files, 1 obsolete file)
My Thunderbird Daily from today keeps crashing like crazy. Bug 2032954 touched the crashing lines so I'll assume from there.
Crash report: https://crash-stats.mozilla.org/report/index/bde93689-f56f-48c9-967f-c6c980260421
Reason:
SIGSEGV / SEGV_MAPERR
Top 10 frames:
0 libxul.so style::values::specified::color::Color::to_computed_color servo/components/style/values/specified/color.rs:858
1 libxul.so style::values::specified::color::Color::to_computed_color servo/components/style/values/specified/color.rs:905
2 libxul.so style::values::specified::color::Color::to_computed_color servo/components/style/values/specified/color.rs:905
3 libxul.so style::values::specified::color::Color::to_computed_color servo/components/style/values/specified/color.rs:905
4 libxul.so style::values::specified::color::Color::to_computed_color servo/components/style/values/specified/color.rs:905
5 libxul.so style::values::specified::color::Color::to_computed_color servo/components/style/values/specified/color.rs:905
6 libxul.so style::values::specified::color::Color::to_computed_color servo/components/style/values/specified/color.rs:905
7 libxul.so style::values::specified::color::Color::to_computed_color servo/components/style/values/specified/color.rs:905
8 libxul.so style::values::specified::color::Color::to_computed_color servo/components/style/values/specified/color.rs:905
9 libxul.so style::values::specified::color::Color::to_computed_color servo/components/style/values/specified/color.rs:905
Updated•7 months ago
|
Comment 1•7 months ago
|
||
I don't understand that crash report. The crashing thread stack doesn't have a reasonable beginning... It's also... not a stack overflow? I'm confused. Gabriele am I missing something?
Updated•7 months ago
|
| Reporter | ||
Comment 2•7 months ago
|
||
The other crash I submitted was bp-4e0b73d6-a375-46f1-9d45-be98d0260421. I think I had one or two others that I ignored.
It's not crashed since.
Comment 3•7 months ago
|
||
Set release status flags based on info from the regressing bug 2032954
| Reporter | ||
Comment 4•7 months ago
|
||
Crashed again after upgrade to next Daily. bp-70b22a80-95de-48ab-a8ba-ff1a30260423
Updated•7 months ago
|
Comment 5•7 months ago
|
||
I crashed twice in the last hour with this signature after updating to 151.0b1, ex:
https://crash-stats.mozilla.org/report/index/fc023eb5-a2d0-4dd1-8b49-13c960260424
Comment 6•6 months ago
|
||
The macOS crashes have the full stack. On Linux we sometimes limit how much of the stack we put in the minidump to prevent it from being gigantic, I suspect that's what happened here and why the stack is cut short.
Comment 7•6 months ago
|
||
I'm not sure this really is a new regression (though it may have become more frequent); e.g. https://crash-stats.mozilla.org/report/index/751dbc25-eeab-45e0-94b0-60b8c0251114 is from Fenix 145 back in November, and https://crash-stats.mozilla.org/report/index/d8157b35-93d3-494d-be82-79bf80251108 is from Fenix 144, but they both look like the same crash as the recent reports here.
| Reporter | ||
Comment 8•6 months ago
|
||
I agree it may be from some other bug.
Updated•6 months ago
|
Comment 9•6 months ago
|
||
The severity field is not set for this bug.
:emilio, could you have a look please?
For more information, please visit BugBot documentation.
Comment 10•6 months ago
|
||
It's not super clear if what causes this is a logic bug, a massively nested color on the front-end, or something else. I suspect the second, but without a repro or so it's hard to confirm...
Updated•6 months ago
|
Updated•6 months ago
|
Comment 11•6 months ago
|
||
(In reply to Jonathan Kew [:jfkthame] from comment #7)
I'm not sure this really is a new regression (though it may have become more frequent); e.g. https://crash-stats.mozilla.org/report/index/751dbc25-eeab-45e0-94b0-60b8c0251114 is from Fenix 145 back in November, and https://crash-stats.mozilla.org/report/index/d8157b35-93d3-494d-be82-79bf80251108 is from Fenix 144, but they both look like the same crash as the recent reports here.
If not new, is it related to older Bug 1840573 - Thunderbird Crash in [@ stackoverflow | style::values::animated::impl$10::to_animated_value] via style::values::generics::color ... and more broadly https://crash-stats.mozilla.org/search/?proto_signature=~style%3A%3Avalues%3A&product=Thunderbird&date=%3E%3D2026-04-13T14%3A18%3A00.000Z&date=%3C2026-05-13T14%3A18%3A00.000Z&_facets=signature&_sort=-date&_columns=date&_columns=signature&_columns=product&_columns=version&_columns=build_id&_columns=platform#facet-signature ??
Comment 12•6 months ago
•
|
||
0 XUL style::values::specified::color::Color::to_computed_color servo/components/style/values/specified/color.rs:858
this is the first line in my crash string when TB crashed today after updating to 151.0b4
full report:
https://crash-stats.mozilla.org/report/index/c142fe83-c026-4786-9837-d00370260513
I am now on macOS 26.5 - TB did freeze when attempting to reboot and update, the macOS that is - been stable since
Updated•1 month ago
|
Comment 13•1 month ago
|
||
Updated•1 month ago
|
Comment 14•1 month ago
|
||
Duping all adjacent signatures of the different platforms here to get a better overview.
Comment 15•1 month ago
|
||
stackoverflow | enum2$<T>::to_computed_color is in fact the #3 ranked signature for Thunderbird esr153
Updated•1 month ago
|
Comment 16•1 month ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #15)
stackoverflow | enum2$<T>::to_computed_color is in fact the #3 ranked signature for Thunderbird esr153
Still trying to fully wrap my head around, our CSS could be better but not something that should ever end in a crash.
Comment 17•1 month ago
•
|
||
Hi Emilio,
steps to reproduce.
- Open
crash_fill_raf.html - Keep in focus for ~60s (macOS 27, other platforms may differ)
- Observe tab crash
Neither Chrome nor Safari crash even after an hour on the same page.
In Thunderbird, we are apparently doing something similar just in the main process taking the whole app down.
Thanks
Max
Comment 18•1 month ago
|
||
| Reporter | ||
Comment 19•1 month ago
•
|
||
FWIW, Took 1min40s for me to crash on latest linux Firefox Nightly loading the testcase comment 18.
Comment 20•1 month ago
|
||
I think it's best to split the discussion, keep Firefox/Gecko here and track Thunderbird CSS in bug 1840573.
Comment 21•1 month ago
|
||
FWIW it should be easy to see one of those long-running transitions in the Firefox profiler?
Comment 22•1 month ago
|
||
(In reply to Emilio Cobos Álvarez [:emilio] from comment #21)
FWIW it should be easy to see one of those long-running transitions in the Firefox profiler?
What do you need? Long running isn't the issue here, applying transitions on top of each other is. Each further transition nests the calculation one level deeper.
On a high level, both WebKit and Chromium/Blink resolve the current colour before moving on with the calculation; we should do the same. I do not care about the details, feel free to take over. As long as the repro no longer causes a crash, I am good.
Comment 23•1 month ago
|
||
(In reply to Max Emig [:maxe] from comment #22)
What do you need? Long running isn't the issue here, applying transitions on top of each other is. Each further transition nests the calculation one level deeper.
I don't need anything, I was just pointing out how to find out these with the profiler since it seems Thunderbird is hitting this.
On a high level, both WebKit and Chromium/Blink resolve the current colour before moving on with the calculation; we should do the same. I do not care about the details, feel free to take over. As long as the repro no longer causes a crash, I am good.
Well that's incorrect? You can use fill: inherit or change the current color on a child and it should not hard-code the parent's currentColor should it?
Comment 24•1 month ago
|
||
Chrome and WebKit are broken here, TypedOM wise, which is unfortunate because it's the only way of observing this behavior via script rather than reading the final color.
Comment 25•1 month ago
|
||
Unassigning myself here, I will follow along.
Updated•1 month ago
|
Comment 26•1 month ago
|
||
Better placeholder name than before, feel free to change.
Comment 27•1 month ago
|
||
Chrome also scales non-constantly which means they're probably doing something like the nested dance, but they clearly are faster than us... Tiaan maybe you can take a look? It's unclear what Chrome / WebKit are doing internally because of their TypedOM bug, but at a glance flattening like the proposed patch might work.
Comment 28•1 month ago
|
||
(In reply to Emilio Cobos Álvarez [:emilio] from comment #27)
Created attachment 9664061 [details]
Stress testChrome also scales non-constantly which means they're probably doing something like the nested dance, but they clearly are faster than us... Tiaan maybe you can take a look? It's unclear what Chrome / WebKit are doing internally because of their TypedOM bug, but at a glance flattening like the proposed patch might work.
For reference the most relevant sections, as-of today:
How it all works out together in practice is a different beast, not immediately obvious unless one happens to know the codebase.
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 30•24 days ago
|
||
Append interpolation steps instead of nesting color-mix values. Evaluate
each step in order, preserving currentcolor dependencies.
Updated•23 days ago
|
Updated•11 days ago
|
| Assignee | ||
Comment 31•10 days ago
|
||
Updated•9 days ago
|
Updated•9 days ago
|
Comment 32•8 days ago
|
||
Here's a testcase that claude generated that triggers this crash (after hanging for about 20 seconds, on my Surface 7 Pro with Ubuntu 26.04)
Two crashes from me using this testcase:
bp-ab53a695-7e70-4b47-aafa-c428e0261111
bp-b4158a6f-0343-4f6c-b523-d3fe50261111
Updated•8 days ago
|
Comment 33•3 days ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #32)
Created attachment 9679586 [details]
testcase 3 (loops forever, crashing with this bug's signature in affected Firefox versions)Here's a testcase that claude generated that triggers this crash (after hanging for about 20 seconds, on my Surface 7 Pro with Ubuntu 26.04)
Two crashes from me using this testcase:
bp-ab53a695-7e70-4b47-aafa-c428e0261111
bp-b4158a6f-0343-4f6c-b523-d3fe50261111
10s on Nightly on macOS, 1/6 of the time my own took. But to be fair, I did not try to hillclimb mine into even shorter time once it was reliable.
And remember everyone, if this happens in the Thunderbird GUI due to some bulk action, we lose the entire app at the worst possible time while some move is ongoing.
Updated•6 hours ago
|
Updated•5 hours ago
|
Description
•