RFR: 8323807: Async UL: Add a stalling mode to async UL [v10]
Johan Sjölen
jsjolen at openjdk.org
Thu Jan 23 08:39:48 UTC 2025
On Thu, 23 Jan 2025 08:17:53 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:
>> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> NOT_DEBUG is not the same as PRODUCT_ONLY I assume
>
> src/hotspot/share/logging/logAsyncWriter.cpp line 105:
>
>> 103: if (LogConfiguration::async_mode() == LogConfiguration::AsyncMode::Stall) {
>> 104: size_t size = Message::calc_size(msg_len);
>> 105: void* ptr = os::malloc(size, mtLogging);
>
> Your mention of recursion made me check if we are logging from our `os:malloc/free` calls. I can find at least one path do `log_warning` in debug builds. This will cause both recursive locking on our PlatformMonitor and cause infinite recursion if the second message does not fit in the buffer.
>
> Maybe this logging is unreachable from this specific context. But I find it a little scary nonetheless. Maybe this should be documented somewhere.
Hi Axel,
I've already switched to having the consumer thread log anything it itself logs directly without going through the buffer so this won't be an issue. See `enqueue_if_locked` (I'll be removing that and only have `enqueue` soon, however, so check there if you can't find it).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22770#discussion_r1926570501
More information about the hotspot-runtime-dev
mailing list