RFR: 8374862: assert(false) failed: Attempting to acquire lock MDOExtraData_lock/nosafepoint-1 out of order with lock tty_lock/tty -- possible deadlock (running with -XX:+Verbose -XX:+WizardMode -XX:+PrintDeoptimizationDetails) [v6]

David Holmes dholmes at openjdk.org
Thu Jan 15 09:20:00 UTC 2026


On Thu, 15 Jan 2026 07:21:41 GMT, Guanqiang Han <ghan at openjdk.org> wrote:

>> src/hotspot/share/utilities/ostream.hpp line 162:
>> 
>>> 160:    virtual ~outputStream() {}   // close properly on deletion
>>> 161:    // Return true if this stream buffers/accumulates output in memory (e.g., stringStream)
>>> 162:    virtual bool is_buffered() const { return false; }
>> 
>> Really you are using this as a proxy for "do I have a stringStream?" and it doesn't quite work because we also have a `bufferedStream` class that you have not marked as buffered - though I'm not sure the "buffering" in the two cases is actually the same thing.
>> 
>> @dean-long you made this suggestion so how do you see `is_buffered` fitting in to the whole stream hierarchy?
>
> I agree with the concern here. The buffering we need is local to this call site to keep the output coherent (collect everything and print once).
> Whether we need to buffer/accumulate output for coherence is scenario-dependent, rather than a property that should permanently classify a stream type as “buffered” vs. “unbuffered”.
> @dean-long what’s your view on this?

No - sorry I forgot that you have to add override to all methods.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29186#discussion_r2693585193


More information about the hotspot-compiler-dev mailing list