-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8351309: test/hotspot/jtreg/runtime/posixSig/TestPosixSig.java fails on static-jdk #23924
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back jiangli! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
@jianglizhou The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM. Perhaps wait for another approval from a reviewer?
libjsig is not supposed to be enabled by default. Per Java 23 doc, 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.
I am a bit confused here. libjsig is an application/end-user library. It sounds like something is statically linking libjsig and causing signal chaining to break. ??? |
This is not the correct way to solve this. You should flag libjsig as |
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 I think in general, using |
libjsig is provided by JDK.
AFAICT, signal chaining works when libjsig is statically linked (I stepped through the code in TestPosixSig.java failure is a test problem. The test looks for the print output from jdk/src/hotspot/os/posix/signals_posix.cpp Line 1359 in 0892913
|
I think we do want to include |
But if we do not link it with the launcher, it will not get tested. I don't think it is a good idea to provide a binary that have not even had a shred of testing. I'm rather leaning towards saying that signal chaining is not possible for a static JDK. |
Signal chaining works on static. So I don't think we should say it's not possible. :-) I had some thoughts on testing earlier. For testing we want to create a test that builds a hermetic image (when supported in mainline) that statically links with the libjsig.a, to exercise the signal chaining in that combination. We should create a bug for that so we don't forget. The main point is that we don't want to test with signal chaining enabled by default on static JDK. |
I meant more like "not supported". You are correct that it is technically possible. How useful is signal chaining even these days? While we could do something like this, I see more trouble ahead. How should we do when we put the static libs in a jmod? Should all static libraries have an "optional/required" flag attached to them? How do the user select if libjsig should be included or not? I would argue that for the time being, it is better to set libjsig as |
IIUC, signal chaining is a link time question for native executable using hotspot(launchers), the So, for the future jmod to support static linking, it could include libjsig.a or leave it out and have user to explicit download and link their native application. As for the |
I think I could be convinced, but it probably not a decision could be made by just us. :-) I think it would require broader discussion and decision making on if the JDK signal chaining provided by libjsig should be supported on static JDK. That decision probably should be made as part of a JEP process when we move to that step. |
Right. And, I think we should not enable that by default to keep the same behavior as on regular JDK. |
It seems we agree that we need, at some point, to have a high-level discussion on if libjsig should be supported on static builds, and if so, how it should be implemented. We also agree that having signal chaining enabled by default on our static JDK builds are incorrect. However, I suggest we chose a simple path, were we utilize the framework for not building a static library that we do not use (this is already done for several libraries that are not included in the static JDK image), while you suggest we keep compiling it, even if we do not include it and test it. I don't get the point of this. If we don't include it, and don't test it, then surely it would be better to not even build it now? |
Please review this PR that excludes
libjsig
from being statically linked withstatic-jdk
java
launcher by default. Please see details in https://bugs.openjdk.org/browse/JDK-8351309 description and comments. ThanksProgress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23924/head:pull/23924
$ git checkout pull/23924
Update a local copy of the PR:
$ git checkout pull/23924
$ git pull https://git.openjdk.org/jdk.git pull/23924/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 23924
View PR using the GUI difftool:
$ git pr show -t 23924
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23924.diff
Using Webrev
Link to Webrev Comment