JDK-8226192 : sun/security/tools/jarsigner/PassType.java failed due to "Failed to exec spawn helper"
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Affected Version: 14
  • Priority: P3
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: linux
  • CPU: x86_64
  • Submitted: 2019-06-14
  • Updated: 2022-05-03
  • Resolved: 2022-05-03
Related Reports
Relates :  
Sub Tasks
JDK-8226242 :  
Description
The following test failure showed up in the JDK14 CI:

sun/security/tools/jarsigner/PassType.java

Here's a snippet from the log file:

2019-06-14T05:21:28.350684Z] Waiting for completion for process 23082
[2019-06-14T05:21:28.350815Z] Waiting for completion finished for process 23082
Exit value: 0
[2019-06-14T05:21:28.350918Z] Waiting for completion for process 23082
[2019-06-14T05:21:28.350935Z] Waiting for completion finished for process 23082
Command line: [/opt/mach5/mesos/work_dir/jib-master/install/jdk-14+2-6/linux-x64.jdk/jdk-14/bin/jarsigner -J-Duser.language=en -J-Duser.country=US -J-Djava.security.egd=file:/dev/./urandom -keystore ks -storepass test12 a.jar a]
executeProcess() failed: java.io.IOException: Cannot run program "/opt/mach5/mesos/work_dir/jib-master/install/jdk-14+2-6/linux-x64.jdk/jdk-14/bin/jarsigner": error=0, Failed to exec spawn helper.
----------System.err:(35/2251)----------
--- ProcessLog ---
cmd: /opt/mach5/mesos/work_dir/jib-master/install/jdk-14+2-6/linux-x64.jdk/jdk-14/bin/jarsigner -J-Duser.language=en -J-Duser.country=US -J-Djava.security.egd=file:/dev/./urandom -keystore ks -storepass test12 a.jar a
exitvalue: null
stderr: null
stdout: null

java.io.IOException: Cannot run program "/opt/mach5/mesos/work_dir/jib-master/install/jdk-14+2-6/linux-x64.jdk/jdk-14/bin/jarsigner": error=0, Failed to exec spawn helper.
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
	at jdk.test.lib.process.ProcessTools.lambda$privilegedStart$1(ProcessTools.java:480)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:553)
	at jdk.test.lib.process.ProcessTools.privilegedStart(ProcessTools.java:479)
	at jdk.test.lib.process.ProcessTools.executeProcess(ProcessTools.java:366)
	at jdk.test.lib.process.ProcessTools.executeProcess(ProcessTools.java:350)
	at jdk.test.lib.process.ProcessTools.executeCommand(ProcessTools.java:472)
	at jdk.test.lib.SecurityTools.execute(SecurityTools.java:165)
	at jdk.test.lib.SecurityTools.jarsigner(SecurityTools.java:160)
	at jdk.test.lib.SecurityTools.jarsigner(SecurityTools.java:187)
	at PassType.main(PassType.java:76)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
	at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: java.io.IOException: error=0, Failed to exec spawn helper.
	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:319)
	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:250)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
	... 17 more

JavaTest Message: Test threw exception: java.io.IOException
JavaTest Message: shutting down test

result: Failed. Execution failed: `main' threw exception: java.io.IOException: Cannot run program "/opt/mach5/mesos/work_dir/jib-master/install/jdk-14+2-6/linux-x64.jdk/jdk-14/bin/jarsigner": error=0, Failed to exec spawn helper.


test result: Failed. Execution failed: `main' threw exception: java.io.IOException: Cannot run program "/opt/mach5/mesos/work_dir/jib-master/install/jdk-14+2-6/linux-x64.jdk/jdk-14/bin/jarsigner": error=0, Failed to exec spawn helper.

Since this is a tier2 failure, I'm starting this bug as a P3.
Comments
Hi guys, anything new on that? Did this happen again? The reason I ask is that I would like to backport JDK-8223777 back to 11 but I do not dare to do so until this is cleared up...
27-06-2019

With just one failure in the middle of a full test run, its likely to be a transient issue. Nothing as stable as the permissions on jsspawnhelper. Is there any other diagnostic status that can be reported?
17-06-2019

Maybe. But this could be a real issue. Is the jspawnhelper executable? Before JDK-8223777, these failures were swallowed, so even though the sub process could not be spawned the parent process did not notice. Could it be that failure to spawn sub processes were ignored before, or came up as different errors? I'm in vacation right now and will not be able to analyze this before end of the month. Should you really think this is a real error introduced by my patch you need to backout 8223777. But I would like to understand what is wrong first :(
15-06-2019

[~stuefe] - JDK-8223777 was recently pushed to jdk/jdk. Do you think this failure might be related?
14-06-2019