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

Add option that tests generating a small core file and prints the ulimit



    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 9
    • Fix Version/s: 11
    • Component/s: hotspot


      A common problem in enterprise environments is that core files are not generated (on Linux, usually the ulimit is set to 0). This of course hinders us from debugging crashes. Sometimes, enabling core files are difficult, either due to the user starting the JVM not having the correct rights, or because there are other settings in their system hindering core files from being created.

      In some cases, if we are debugging something that happens rarely, we may lose several iterations when the customer thinks they have enabled core files, but once we run into the issue no file is generated.

      Therefore, we would want an option that verifies that core files can be created during start-up. It could be Xverbose:core, or it could be called something else.

      In order to make sure core files can be created, the best thing would be to spawn off a small process, kill it, and verify that a core file has been created. We could then print that the core file was created and maybe that it had the right file size. We could also print the ulimit for corefiles. If the ulimit is big enough (or unlimited) and if we succeeded in creating a small core file, then we can be pretty sure that core files are enabled and that the JVM will generate a core file if it crashes again.

      We want the JVM to continue running (so we don't want to dump the actual JVM). That way, the customer can add -Xverbose:core to their standard start-up scripts and verify that core files are enabled as they start their application.




            Unassigned Unassigned
            mcastegr Mattis Castegren (Inactive)
            0 Vote for this issue
            3 Start watching this issue