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

BasicParState::default_estimated_thread_count(false) can return 0 in gtest

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 11
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • Resolved In Build:
      b16

      Backports

        Description

        When running gtest on 1 CPU this happens:

        (gdb) f 6
        #6 0x00007fa0fca85f0b in OopStorage::BasicParState::BasicParState (this=0x7ffd78484a58, storage=<optimized out>, estimated_thread_count=0, concurrent=<optimized out>)
            at /home/rehn/source/jdk/safepoint-jdk/open/src/hotspot/share/gc/shared/oopStorage.cpp:923
        923 assert(estimated_thread_count > 0, "estimated thread count must be positive");
        (gdb) p ConcGCThreads ParallelGCThreads
        A syntax error in expression, near `ParallelGCThreads'.
        (gdb) p ConcGCThreads
        $1 = 0
        (gdb) p ParallelGCThreads
        $2 = 0
        (gdb) up
        #7 0x00007fa0fb8d677c in OopStorage::ParState<false, false>::ParState (estimated_thread_count=<optimized out>, storage=0x2766390, this=0x7ffd78484a58)
            at /home/rehn/source/jdk/safepoint-jdk/open/src/hotspot/share/gc/shared/oopStorageParState.hpp:198
        198 _basic_state(storage, estimated_thread_count, false)
        (gdb) bt
        #0 0x00007fa0fa80f660 in raise () from /lib64/libc.so.6
        #1 0x00007fa0fa810c41 in abort () from /lib64/libc.so.6
        #2 0x00007fa0fca966ed in os::abort (dump_core=<optimized out>, siginfo=<optimized out>, context=<optimized out>) at /home/rehn/source/jdk/safepoint-jdk/open/src/hotspot/os/linux/os_linux.cpp:1411
        #3 0x00007fa0fce589ad in VMError::report_and_die (id=id@entry=-536870912, message=message@entry=0x7fa0fd05ce50 "assert(estimated_thread_count > 0) failed",
            detail_fmt=detail_fmt@entry=0x7fa0fd05ce28 "estimated thread count must be positive", detail_args=detail_args@entry=0x7ffd78484868, thread=<optimized out>, pc=pc@entry=0x0, siginfo=0x0, context=0x0,
            filename=0x7fa0fd05c790 "/home/rehn/source/jdk/safepoint-jdk/open/src/hotspot/share/gc/shared/oopStorage.cpp", lineno=923, size=0)
            at /home/rehn/source/jdk/safepoint-jdk/open/src/hotspot/share/utilities/vmError.cpp:1526
        #4 0x00007fa0fce5951f in VMError::report_and_die (thread=<optimized out>, context=context@entry=0x0,
            filename=filename@entry=0x7fa0fd05c790 "/home/rehn/source/jdk/safepoint-jdk/open/src/hotspot/share/gc/shared/oopStorage.cpp", lineno=lineno@entry=923,
            message=message@entry=0x7fa0fd05ce50 "assert(estimated_thread_count > 0) failed", detail_fmt=detail_fmt@entry=0x7fa0fd05ce28 "estimated thread count must be positive", detail_args=0x7ffd78484868)
            at /home/rehn/source/jdk/safepoint-jdk/open/src/hotspot/share/utilities/vmError.cpp:1266
        #5 0x00007fa0fc0c6380 in report_vm_error (file=file@entry=0x7fa0fd05c790 "/home/rehn/source/jdk/safepoint-jdk/open/src/hotspot/share/gc/shared/oopStorage.cpp", line=line@entry=923,
            error_msg=error_msg@entry=0x7fa0fd05ce50 "assert(estimated_thread_count > 0) failed", detail_fmt=detail_fmt@entry=0x7fa0fd05ce28 "estimated thread count must be positive")
            at /home/rehn/source/jdk/safepoint-jdk/open/src/hotspot/share/utilities/debug.cpp:231
        #6 0x00007fa0fca85f0b in OopStorage::BasicParState::BasicParState (this=0x7ffd78484a58, storage=<optimized out>, estimated_thread_count=0, concurrent=<optimized out>)
            at /home/rehn/source/jdk/safepoint-jdk/open/src/hotspot/share/gc/shared/oopStorage.cpp:923
        #7 0x00007fa0fb8d677c in OopStorage::ParState<false, false>::ParState (estimated_thread_count=<optimized out>, storage=0x2766390, this=0x7ffd78484a58)
            at /home/rehn/source/jdk/safepoint-jdk/open/src/hotspot/share/gc/shared/oopStorageParState.hpp:198
        #8 OopStorageTestParIteration::Task<false, false>::Task (vstate=0x7ffd784849e0, storage=0x2766390, name=0x7fa0fcfcf56e "test", this=0x7ffd78484a40)
            at /home/rehn/source/jdk/safepoint-jdk/open/test/hotspot/gtest/gc/shared/test_oopStorage.cpp:911
        #9 OopStorageTestParIteration_par_state_safepoint_iterate_test_vm_Test::TestBody (this=0x2766250) at /home/rehn/source/jdk/safepoint-jdk/open/test/hotspot/gtest/gc/shared/test_oopStorage.cpp:960
        #10 0x00007fa0fb7d9522 in testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void> (location=<synthetic pointer>, method=&virtual testing::Test::TestBody(), object=0x2766250)
            at /home/rehn/source/jdk/safepoint-jdk/open/test/fmw/gtest/src/gtest.cc:2137
        #11 testing::Test::Run (this=0x2766250) at /home/rehn/source/jdk/safepoint-jdk/open/test/fmw/gtest/src/gtest.cc:2153
        #12 0x00007fa0fb7d981d in testing::Test::Run (this=<optimized out>) at /home/rehn/source/jdk/safepoint-jdk/open/test/fmw/gtest/src/gtest.cc:2145
        #13 testing::TestInfo::Run (this=0x252dc50) at /home/rehn/source/jdk/safepoint-jdk/open/test/fmw/gtest/src/gtest.cc:2329
        #14 0x00007fa0fb7d9a8d in testing::TestInfo::Run (this=<optimized out>) at /home/rehn/source/jdk/safepoint-jdk/open/test/fmw/gtest/src/gtest.cc:2457
        #15 testing::TestCase::Run (this=0x252de30) at /home/rehn/source/jdk/safepoint-jdk/open/test/fmw/gtest/src/gtest.cc:2447
        #16 0x00007fa0fb7dc252 in testing::TestCase::Run (this=<optimized out>) at /home/rehn/source/jdk/safepoint-jdk/open/test/fmw/gtest/src/gtest.cc:4316
        #17 testing::internal::UnitTestImpl::RunAllTests (this=this@entry=0x250c000) at /home/rehn/source/jdk/safepoint-jdk/open/test/fmw/gtest/src/gtest.cc:4318
        #18 0x00007fa0fb7dc45a in testing::internal::UnitTestImpl::RunAllTests (this=<optimized out>) at /home/rehn/source/jdk/safepoint-jdk/open/test/fmw/gtest/src/gtest.cc:4235
        #19 testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (location=<synthetic pointer>,
            method=(bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 0x7fa0fb7dc3c0 <testing::internal::UnitTestImpl::RunAllTests()>, object=0x250c000)
            at /home/rehn/source/jdk/safepoint-jdk/open/test/fmw/gtest/src/gtest.cc:2137
        #20 testing::UnitTest::Run (this=<optimized out>) at /home/rehn/source/jdk/safepoint-jdk/open/test/fmw/gtest/src/gtest.cc:3929
        #21 0x00007fa0fb7e4c3b in RUN_ALL_TESTS () at /home/rehn/source/jdk/safepoint-jdk/open/test/fmw/gtest/include/gtest/gtest.h:2288
        #22 runUnitTestsInner (argc=<optimized out>, argc@entry=3, argv=<optimized out>, argv@entry=0x7ffd78484eb8) at /home/rehn/source/jdk/safepoint-jdk/open/test/hotspot/gtest/gtestMain.cpp:253
        #23 0x00007fa0fb7e4e7e in runUnitTests (argc=3, argv=0x7ffd78484eb8) at /home/rehn/source/jdk/safepoint-jdk/open/test/hotspot/gtest/gtestMain.cpp:323
        #24 0x0000000000400597 in main (argc=3, argv=0x7ffd78484eb8) at /home/rehn/source/jdk/safepoint-jdk/open/test/hotspot/gtest/gtestLauncher.cpp:31

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                kbarrett Kim Barrett
                Reporter:
                rehn Robbin Ehn
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: