Gradle:java.io.IOException:管道正在关闭

And*_*ver 6 java gradle

在我的 CI 机器(Windows 10)上,我运行 Gradle 测试。基本上在机器上,在测试任务之前执行 git pull 和 java 编译。


这个任务...

测试 --tests my.package.SomeTestClass

因此异常而失败...

00:00:32,989 INFO  - Successfully started process 'Gradle Test Executor 1'
00:00:35,925 INFO  - Error occurred during initialization of VM
00:00:35,927 INFO  - Unable to allocate 16384KB bitmaps for parallel garbage collection for the requested 524288KB heap.
00:00:35,927 ERROR - Error: Could not create the Java Virtual Machine.
00:00:35,929 ERROR - Error: A fatal exception has occurred. Program will exit.
00:00:35,930 INFO  - 
00:00:35,930 ERROR - Could not write standard input to Gradle Test Executor 1.
00:00:35,932 ERROR - java.io.IOException: The pipe is being closed
00:00:35,932 ERROR -     at java.io.FileOutputStream.writeBytes(Native Method)
00:00:35,934 ERROR -     at java.io.FileOutputStream.write(FileOutputStream.java:326)
00:00:35,934 ERROR -     at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
00:00:35,934 ERROR -     at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
00:00:35,934 ERROR -     at org.gradle.process.internal.streams.ExecOutputHandleRunner.forwardContent(ExecOutputHandleRunner.java:67)
00:00:35,934 ERROR -     at org.gradle.process.internal.streams.ExecOutputHandleRunner.run(ExecOutputHandleRunner.java:52)
00:00:35,934 ERROR -     at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
00:00:35,934 ERROR -     at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
00:00:35,934 ERROR -     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
00:00:35,934 ERROR -     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
00:00:35,934 ERROR -     at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
00:00:35,934 ERROR -     at java.lang.Thread.run(Thread.java:748)
00:00:35,934 INFO  - 
00:00:35,935 INFO  - > Task :test FAILED
Run Code Online (Sandbox Code Playgroud)

我正在使用 Gradle 包装器 5.4.1。我的 gradle.properties 看起来像:

org.gradle.daemon=false
org.gradle.jvmargs=-Xmx2g
Run Code Online (Sandbox Code Playgroud)

几个月前,当我启用 Gradle 守护程序时,我遇到了同样的问题。

我正在监控我的 CI 机器,我可以看到此时机器有大约 750MB 的可用内存,这比所需的 512MB 多(参见例外)。不确定这是否相关,但节点正在运行 Quickbuild 代理。


这个错误究竟意味着什么,我该如何摆脱它?