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]

Dean Long dlong at openjdk.org
Fri Jan 16 10:17:41 UTC 2026


On Fri, 16 Jan 2026 05:43:40 GMT, Guanqiang Han <ghan at openjdk.org> wrote:

>> My understanding is that we need at least one stringStream, and the code is trying to avoid having two stacked stringStreams, which would mean extra memory footprint and copying.  So I agree the proposed is_buffered() is really a proxy for "do I have a stringStream?" because bufferedStream does not guarantee coherent output by itself.  What if we just live with the inefficiency of having two stringStreams for now?
>
> Thanks, ok, I’ll drop the is_buffered() change. Would it be acceptable to go back to my earlier proposal: pass an explicit “buffering/coherent-output” parameter at the call site so we can use an existing stringStream and avoid double buffering?

I would be OK with that, since we failed to come up with a better solution, but I suspect that we will run into this same issue again, and having to pass an extra flag through multiple layers every time does not feel elegant.  Trying to hide the extra flag using something like a THREAD_LOCAL seems hacky as well.  I think using a lambda expression would work but may be overkill.

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

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


More information about the hotspot-compiler-dev mailing list