Entity: line 34: parser error : Extra content at the end of the document

103 views
Skip to first unread message

Bruce Dawson

unread,
Jul 11, 2023, 12:50:56 AM7/11/23
to Chromium-dev
When running tests a message like the one in the subject line will occasionally be printed. As far as I can tell this is because the test runner calls ProcessGTestOutput, but this is racy and can end up reading the XML results while the test runner is still writing (see the comment here).

I think that these errors used to be suppressed, and they should be, but I can't find out where they are emitted. Does anybody know? Alternately, does anybody know what has changed?

Related to this, we currently have a bug where (in asan builds of base_unittests) the parsing will sometimes fail. Specifically, it will find 11 test results when there should only be 10. This is tracked in crbug.com/1463355.

--
Bruce Dawson, he/him

Greg Thompson

unread,
Jul 11, 2023, 8:56:36 AM7/11/23
to bruce...@google.com, Chromium-dev
hi bruce. that error is coming from libxml from within the call to parse in ProcessGTestOutput. i believe you're spot-on with the race. i think we repeatedly parse the output file in ResultWatcher::PollOnce, so sometimes we scan it while it's invalid. or something like that. a quick look at third_party/libxml/src/include/libxml/xmlreader.h tells me that we could potentially supply our own error handling func so that these messages aren't printed.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAE5mQiP3zFf_Xm9mYqbcN2XKdGmR6Du7KBTWRo%2Bj_mf4DEURUQ%40mail.gmail.com.

Bruce Dawson

unread,
Jul 12, 2023, 12:09:10 PM7/12/23
to Greg Thompson, Chromium-dev
Yep, that makes sense. Any idea why these messages (I think) only started being visible recently? I wonder what changed.

It looks like the root cause of crbug.com/1463355 is that there were two tests in the same suite with the same name (!) and this, together with racy XML parsing, somehow caused things to go wrong. I'm not clear on the details, but renaming one of the tests seems to have fixed the bug. The spammy parsing messages remain.

--
Bruce Dawson, he/him

Greg Thompson

unread,
Jul 13, 2023, 3:06:47 AM7/13/23
to Bruce Dawson, Chromium-dev
As for "why now"? It looks like we've taken many libxml rolls in the past year or so. Perhaps this is a relatively new addition to libxml? Wait, hold on, https://crbug.com/1213243 seems relevant. Judging by the code, I'd say this is a regression around r1028978.

Bruce Dawson

unread,
Jul 13, 2023, 4:42:46 PM7/13/23
to Greg Thompson, Chromium-dev
Great find Greg. Thanks for the detective work.

--
Bruce Dawson, he/him

Reply all
Reply to author
Forward
0 new messages