Perma Assertion failure: !(aSource == kCharsetFromChannel && !aChannelHadCharset) (If charset is from channel, channel must have had charset.), at /builds/worker/checkouts/gecko/parser/html/nsHtml5StreamParser.h:245
Categories
(Thunderbird :: Upstream Synchronization, defect, P5)
Tracking
(thunderbird_esr78 unaffected)
| Tracking | Status | |
|---|---|---|
| thunderbird_esr78 | --- | unaffected |
People
(Reporter: intermittent-bug-filer, Assigned: darktrojan)
References
(Regression)
Details
(Keywords: assertion, intermittent-failure)
Attachments
(1 file)
Filed by: geoff [at] darktrojan.net
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=334221901&repo=comm-central
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/cx4cFWQ7QfurPfV5WYlfxQ/runs/0/artifacts/public/logs/live_backing.log
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (obsolete) |
Comment 3•5 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #2)
I think this line should be changed to
parser->SetDocumentCharset(encoding, charsetSource, charsetSource == kCharsetFromChannel);.
nsSAXXMLReader is never supposed to combine with nsHtml5StreamParser, so I suspect the reason is elsewhere.
Comment 4•5 years ago
|
||
Sure.
Comment 5•5 years ago
•
|
||
Here is another hypothesis.
nsMessenger::SetDisplayCharset calls SetHintCharacterSetSource(kCharsetFromChannel):
https://searchfox.org/comm-central/rev/938bb1a03265a9e9c82ed0abcb7ec42c66fdbccf/mailnews/base/src/nsMessenger.cpp#279
So charsetSource may change to kCharsetFromChannel without updating channelHadCharset here:
https://searchfox.org/mozilla-central/rev/6c9ff2820d3aae683ec87c53c79e5108d54f3f76/dom/html/nsHTMLDocument.cpp#483
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
Comment 8•5 years ago
|
||
Should the channelHadCharset assignment just be moved down to after the tries have concluded?
| Assignee | ||
Comment 9•5 years ago
|
||
I've been looking at this. We should look at fixing our channel implementations to return a charset. Hard-wiring it to UTF-8 almost works, as pointed out here libmime always converts to UTF-8. However if we just output the raw data, for example to view source, it might not be UTF-8. Could we set the channel charset only if libmime gets involved? I think that would prevent this assertion failure – nsHtml5StreamParser's not going to be involved in any other situation that I can think of.
| Assignee | ||
Comment 10•5 years ago
|
||
Here's a Try run showing what happens if you hard-wire UTF-8 in the channels. Only the view source test is complaining.
Comment 11•5 years ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #8)
Should the channelHadCharset assignment just be moved down to after the tries have concluded?
No, if TryUserForcedCharset changes the charsetSource to something stronger than kCharsetFromChannel, charsetSource is not kCharsetFromChannel while channelHadCharset is true. channelHadCharset has been introduced to handle this exact situation.
Comment 12•5 years ago
|
||
Since the source is an internal component that always sets the encoding to UTF-8, I suggest changing the source value to kCharsetFromBuiltIn.
Comment 13•5 years ago
|
||
However if we just output the raw data, for example to view source, it might not be UTF-8.
Except kCharsetFromBuiltIn doesn't make sense for that case.
| Assignee | ||
Comment 14•5 years ago
|
||
I don't think that case should be coming through here, so that's alright.
| Assignee | ||
Comment 15•5 years ago
|
||
I just realised my Try run in comment 10 was opt when it should've been debug. I wondered why it went so well. :-/
| Assignee | ||
Comment 16•5 years ago
|
||
Thanks to hsivonen for the suggestion.
Updated•5 years ago
|
| Comment hidden (Intermittent Failures Robot) |
| Assignee | ||
Updated•5 years ago
|
Comment 18•5 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/0aa11a1c79fa
Fix assertion failure in nsHtml5StreamParser.h. r=mkmelin
| Comment hidden (Intermittent Failures Robot) |
Description
•