RFR: 8267952: async logging supports to dynamically change tags and decorators [v2]

David Holmes dholmes at openjdk.java.net
Fri Jun 11 12:49:51 UTC 2021


On Thu, 10 Jun 2021 08:04:37 GMT, Xin Liu <xliu at openjdk.org> wrote:

>> Support dynamic reconfiguration for async logging. 2 unittests are provided.
>> The regression test discovers a race condition in LogTagSet::log() even with
>> synchronous logging. It's not MT-safe if context switch happens between the
>> creation of LogDecorations  and LogOutputList::Iterator. fixed.
>
> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add comments in LogTagSet::log().

Hi Xin,

Unfortunately the new test is crashing:

[ RUN      ] LogConfigurationTest.reconfigure_decorators_MT_vm
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fb565530ee0, pid=24293, tid=24303
#
# JRE version: Java(TM) SE Runtime Environment (17.0) (fastdebug build 17-internal+0-LTS-2021-06-09-0450595.david.holmes.jdk-dev.git)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 17-internal+0-LTS-2021-06-09-0450595.david.holmes.jdk-dev.git, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libc.so.6+0x6bee0]  flockfile+0x0
#
# Core dump will be written. Default location: Core dumps may be processed with "/opt/core.sh %p" (or dumping to  testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_misc/scratch/1/core.24293)
#
# An error report file with more information is saved as:
# testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_misc/scratch/1/hs_err_pid24293.log
[       OK ] LogConfigurationTest.reconfigure_decorators_MT_vm (1018 ms)
[ RUN      ] LogConfigurationTest.reconfigure_tags_MT_vm
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#

Current thread (0x000055cff4e59eb0):  Thread "AsyncLog Thread" [stack: 0x00007fb530d63000,0x00007fb530e63000] [id=24303]

Stack: [0x00007fb530d63000,0x00007fb530e63000],  sp=0x00007fb530e61ae8,  free space=1018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libc.so.6+0x6bee0]  flockfile+0x0
V  [libjvm.so+0x15fb542]  LogFileOutput::write_blocking(LogDecorations const&, char const*)+0x32
V  [libjvm.so+0x15f5b6d]  AsyncLogWriter::run()+0x35d
V  [libjvm.so+0x1c0c290]  Thread::call_run()+0x100
V  [libjvm.so+0x18d98ae]  thread_native_entry(Thread*)+0x10e


I'll try to investigate more on Monday

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

PR: https://git.openjdk.java.net/jdk/pull/4408


More information about the hotspot-runtime-dev mailing list