Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8332536

Jdi tests timeout when jvm tracing into stdout is enabled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 23
    • hotspot
    • None

      Some jvmti/jdi tests hang when are executed with '-XX:TraceJVMTI=ec+,+ioe,+ts -Xlog:jvmti=trace'

      The example from
      serviceability/jvmti/8036666/GetObjectLockCount.java

      The stacktrace:

      Thread 17 (Thread 0x7f8c0b449700 (LWP 1199046)):
      #0 __lll_lock_wait_private (futex=0x7f8c3abaa7e0 <_IO_stdfile_1_lock>) at lowlevellock.c:35
      #1 0x00007f8c3abc2355 in __flockfile (stream=0x7f8c3aba96a0 <_IO_2_1_stdout_>) at ../sysdeps/pthread/flockfile.c:28
      #2 0x00007f8c39aab27f in LogFileStreamOutput::write(LogDecorations const&, char const*) () from /opt/mach5/mesos/work_dir/jib-master/install/2024-05-18-0217394.leonid.mesnik.jdk/linux-x64-debug.jdk/jdk-23/fastdebug/lib/server/libjvm.so
      #3 0x00007f8c39ab1270 in LogTagSet::vwrite(LogLevel::type, char const*, __va_list_tag*) () from /opt/mach5/mesos/work_dir/jib-master/install/2024-05-18-0217394.leonid.mesnik.jdk/linux-x64-debug.jdk/jdk-23/fastdebug/lib/server/libjvm.so
      #4 0x00007f8c399be6ca in void LogImpl<(LogTag::type)74, (LogTag::type)0, (LogTag::type)0, (LogTag::type)0, (LogTag::type)0, (LogTag::type)0>::write<(LogLevel::type)1>(char const*, ...) () from /opt/mach5/mesos/work_dir/jib-master/install/2024-05-18-0217394.leonid.mesnik.jdk/linux-x64-debug.jdk/jdk-23/fastdebug/lib/server/libjvm.so
      #5 0x00007f8c399ebe9d in JvmtiExport::post_thread_start(JavaThread*) () from /opt/mach5/mesos/work_dir/jib-master/install/2024-05-18-0217394.leonid.mesnik.jdk/linux-x64-debug.jdk/jdk-23/fastdebug/lib/server/libjvm.so
      #6 0x00007f8c3970de68 in JavaThread::run() () from /opt/mach5/mesos/work_dir/jib-master/install/2024-05-18-0217394.leonid.mesnik.jdk/linux-x64-debug.jdk/jdk-23/fastdebug/lib/server/libjvm.so
      #7 0x00007f8c3a01d4b6 in Thread::call_run() () from /opt/mach5/mesos/work_dir/jib-master/install/2024-05-18-0217394.leonid.mesnik.jdk/linux-x64-debug.jdk/jdk-23/fastdebug/lib/server/libjvm.so
      #8 0x00007f8c39d07dd7 in thread_native_entry(Thread*) () from /opt/mach5/mesos/work_dir/jib-master/install/2024-05-18-0217394.leonid.mesnik.jdk/linux-x64-debug.jdk/jdk-23/fastdebug/lib/server/libjvm.so
      #9 0x00007f8c3abb6609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #10 0x00007f8c3aadb133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

      ...

      Thread 2 (Thread 0x7f8c3870d700 (LWP 428195)):
      #0 __GI___libc_write (nbytes=77, buf=0x7f8c3401be80, fd=1) at ../sysdeps/unix/sysv/linux/write.c:26
      #1 __GI___libc_write (fd=1, buf=0x7f8c3401be80, nbytes=77) at ../sysdeps/unix/sysv/linux/write.c:24
      #2 0x00007f8c3aa4ae8d in _IO_new_file_write (f=0x7f8c3aba96a0 <_IO_2_1_stdout_>, data=0x7f8c3401be80, n=77) at fileops.c:1176
      #3 0x00007f8c3aa4c951 in new_do_write (to_do=77, data=0x7f8c3401be80 "[0.127s][trace][jvmti] [main] GetClassStatus { klass=java.io.FileDescriptor\nJavaIOFileDescriptorAccess\nonizer\nConditionObject\n", fp=0x7f8c3aba96a0 <_IO_2_1_stdout_>) at libioP.h:948
      #4 _IO_new_do_write (to_do=77, data=0x7f8c3401be80 "[0.127s][trace][jvmti] [main] GetClassStatus { klass=java.io.FileDescriptor\nJavaIOFileDescriptorAccess\nonizer\nConditionObject\n", fp=0x7f8c3aba96a0 <_IO_2_1_stdout_>) at fileops.c:426
      #5 _IO_new_do_write (fp=0x7f8c3aba96a0 <_IO_2_1_stdout_>, data=0x7f8c3401be80 "[0.127s][trace][jvmti] [main] GetClassStatus { klass=java.io.FileDescriptor\nJavaIOFileDescriptorAccess\nonizer\nConditionObject\n", to_do=77) at fileops.c:423
      #6 0x00007f8c3aa4a478 in _IO_new_file_sync (fp=0x7f8c3aba96a0 <_IO_2_1_stdout_>) at fileops.c:812
      #7 0x00007f8c3aa3e3c6 in __GI__IO_fflush (fp=0x7f8c3aba96a0 <_IO_2_1_stdout_>) at libioP.h:948
      #8 0x00007f8c39aab29c in LogFileStreamOutput::write(LogDecorations const&, char const*) () from /opt/mach5/mesos/work_dir/jib-master/install/2024-05-18-0217394.leonid.mesnik.jdk/linux-x64-debug.jdk/jdk-23/fastdebug/lib/server/libjvm.so
      #9 0x00007f8c39ab1270 in LogTagSet::vwrite(LogLevel::type, char const*, __va_list_tag*) () from /opt/mach5/mesos/work_dir/jib-master/install/2024-05-18-0217394.leonid.mesnik.jdk/linux-x64-debug.jdk/jdk-23/fastdebug/lib/server/libjvm.so
      #10 0x00007f8c399be6ca in void LogImpl<(LogTag::type)74, (LogTag::type)0, (LogTag::type)0, (LogTag::type)0, (LogTag::type)0, (LogTag::type)0>::write<(LogLevel::type)1>(char const*, ...) () from /opt/mach5/mesos/work_dir/jib-master/install/2024-05-18-0217394.leonid.mesnik.jdk/linux-x64-debug.jdk/jdk-23/fastdebug/lib/server/libjvm.so
      #11 0x00007f8c3999df38 in jvmtiTrace_GetClassStatus () from /opt/mach5/mesos/work_dir/jib-master/install/2024-05-18-0217394.leonid.mesnik.jdk/linux-x64-debug.jdk/jdk-23/fastdebug/lib/server/libjvm.so
      #12 0x00007f8c385cfab1 in classStatus () from /opt/mach5/mesos/work_dir/jib-master/install/2024-05-18-0217394.leonid.mesnik.jdk/linux-x64-debug.jdk/jdk-23/fastdebug/lib/libjdwp.so
      #13 0x00007f8c385b1fa9 in classTrack_initialize () from /opt/mach5/mesos/work_dir/jib-master/install/2024-05-18-0217394.leonid.mesnik.jdk/linux-x64-debug.jdk/jdk-23/fastdebug/lib/libjdwp.so
      #14 0x00007f8c385b4275 in initialize () from /opt/mach5/mesos/work_dir/jib-master/install/2024-05-18-0217394.leonid.mesnik.jdk/linux-x64-debug.jdk/jdk-23/fastdebug/lib/libjdwp.so
      #15 0x00007f8c385b4ec2 in cbEarlyVMInit () from /opt/mach5/mesos/work_dir/jib-master/install/2024-05-18-0217394.leonid.mesnik.jdk/linux-x64-debug.jdk/jdk-23/fastdebug/lib/libjdwp.so
      #16 0x00007f8c399eae04 in JvmtiExport::post_vm_initialized() () from /opt/mach5/mesos/work_dir/jib-master/install/2024-05-18-0217394.leonid.mesnik.jdk/linux-x64-debug.jdk/jdk-23/fastdebug/lib/server/libjvm.so
      #17 0x00007f8c3a03776c in Threads::create_vm(JavaVMInitArgs*, bool*) () from /opt/mach5/mesos/work_dir/jib-master/install/2024-05-18-0217394.leonid.mesnik.jdk/linux-x64-debug.jdk/jdk-23/fastdebug/lib/server/libjvm.so
      #18 0x00007f8c397eb9d4 in JNI_CreateJavaVM () from /opt/mach5/mesos/work_dir/jib-master/install/2024-05-18-0217394.leonid.mesnik.jdk/linux-x64-debug.jdk/jdk-23/fastdebug/lib/server/libjvm.so
      #19 0x00007f8c3ac01ccf in JavaMain () from /opt/mach5/mesos/work_dir/jib-master/install/2024-05-18-0217394.leonid.mesnik.jdk/linux-x64-debug.jdk/jdk-23/fastdebug/bin/../lib/libjli.so
      #20 0x00007f8c3ac05cb9 in ThreadJavaMain () from /opt/mach5/mesos/work_dir/jib-master/install/2024-05-18-0217394.leonid.mesnik.jdk/linux-x64-debug.jdk/jdk-23/fastdebug/bin/../lib/libjli.so
      #21 0x00007f8c3abb6609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #22 0x00007f8c3aadb133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

            lmesnik Leonid Mesnik
            lmesnik Leonid Mesnik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: