RFR: 8338883: Add core dump info to -Xlog:os=info [v5]

Thomas Stuefe stuefe at openjdk.org
Wed Sep 11 05:55:05 UTC 2024


On Tue, 10 Sep 2024 19:44:40 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:

> > Proposal:
> > 
> > * if both `CreateCoredumpOnCrash`=1 _and_ it had been explicitly enabled at the command line, write an unconditional warning using the warning() function if it looks like core files would be prevented
> 
> The default for a new Ubuntu and macOS shell (via Terminal app) `ulimit core file size` is 0, ex:
> 
> Ubuntu Linux:
> 
> ```
> $ ulimit -a
> real-time non-blocking time  (microseconds, -R) unlimited
> core file size              (blocks, -c) 0
> data seg size               (kbytes, -d) unlimited
> scheduling priority                 (-e) 0
> file size                   (blocks, -f) unlimited
> pending signals                     (-i) 63211
> max locked memory           (kbytes, -l) 2032864
> max memory size             (kbytes, -m) unlimited
> open files                          (-n) 1024
> pipe size                (512 bytes, -p) 8
> POSIX message queues         (bytes, -q) 819200
> real-time priority                  (-r) 0
> stack size                  (kbytes, -s) 8192
> cpu time                   (seconds, -t) unlimited
> max user processes                  (-u) 63211
> virtual memory              (kbytes, -v) unlimited
> file locks                          (-x) unlimited
> ```
> 
> macOS:
> 
> ```
> # ulimit -a
> -t: cpu time (seconds)              unlimited
> -f: file size (blocks)              unlimited
> -d: data seg size (kbytes)          unlimited
> -s: stack size (kbytes)             8176
> -c: core file size (blocks)         0
> -v: address space (kbytes)          unlimited
> -l: locked-in-memory size (kbytes)  unlimited
> -u: processes                       6000
> -n: file descriptors                256
> ```
> 
> so JVM would show a warning every time a user sets `CreateCoredumpOnCrash=true`.
> 
> I like the idea of a custom message, and I agree that putting it into `log` makes it harder to use, but are we sure we are OK with printing this in a warning (when explicitly requested, but system limit not set correctly)?
> 

It was just an idea. I personally like a strong reminder that cores are disabled. The "if CreateCoredumpOnCrash is true and set explicitly" is a crutch, but I have no better idea. You are right, we certainly don't want a message every time the JVM comes up.

> The more I think about this the more I like it personally, just want to make sure others agree.

Sure thing

-------------

PR Comment: https://git.openjdk.org/jdk/pull/20734#issuecomment-2342680614


More information about the hotspot-runtime-dev mailing list