-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Master and Slaves on Linux (RedHat), observed behavior on both Jenkins 1.3999 and 1.411, Perforce Client is Rev. P4/LINUX26X86_64/2010.1/265509 (2010/09/23), Perforce server is P4D/LINUX26X86_64/2010.1/265509 (2010/09/23)
I'm not sure with what version of the Perforce plugin this started, but currently, using 1.2.5, when we try to delete a job using the UI, it sometimes completes normally, printing the following to the log:
May 11, 2011 4:48:24 PM hudson.plugins.perforce.PerforceSCM processWorkspaceBeforeDeletion
INFO: Workspace is being deleted; enabling one-time force sync.
May 11, 2011 4:48:24 PM hudson.plugins.perforce.PerforceSCM processWorkspaceBeforeDeletion
INFO: Using remote perforce client: hudson-cjo2011.03-initdb-76240347
May 11, 2011 4:48:24 PM hudson.plugins.perforce.PerforceSCM processWorkspaceBeforeDeletion
INFO: [cjo2011.03-initdb] $ p4 workspace -o hudson-cjo2011.03-initdb-76240347
May 11, 2011 4:48:24 PM hudson.plugins.perforce.PerforceSCM processWorkspaceBeforeDeletion
INFO: Changing P4 Client Root to: /home/cruise/hudson/workspace/cjo2011.03-initdb
May 11, 2011 4:48:24 PM hudson.plugins.perforce.PerforceSCM processWorkspaceBeforeDeletion
INFO: Saving modified client hudson-cjo2011.03-initdb-76240347
May 11, 2011 4:48:24 PM hudson.plugins.perforce.PerforceSCM processWorkspaceBeforeDeletion
INFO: [cjo2011.03-initdb] $ p4 -s client -i
May 11, 2011 4:48:24 PM hudson.plugins.perforce.PerforceSCM processWorkspaceBeforeDeletion
INFO: [cjo2011.03-initdb] $ p4 sync -k //hudson-cjo2011.03-initdb-76240347/...#0
But more often it only gets this far:
May 11, 2011 4:49:13 PM hudson.plugins.perforce.PerforceSCM processWorkspaceBeforeDeletion
INFO: Workspace is being deleted; enabling one-time force sync.
May 11, 2011 4:49:13 PM hudson.plugins.perforce.PerforceSCM processWorkspaceBeforeDeletion
INFO: Using remote perforce client: hudson-cjo2011.03-webservices-e2e-76240347
May 11, 2011 4:49:13 PM hudson.plugins.perforce.PerforceSCM processWorkspaceBeforeDeletion
INFO: [cjo2011.03-webservices-e2e] $ p4 workspace -o hudson-cjo2011.03-webservices-e2e-76240347
At this point the thread handling the request seems to be stuck at:
Handling POST /view/bugfix/job/cjo2011.03-webservices-e2e/doDelete : RequestHandlerThread62
java.lang.Object.wait(Native Method)
hudson.remoting.FastPipedInputStream.read(FastPipedInputStream.java:173)
...
java.io.BufferedReader.readLine(BufferedReader.java:362)
com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:329)
com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:291)
com.tek42.perforce.parse.Workspaces.getWorkspace(Workspaces.java:53)
hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1183)
hudson.plugins.perforce.PerforceSCM.processWorkspaceBeforeDeletion(PerforceSCM.java:2202)
I've attached the full stack trace from the 'monitoring' page (jenkinsDeleteThread_stackTrace.txt). When this happens, all perforce polling stops. If I kill this thread using the monitor page, perforce activities start up again, but the job that was to be deleted is still present.
We've also tried deleting a job with the CLI client, and this also hangs, but if we kill the client, the job does get deleted. I've also attached the log output from when this hung client is killed (jenkinsKilledCLIClient_logOutput.txt).
Let me know if there is any other information I can provide to help debug this.
Are the slaves that the job ran on still up and running when you delete the job?
Basically, when you request a job deletion (regardless of whether you use the CLI or the web GUI), the perforce plugin will sync the workspace to revision #0 (see ENKINS-8118). If for some reason the slave is unstable or in the process of shutting down, it will hang.