RFR: 8368365: ASAN errors should produce hs-err files and core dumps [v8]
Thomas Stuefe
stuefe at openjdk.org
Thu Oct 23 09:13:55 UTC 2025
> When we run with ASAN enabled and ASAN catches an error, it reports, then stops the JVM. hs-err files and crash dumps at that point would be incredibly useful, though. The ASAN error report itself is seldom enlightening since it only contains native stacks.
>
> After this patch, the JVM will always produce hs-err files when an ASAN-report happens. It will *only* produce core files if ASAN_OPTIONS `disable_coredump=0` and `abort_on_error=1` and the JVM option `CreateCoredumpOnCrash` had not been disabled (and the limit for core file size is high enough etc, all the usual restrictions on OS level still apply).
>
> This means that ASAN builds, by default, will continue to *not* generate cores, since ASAN default options inhibit that. See detail in the comments below.
>
> ---
>
> Tested on Fedora 42 and Debian 12, both manually and by running the new companion jtreg test.
Thomas Stuefe has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits:
- Merge branch 'openjdk:master' into JDK-8368365-ASAN-errors-should-generate-hs-err-files-and-core-dumps
- Update address.cpp
- Update address.cpp
- Comment reference to asan_interface.h
- fix
- rethink core file behavior
- Update address.cpp
- remove stray modification
- stupid sort includes test
- add jtreg test
- ... and 2 more: https://git.openjdk.org/jdk/compare/aec13888...f6f84b28
-------------
Changes: https://git.openjdk.org/jdk/pull/27446/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27446&range=07
Stats: 245 lines in 7 files changed: 243 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/27446.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27446/head:pull/27446
PR: https://git.openjdk.org/jdk/pull/27446
More information about the hotspot-dev
mailing list