RFR: 8374519: assert((!inside_attrs()) || VMError::is_error_reported()) failed: cannot print tag inside attrs with "-XX:+LogCompilation -XX:-SerializeVMOutput"
David Holmes
dholmes at openjdk.org
Wed Jan 21 03:12:20 UTC 2026
On Wed, 21 Jan 2026 02:32:29 GMT, Guanqiang Han <ghan at openjdk.org> wrote:
> Please review this change. Thanks!
>
> **Description:**
>
> The compilation logging is written as structured XML through the global xtty. With SerializeVMOutput turned off, multiple threads can write to the same xmlStream concurrently. This allows XML fragments (especially the tag/attribute header state) to interleave, corrupting the xmlStream markup state machine and triggering the inside_attrs() assertion.
>
> **Fix:**
>
> Ensure xtty remains serialized even when -XX:-SerializeVMOutput is specified.
>
> **Test:**
>
> GHA
I do not think this is an issue. There is no guarantee that every combination of flags is valid and useful and won't trip any assertions. If it crashed a product release that would be different - but I tested it and it seemed to work okay.
There is almost zero reason to ever disable serialized VM output - and arguably we should look at dropping that flag.
Is xtty only used with LogCompilation, or do we use it for other things?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29337#issuecomment-3775924888
More information about the hotspot-dev
mailing list