-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Hello! My company uses the jenkins p4-plugin https://github.com/jenkinsci/p4-plugin and have been experiencing an issue on Windows where files are locked by java.exe which cause future builds on the same agent to fail. Here's an example from the jenkins pipeline:
I grabbed a memory dump and looked at it and noticed FileDescriptors with no references waiting for GC. If I force GC to run the build works fine, the file locks are gone. The parent of the FileDescriptor was:
So I started looking at p4java and have found multiple places where an RpcOutputStream is opened but never closed:.
Here it's only closed in the handling one exception but nowhere else:
p4java/src/main/java/com/perforce/p4java/impl/mapbased/rpc/func/client/ClientSystemFileCommands.java
Line 557 in dd0347f
| outStream.close(); |
Here it's just never closed:
p4java/src/main/java/com/perforce/p4java/impl/mapbased/rpc/func/client/ClientFunctionDispatcher.java
Line 140 in dd0347f
| RpcOutputStream outStream = this.fileCommands.getTempOutputStream(cmdEnv); |
This is by no means an exhaustive list, but I wanted to make an issue before continuing to see what you thought. For now we are forced to run GC at the beginning of every build which is definitely not ideal. Would love some help!

