Possibility of integer overflow in JfrThreadSampler::run()
Severin Gehwolf
sgehwolf at redhat.com
Thu Jan 10 13:40:17 UTC 2019
On Wed, 2019-01-09 at 20:27 +0100, Severin Gehwolf wrote:
> Note that the assertion triggers on a fastdebug build with GCC 8.2 and
> running :jdk_jfr test group for me (18 tests fail).
Failing tests are specifically:
jdk/jfr/api/consumer/TestRecordedFullStackTrace.java
jdk/jfr/api/recorder/TestStartStopRecording.java
jdk/jfr/event/profiling/TestFullStackTrace.java
jdk/jfr/event/runtime/TestActiveSettingEvent.java
jdk/jfr/event/runtime/TestNativeLibrariesEvent.java
jdk/jfr/event/runtime/TestThrowableInstrumentation.java
jdk/jfr/event/sampling/TestNative.java
jdk/jfr/jcmd/TestJcmdDumpGeneratedFilename.java
jdk/jfr/jcmd/TestJcmdSaveToFile.java
jdk/jfr/jcmd/TestJcmdStartWithOptions.java
jdk/jfr/jcmd/TestJcmdStartWithSettings.java
jdk/jfr/jvm/TestLogOutput.java
jdk/jfr/startupargs/TestDumpOnExit.java
jdk/jfr/startupargs/TestMemoryOptions.java
jdk/jfr/startupargs/TestRepositoryPathLong.java
jdk/jfr/startupargs/TestStartDuration.java
jdk/jfr/startupargs/TestStartRecording.java
jdk/jfr/tool/TestPrintJSON.java
They all fail with the following assertion due to this issue:
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/os_posix.cpp:708
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/disk/openjdk/upstream-sources/openjdk-head/src/hotspot/os/posix/os_posix.cpp:708), pid=285191, tid=285269
# assert(ms < MILLIUNITS) failed: Un-interruptable sleep, short time use only
#
# JRE version: OpenJDK Runtime Environment (13.0) (fastdebug build 13-internal+0-adhoc.sgehwolf.openjdk-head)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 13-internal+0-adhoc.sgehwolf.openjdk-head, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x147f38b] os::naked_short_sleep(long)+0x5b
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h %e" (or dumping to /disk/openjdk/upstream-sources/openjdk-head/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_jdk_jdk_jfr/scratch/2/core.285191)
#
# An error report file with more information is saved as:
# /disk/openjdk/upstream-sources/openjdk-head/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_jdk_jdk_jfr/scratch/2/hs_err_pid285191.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
Current thread is 285269
Dumping core ...
Thanks,
Severin
> Failures go away
> with -fno-strict-overflow.
>
> > I will file it to JBS if it is accepted.
>
> Please file a bug.
>
> Thanks,
> Severin
>
> >
> > Thanks,
> >
> > Yasumasa
> >
> > [1] https://mail.openjdk.java.net/pipermail/hotspot-jfr-dev/2018-May/000047.html
> > [2] http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/rev/35dcc0db31dc
More information about the hotspot-jfr-dev
mailing list