Hi, we are getting the following error intermittently on our CI server (Jenkins) which is running on a Solaris Box. This is with Gradle 1.8 and Java 1.7.0_45 and running a large multi-project build.
java.lang.InternalError: Could not create SecurityManager: jarjar.org.gradle.process.internal.child.BootstrapSecurityManager
Here’s some further output from our build:
:standaloneIntegrationTests:test
:standaloneIntegrationTests:check
:standaloneIntegrationTests:build
:systemEvent:assemble
:systemEvent:compileTestJava UP-TO-DATE
:systemEvent:processTestResources UP-TO-DATE
:systemEvent:testClasses UP-TO-DATE
:systemEvent:test UP-TO-DATE
:systemEvent:check UP-TO-DATE
:systemEvent:build
:systemIdentity:assemble
:systemIdentity:compileTestJavaNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:systemIdentity:processTestResources UP-TO-DATE
:systemIdentity:testClasses
:systemIdentity:test
Error occurred during initialization of VM
java.lang.InternalError: Could not create SecurityManager: jarjar.org.gradle.process.internal.child.BootstrapSecurityManager
at sun.misc.Launcher.<init>(Launcher.java:106)
at sun.misc.Launcher.<clinit>(Launcher.java:57)
at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1489)
at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1474)
Could not write standard input into: Gradle Worker 45.
java.io.IOException: Broken pipe
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:345)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at org.gradle.process.internal.streams.ExecOutputHandleRunner.run(ExecOutputHandleRunner.java:50)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Error occurred during initialization of VM
java.lang.InternalError: Could not create SecurityManager: jarjar.org.gradle.process.internal.child.BootstrapSecurityManager
at sun.misc.Launcher.<init>(Launcher.java:106)
at sun.misc.Launcher.<clinit>(Launcher.java:57)
at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1489)
at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1474)
Could not write standard input into: Gradle Worker 46.
java.io.IOException: Broken pipe
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:345)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at org.gradle.process.internal.streams.ExecOutputHandleRunner.run(ExecOutputHandleRunner.java:50)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Process 'Gradle Worker 46' finished with non-zero exit value 1
org.gradle.process.internal.ExecException: Process 'Gradle Worker 46' finished with non-zero exit value 1
at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:361)
at org.gradle.process.internal.DefaultWorkerProcess.onProcessStop(DefaultWorkerProcess.java:89)
at org.gradle.process.internal.DefaultWorkerProcess.access$000(DefaultWorkerProcess.java:33)
at org.gradle.process.internal.DefaultWorkerProcess$1.executionFinished(DefaultWorkerProcess.java:55)
at sun.reflect.GeneratedMethodAccessor315.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:81)
at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:30)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy43.executionFinished(Unknown Source)
at org.gradle.process.internal.DefaultExecHandle.setEndStateInfo(DefaultExecHandle.java:209)
at org.gradle.process.internal.DefaultExecHandle.finished(DefaultExecHandle.java:306)
at org.gradle.process.internal.ExecHandleRunner.completed(ExecHandleRunner.java:105)
at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:85)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
:systemIdentity:test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':systemIdentity:test'.
> Process 'Gradle Worker 45' finished with non-zero exit value 1
This seems similar to the error reported on http://issues.gradle.org//browse/GRADLE-2280, however in our ‘systemIdentity’ project we aren’t setting any jvmargs or system properties for the test task. However in the project ‘standaloneIntegrationTests’ (which runs before systemIdentity:test) we set the following.
test {
// If debug is required then put the forked JVM into debug mode and wait on a port for the debugger
// See gradle docs here: http://www.gradle.org/releases/1.0-milestone-6/docs/dsl/org.gradle.api.tasks.testing.Test.html
if (System.properties['oisGradleTestDebug'] == 'true') {
jvmArgs '-Xdebug', '-Xnoagent', '-Djava.compiler=NONE', '-Xrunjdwp:transport=dt_socket,address=8795,server=y,suspend=y'
}
jvmArgs '-Xmx1024m', '-XX:MaxPermSize=256m', '-XX:+HeapDumpOnOutOfMemoryError'
systemProperties 'uk.co.orchardsystems.shared.utils.PropertyFileName': '/OrchardPropertiesJBoss.properties',
'log4j.configuration': "log4j-tests.xml",
'BaseOisAbstractJpaTests.TestUserName': 'orchard',
'BaseOisAbstractJpaTests.TestPassword': 'charlotte',
'uk.co.orchardsystems.uwm.cm.letters.mergeit.meridio.DataExchangeDefinitionFixtures.WsdlUrlString': file('docs/dip/meridio/WSDLs/orchard_EDRMService_v2a.wsdl').toURL(),
'uk.co.orchardsystems.uwm.cm.letters.mergeit.wisdomws.DataExchangeDefinitionFixtures.WsdlUrlString': file('docs/dip/wisdomws/WSDL/arcHousePlus.wsdl').toURL(),
'uk.co.orchardsystems.uwm.cm.letters.mergeit.genericws.DataExchangeDefinitionFixtures.WsdlUrlString': file('docs/dip/genericws/WSDLs/orchard_genericws_EDRMService.wsdl').toURL(),
'uk.co.orchardsystems.db.connection.Url' : 'Orchard:RU:jdbc:datadirect:openedge://localhost:5000;databaseName=uwm',
'uk.co.orchardsystems.test.TestConfig.BaseTestDir': new File(System.getProperty("java.io.tmpdir")),
'uk.co.orchardsystems.test.TestConfig.WorkspaceDir': file("$rootDir/../").canonicalPath,
'uk.co.orchardsystems.test.TestConfig.MergeITDipSystemInfoFileCheckingEnabledMode': 'FALSE',
'CallInfoFileManager.OutputDirectory': '/opt/tomcat5.5/webapps/task1705_DummyEdrmService/data'
}
The System Property ‘oisGradleTestDebug’ isn’t set so the debug JVM args aren’t being set.