-
Bug
-
Resolution: Fixed
-
P5
-
11, 13
-
b16
There is a data race in a piece of unused code:
WARNING: ThreadSanitizer: data race (pid=167158)
Write of size 8 at 0x7f39db98bd00 by thread T11:
#0 strncpy <null> (libtsan.so+0x2b217)
#1 CompileBroker::set_last_compile(CompilerThread*, methodHandle const&, bool, int) /usr/local/google/home/jcbeyler/mercurial/jdk-tsan/src/hotspot/share/compiler/compileBroker.cpp:2273 (libjvm.so+0x63216b)
Previous write of size 8 at 0x7f39db98bd00 by thread T12:
#0 strncpy <null> (libtsan.so+0x2b217)
#1 CompileBroker::set_last_compile(CompilerThread*, methodHandle const&, bool, int) /usr/local/google/home/jcbeyler/mercurial/jdk-tsan/src/hotspot/share/compiler/compileBroker.cpp:2273 (libjvm.so+0x63216b)
This happens because multiple compiler threads can set the name of the last method. No one is using the member fields as they are only referenced in the print_last_method method which is dead code.
I am preparing a webrev to talk about it with a solution to add a lock and move all the related code to non product code.
WARNING: ThreadSanitizer: data race (pid=167158)
Write of size 8 at 0x7f39db98bd00 by thread T11:
#0 strncpy <null> (libtsan.so+0x2b217)
#1 CompileBroker::set_last_compile(CompilerThread*, methodHandle const&, bool, int) /usr/local/google/home/jcbeyler/mercurial/jdk-tsan/src/hotspot/share/compiler/compileBroker.cpp:2273 (libjvm.so+0x63216b)
Previous write of size 8 at 0x7f39db98bd00 by thread T12:
#0 strncpy <null> (libtsan.so+0x2b217)
#1 CompileBroker::set_last_compile(CompilerThread*, methodHandle const&, bool, int) /usr/local/google/home/jcbeyler/mercurial/jdk-tsan/src/hotspot/share/compiler/compileBroker.cpp:2273 (libjvm.so+0x63216b)
This happens because multiple compiler threads can set the name of the last method. No one is using the member fields as they are only referenced in the print_last_method method which is dead code.
I am preparing a webrev to talk about it with a solution to add a lock and move all the related code to non product code.