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

Core file generation will silently fail if /cores directory has wrong permissions set

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • tbd
    • 15
    • hotspot

      After reinstalling my OS X, my system had these permissions set on "/cores" folder:

      drwxr-xr-x 2 root wheel 64 Aug 23 18:01 cores

      Which would make our crash handler call to abort() fail to generate the core file, so hs_err_pid crash log file would end up lying:

      # Core dump will be written. Default location: /cores/core.64980
      ...
      Dumping core ...

      as core file would NOT be written.

      The solution is for the user to do:

      sudo chmod a+w /cores

      but it would be nice if hs_err_pid would say something about it.

      For example it already says this:

      # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again

      if ulimit is not set, so it should say something similar if wrong permissions are set on "/cores" folder, that prohibit core file dumps.

            gziemski Gerard Ziemski
            gziemski Gerard Ziemski
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: