RFR: 8351309: test/hotspot/jtreg/runtime/posixSig/TestPosixSig.java fails on static-jdk

Jiangli Zhou jiangli at openjdk.org
Thu Mar 6 16:59:56 UTC 2025


On Thu, 6 Mar 2025 05:55:48 GMT, Man Cao <manc at openjdk.org> wrote:

> libjsig is not supposed to be enabled by default. Per [Java 23 doc](https://docs.oracle.com/en/java/javase/23/troubleshoot/handle-signals-and-exceptions.html#GUID-CB49A2A7-2A9F-4C18-948F-6D4A96FF688D), it is user's choice whether to use libjsig.so. If they use it, they should either link the application with linker flag `-ljsig`, or use LD_PRELOAD.

For static JDK usages, the documentation would need to be updated when things are mature. There are cases where dynamic linking is not preferred and static linking should be used, and those are common in real world usages. We want to provide `libjsig.a` as part of the static bundle, users can link the launcher executable with `libjsig.a` for hermetic image if application wants to use `libjsig`. 

I think in general, using `libjsig.so` shared library is not an attractive solution on static & hermetic Java image, if application uses `libjsig`. In order to use `libjsig.so` for a hermetic Java image, there would be a separate regular JDK with the shared libraries installed into the target machine. Then it loses part of the benefits of using hermetic Java image.

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

PR Comment: https://git.openjdk.org/jdk/pull/23924#issuecomment-2704412958


More information about the build-dev mailing list