Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-8245

Error retrieving perforce change lists

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: p4-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      I'm relatively new to Hudson. There is a particular job that would fail out with the below shown exception but the other jobs would not. This happens with a hit rate of 100% and not an one-off issue. I fear it could be due to a erroneous string parsing while going through the output of 'p4 describe'. If I change the "last changelist to track' to the latest changelist so as to avoid a lot of 'p4 describe' tasks and as expected it just goes through fine.
      If the above speculaion is true then is there a way to track down using hudson logs(where would this be?) on which string does this happen?

      Caught exception communicating with perforce. Failed to retrieve changelist.com.tek42.perforce.PerforceException: Failed to retrieve changelist.
      at com.tek42.perforce.parse.ChangelistBuilder.build(ChangelistBuilder.java:185)
      at com.tek42.perforce.parse.Changes.getChangelist(Changes.java:63)
      at com.tek42.perforce.parse.Changes.getChangelistsFromNumbers(Changes.java:381)
      at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:565)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1116)
      at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
      at hudson.model.Run.run(Run.java:1324)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:139)
      Caused by: java.util.NoSuchElementException
      at java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
      at com.tek42.perforce.parse.ChangelistBuilder.build(ChangelistBuilder.java:95)
      ... 10 more
      ERROR: Unable to communicate with perforce. Failed to retrieve changelist.

        Attachments

          Issue Links

            Activity

            vkolapan vkolapan created issue -
            Hide
            rpetti Rob Petti added a comment -

            The job log will have plenty of "p4 describe" lines when it's pulling out changes. Just look for the one immediately above this error message, and that will tell you what changeset it's failing on.

            You haven't supplied your p4d, perforce plugin, and hudson versions. Can you provide those please? Stack traces aren't really helpful if I don't know what version to look at.

            Show
            rpetti Rob Petti added a comment - The job log will have plenty of "p4 describe" lines when it's pulling out changes. Just look for the one immediately above this error message, and that will tell you what changeset it's failing on. You haven't supplied your p4d, perforce plugin, and hudson versions. Can you provide those please? Stack traces aren't really helpful if I don't know what version to look at.
            rpetti Rob Petti made changes -
            Field Original Value New Value
            Assignee rpetti [ rpetti ]
            Hide
            vkolapan vkolapan added a comment -

            P4/LINUX26X86/2007.3/143793
            Hudson 1.383
            perforce plugin 1.1.11

            Yes I did see a long list of P4 describes and the one that failed has enormous amounts of text .

            Show
            vkolapan vkolapan added a comment - P4/LINUX26X86/2007.3/143793 Hudson 1.383 perforce plugin 1.1.11 Yes I did see a long list of P4 describes and the one that failed has enormous amounts of text .
            Hide
            rpetti Rob Petti added a comment -

            How enormous are we talking here? From looking at the stack trace, it looks like the output from p4 describe is getting truncated for some reason.

            There's a known issue with 1.378 and up that is causing remote streams to get randomly truncated, so that might be the cause here.

            Show
            rpetti Rob Petti added a comment - How enormous are we talking here? From looking at the stack trace, it looks like the output from p4 describe is getting truncated for some reason. There's a known issue with 1.378 and up that is causing remote streams to get randomly truncated, so that might be the cause here.
            Hide
            vkolapan vkolapan added a comment - - edited

            Its about 217 lines or 15 Kilobytes of text. Also if these are 'random' truncations how am I hitting this issue all the time? Also as a side note, the text contains lot of asterisks '*' and dots '.' and other special characters, which may potentially thwart the regex.

            Show
            vkolapan vkolapan added a comment - - edited Its about 217 lines or 15 Kilobytes of text. Also if these are 'random' truncations how am I hitting this issue all the time? Also as a side note, the text contains lot of asterisks '*' and dots '.' and other special characters, which may potentially thwart the regex.
            Hide
            rpetti Rob Petti added a comment -

            15 MB is a lot of data to handle when there are random truncations happening. It's far more likely that it would happen during a large dump, than a small one. There also simply might be some problem with the remoting functions of hudson that are causing it to fail all the time with a stream that long.

            I'm fairly certain the output is getting truncated, since the stack trace doesn't suggest a parsing issue of any kind. I can maybe code around the exception so your builds can continue, but that will still leave you with a broken change in the changelog.

            Show
            rpetti Rob Petti added a comment - 15 MB is a lot of data to handle when there are random truncations happening. It's far more likely that it would happen during a large dump, than a small one. There also simply might be some problem with the remoting functions of hudson that are causing it to fail all the time with a stream that long. I'm fairly certain the output is getting truncated, since the stack trace doesn't suggest a parsing issue of any kind. I can maybe code around the exception so your builds can continue, but that will still leave you with a broken change in the changelog.
            Hide
            rpetti Rob Petti added a comment -

            Linking to steam truncation issue in core.

            Show
            rpetti Rob Petti added a comment - Linking to steam truncation issue in core.
            rpetti Rob Petti made changes -
            Link This issue depends on JENKINS-7809 [ JENKINS-7809 ]
            Hide
            rpetti Rob Petti added a comment -

            Come to think of it, you may want to try installing kohsuke's build of the perforce plugin in issue JENKINS-7664. It has a fix that seems to help reduce the severity of the problem.

            Show
            rpetti Rob Petti added a comment - Come to think of it, you may want to try installing kohsuke's build of the perforce plugin in issue JENKINS-7664 . It has a fix that seems to help reduce the severity of the problem.
            Hide
            vkolapan vkolapan added a comment -

            Sorry, it is 15KB and not 15000 KB. Will check out the perforce plugin u had suggested. Thanks.

            Show
            vkolapan vkolapan added a comment - Sorry, it is 15KB and not 15000 KB. Will check out the perforce plugin u had suggested. Thanks.
            Hide
            vkolapan vkolapan added a comment -

            The perforce plugin you had suggested did go past the point where it was crashing and its not been crashing with that specific error for any of the P4 describes. So its working right now. Thanks a ton rpetti.

            Show
            vkolapan vkolapan added a comment - The perforce plugin you had suggested did go past the point where it was crashing and its not been crashing with that specific error for any of the P4 describes. So its working right now. Thanks a ton rpetti.
            Hide
            rpetti Rob Petti added a comment -

            Good to hear. Kohsuke's fix has been committed to source, so 1.1.13 and beyond should work as well.

            Show
            rpetti Rob Petti added a comment - Good to hear. Kohsuke's fix has been committed to source, so 1.1.13 and beyond should work as well.
            Hide
            vkolapan vkolapan added a comment -

            when can I expect to see 1.1.13 on my updates page?

            Show
            vkolapan vkolapan added a comment - when can I expect to see 1.1.13 on my updates page?
            Hide
            rpetti Rob Petti added a comment -

            That's odd, I released it yesterday... I guess the release didn't work properly for some reason.

            Show
            rpetti Rob Petti added a comment - That's odd, I released it yesterday... I guess the release didn't work properly for some reason.
            Hide
            rpetti Rob Petti added a comment -

            Resolving for now, feel free to reopen if it shows up again.

            Show
            rpetti Rob Petti added a comment - Resolving for now, feel free to reopen if it shows up again.
            rpetti Rob Petti made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 138355 ] JNJira + In-Review [ 187966 ]
            ircbot Jenkins IRC Bot made changes -
            Component/s p4-plugin [ 19224 ]
            Component/s perforce-plugin [ 15506 ]

              People

              Assignee:
              rpetti Rob Petti
              Reporter:
              vkolapan vkolapan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: