[JIRA] (JENKINS-58161) Agent time out with P4Groovy sync after 5 minutes?

32 views
Skip to first unread message

kwirth@perforce.com (JIRA)

unread,
Jun 24, 2019, 6:38:02 AM6/24/19
to jenkinsc...@googlegroups.com
Karl Wirth assigned an issue to Karl Wirth
 
Jenkins / Improvement JENKINS-58161
Agent time out with P4Groovy sync after 5 minutes?
Change By: Karl Wirth
Assignee: Karl Wirth
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

kwirth@perforce.com (JIRA)

unread,
Jun 24, 2019, 6:38:02 AM6/24/19
to jenkinsc...@googlegroups.com
Karl Wirth created an issue
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: p4-plugin
Created: 2019-06-24 10:37
Environment: 1.10.0 P4Plugin
2.176.1 (Cloudbees)
Priority: Trivial Trivial
Reporter: Karl Wirth

When using 'p4.run("sync","//PATH/...") the Windows 10 slave drops the connection after 5 minutes every time. This was proven on a Webex using Wireshark.

If 'p4sync()' is used the command ran to completion (20 minutes). Potentially there is a problem with P4Groovy commands not displaying any output till the end of the command that is triggering this problem.

This ticket has been created to record the occurrence, allow me to try and reproduce the problem and to be a place holder where other reports of the same problem can be recorded.

Note: Cloudbees support were unable to find a problem on their side.

kwirth@perforce.com (JIRA)

unread,
Jun 24, 2019, 7:23:02 AM6/24/19
to jenkinsc...@googlegroups.com
Karl Wirth updated an issue
Change By: Karl Wirth
When using 'p4.run("sync","//PATH/...") the Windows 10 slave drops the connection after 5 minutes every time. This was proven on a Webex using Wireshark.

If 'p4sync()' is used the command ran to completion (20 minutes). Potentially there is a problem with P4Groovy commands not displaying any output till the end of the command that is triggering this problem.

This ticket has been created to record the occurrence, allow me to try and reproduce the problem and to be a place holder where other reports of the same problem can be recorded.

+Note:+ Cloudbees support were unable to find a problem on their side.

 

Example jenkinsfile (in editor):
{code:java}
pipeline{
    agent{
        label 'Win10'
    }
    stages{
        stage('P4 Sync'){
            steps{
                script{
                    def p4 = p4 credential: 'MasterCredential', workspace: manualSpec(charset: 'utf8', name: 'CLIENT', pinHost: false, spec: clientSpec(allwrite: true, backup: false, clobber: false, compress: false, line: 'WIN', locked: false, modtime: false, rmdir: false, streamName: '', type: 'WRITABLE', view: '//depot/... //CLIENT/...'))
                    p4.run("sync","-f", "//depot/PATH/...#0")
                    p4.run("sync","-f", "//depot/PATH/...")
                }
            }
        }
    }
}
{code}

kwirth@perforce.com (JIRA)

unread,
Jul 1, 2019, 11:28:02 AM7/1/19
to jenkinsc...@googlegroups.com

kwirth@perforce.com (JIRA)

unread,
Jul 1, 2019, 11:30:02 AM7/1/19
to jenkinsc...@googlegroups.com
Karl Wirth assigned an issue to Unassigned
Change By: Karl Wirth
Assignee: Karl Wirth

boczar@hotmail.com (JIRA)

unread,
Jul 8, 2019, 2:03:02 PM7/8/19
to jenkinsc...@googlegroups.com
Alexander Boczar commented on Improvement JENKINS-58161
 
Re: Agent time out with P4Groovy sync after 5 minutes?

I'm running into this variation when running P4Groovy:

It times out after 30 seconds if there's no output because of this hard-coded beauty:

 

https://github.com/jenkinsci/remoting/blob/master/src/main/java/hudson/remoting/Request.java:171

  // wait until the response arrives
t.setName(name+" / waiting for "channel.getName()" id="+id);
while(response==null && !channel.isInClosed())
// I don't know exactly when this can happen, as pendingCalls are cleaned up by Channel,
// but in production I've observed that in rare occasion it can block forever, even after a channel
// is gone. So be defensive against that.
wait(30*1000);

if (response==null)
// channel is closed and we still don't have a response
throw new RequestAbortedException(null);

jonhurtado@gmail.com (JIRA)

unread,
Feb 27, 2020, 1:52:02 PM2/27/20
to jenkinsc...@googlegroups.com

I wanted to add that this issue also occurs when running a p4groovy.run integrate command.

> def integrateResults = perforce.run("integ""-c${changeListNum{color:#569cd6}}""//${SOURCE_BRANCH{color:#569cd6}}/...""//${TARGET_BRANCH{color:#569cd6}}/...")

The merge lasts longer than 5 minutes because there are so many files to integrate, and, as a result, the build process is aborted.

If we can change that hard-coded timeout to a setting that we can modify, that would be ideal.  Until then, my current workaround is to call a bat script that calls p4 integ.

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

jonhurtado@gmail.com (JIRA)

unread,
Feb 27, 2020, 1:53:02 PM2/27/20
to jenkinsc...@googlegroups.com
Jonathan Hurtado edited a comment on Improvement JENKINS-58161
I wanted to add that this issue also occurs when running a p4groovy.run integrate command.

> {color:#569cd6}def{color}{color:#d4d4d4} integrateResults = perforce.run({color}{color:#ce9178}"integ"{color}{color:#d4d4d4}, {color}{color:#ce9178}"-c{color}{color:#569cd6}${{color}{color:#d4d4d4}changeListNum{color} {color:#569cd6 } }{color}{color:#ce9178} "{color }{color :#d4d4d4}, {color}{color:#ce9178}"//{color}{color:#569cd6}${{color}{color:#d4d4d4}SOURCE_BRANCH{color} {color:#569cd6 } }{color}{color:#ce9178} /..."{color }{color :#d4d4d4}, {color}{color:#ce9178}"//{color}{color:#569cd6}${{color}{color:#d4d4d4}TARGET_BRANCH{color} {color:#569cd6 } }{color}{color:#ce9178} /..."{color }{color :#d4d4d4}){color}


The merge lasts longer than 5 minutes because there are so many files to integrate, and, as a result, the build process is aborted.

If we can change that hard-coded timeout to a setting that we can modify, that would be ideal.  Until then, my current workaround is to call a bat script that calls p4 integ.
Reply all
Reply to author
Forward
0 new messages