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

Zero: Cannot invoke JVM in primordial threads on Zero

    XMLWordPrintable

Details

    • b15

    Backports

      Description

        Running current Zero with gtests:

        $ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=jtreg:gtest/

        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/home/shade/trunks/jdk/src/hotspot/os/linux/os_linux.cpp:3227), pid=562477, tid=562477
        # assert(imin <= imax) failed: Unexpected page size

        The actual problem is underflow in os::pd_create_stack_guard_pages() here:

        stack_extent = (uintptr_t) get_stack_commited_bottom(
        os::Linux::initial_thread_stack_bottom(),
        (size_t)addr - stack_extent);

        For Zero x86_64, these are off by a page, so the (addr - stack_extent) underflows, then get_stack_commited_bottom gets called with super-large size, which then fails the assert above. The assert should check for underflow specifically.

        [0.002s][warning][os] Addr: 0x00007fff35e73000, stack_extent: 0x00007fff35e74000

        I believe the root cause is primordial thread (which is why it is only seen in gtests?) having a weird stack base, which is explicitly handled by the shared code commonned by JDK-8169373. I see little reason not to use the same code for Zero. There is the IA64 block in Zero version that handles the double stack on Itanium, but I think we can sacrifice it since Itanium is discontinued.

        Attachments

          Issue Links

            Activity

              People

                shade Aleksey Shipilev
                shade Aleksey Shipilev
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: