8382879: AOT training run exits with 0 even if assembly subprocess fails#31496
Conversation
|
👋 Welcome back iklam! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
The total number of required reviews for this PR has been set to 2 based on the presence of this label: |
|
/reviewers 1 reviewer |
| if (status != 0) { | ||
| log_error(aot)("Child process failed; status = %d", status); | ||
| vm_exit(status); | ||
| // We leave the temp config file for debugging |
There was a problem hiding this comment.
Unreachable comment. Should we move this comment line before vm_exit(status)
| */ | ||
|
|
||
| import java.io.File; | ||
| import java.nio.file.Path; |
There was a problem hiding this comment.
Unuse 'import java.nio.file.Path;'.
|
|
||
| public static void main(String[] args) throws Exception { | ||
| // The main training run process should report the failure if the AOT assembly | ||
| // sub-processes has failed. |
There was a problem hiding this comment.
'sub-process has failed.' maybe better.
| "-XX:AOTCacheOutput=" + aotCacheFile, | ||
| "-cp", appJar, helloClass); | ||
| pb.environment().put("JDK_AOT_VM_OPTIONS", "-XX:+NoSuchOption"); | ||
| OutputAnalyzer out = CDSTestUtils.executeAndLog(pb, "ontstep-train"); |
There was a problem hiding this comment.
Maybe better with 'onestep-train'
| out.shouldContain("Picked up JDK_AOT_VM_OPTIONS: -XX:+NoSuchOption"); | ||
| out.shouldContain("Unrecognized VM option 'NoSuchOption'"); | ||
| out.shouldContain("Error: Could not create the Java Virtual Machine."); | ||
| out.shouldHaveExitValue(1); |
There was a problem hiding this comment.
Could we add negative check like out.shouldNotContain("AOTCache creation is complete");
vnkozlov
left a comment
There was a problem hiding this comment.
May be add comment that we do this in all cases, including jcmd or AOTMXbean.
|
/reviewers 2 reviewer |
johan-sjolen
left a comment
There was a problem hiding this comment.
This seems fine by me.
If the sub-process that assembles the AOT cache has failed, the main JVM process that executes the training run should also exit immediately with an error code.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/31496/head:pull/31496$ git checkout pull/31496Update a local copy of the PR:
$ git checkout pull/31496$ git pull https://git.openjdk.org/jdk.git pull/31496/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 31496View PR using the GUI difftool:
$ git pr show -t 31496Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/31496.diff
Using Webrev
Link to Webrev Comment