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

Add "Build Started" comments attempt sometimes fails on Gerrit side

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • gerrit-trigger-plugin
    • None
    • gerrit-events: 2.7.1
      gerrit-trigger: 2.14.0
      Jenkins: 1.580.1

    Description

      Sometimes adding comments "Build Started" by gerrit-trigger-plugin from specific Jenkins server more than 2 jobs running to Gerrit server, fails.

      In case Jenkins has 2 jobs and these are triggered by uploaded patchset on gerrit,
      either "Build Started ... (1/2)" or "Build Started ... (2/2)" cannot be upload occasionally .

      Here is the stacktrace, issue happens in gerrit-events package :

      java.io.IOException: Error during sending command
              at com.sonymobile.tools.gerrit.gerritevents.workers.cmd.AbstractSendCommandJob.sendCommand2(AbstractSendCommandJob.java:118)
              at com.sonymobile.tools.gerrit.gerritevents.workers.cmd.AbstractSendCommandJob.sendCommand(AbstractSendCommandJob.java:79)
              at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.GerritNotifier.buildStarted(GerritNotifier.java:88)
              at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.job.ssh.BuildStartedCommandJob.run(BuildStartedCommandJob.java:80)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
              at java.util.concurrent.FutureTask.run(FutureTask.java:262)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: com.sonymobile.tools.gerrit.gerritevents.ssh.SshException: error: Cannot post review
      one or more reviews failed; review output above (1)
              at com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionImpl.executeCommand(SshConnectionImpl.java:254)
              at com.sonymobile.tools.gerrit.gerritevents.workers.cmd.AbstractSendCommandJob.sendCommand2(AbstractSendCommandJob.java:116)
              ... 8 more
      
      

      In my investigation, It seems that simultaneous attempt of review gerrit's ssh commnd causes error:
      "cannot post review
      one or more reviews failed; review output above", these messages are defined/returned from Gerrit. https://code.google.com/p/gerrit/issues/detail?id=3730

      Issue may be in Gerrit side, but in the meantime, adding review comments of Gerrit ssh command to Gerrit server should take care for error (such as retrying) for Jenkins side.

      environment:

      gerrit-events :2.7.1
      gerrit-trigger:2.14.0

      Attachments

        Issue Links

          Activity

            ryoichitan Ryoichi Taniguchi created issue -
            ryoichitan Ryoichi Taniguchi made changes -
            Field Original Value New Value
            Description Sometimes adding comments "Build Started" by gerrit-trigger-plugin from specific Jenkins server *more than 2 jobs running* to Gerrit server, fails.

            In case Jenkins has 2 jobs and these are triggered by uploaded patchset on gerrit,
            either "Build Started ... (1/2)" or "Build Started ... (2/2)" cannot be upload sometimes .


            Here is the stacktrace, issue happens in gerrit-events package :

            {code:java}
            java.io.IOException: Error during sending command
                    at com.sonymobile.tools.gerrit.gerritevents.workers.cmd.AbstractSendCommandJob.sendCommand2(AbstractSendCommandJob.java:118)
                    at com.sonymobile.tools.gerrit.gerritevents.workers.cmd.AbstractSendCommandJob.sendCommand(AbstractSendCommandJob.java:79)
                    at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.GerritNotifier.buildStarted(GerritNotifier.java:88)
                    at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.job.ssh.BuildStartedCommandJob.run(BuildStartedCommandJob.java:80)
                    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
                    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
                    at java.lang.Thread.run(Thread.java:745)
            Caused by: com.sonymobile.tools.gerrit.gerritevents.ssh.SshException: error: Cannot post review
            one or more reviews failed; review output above (1)
                    at com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionImpl.executeCommand(SshConnectionImpl.java:254)
                    at com.sonymobile.tools.gerrit.gerritevents.workers.cmd.AbstractSendCommandJob.sendCommand2(AbstractSendCommandJob.java:116)
                    ... 8 more

            {code}

            In my investigation, It seems that simultaneous attempt of review gerrit's ssh commnd causes error:
            "_cannot post review_
            _one or more reviews failed; review output above_", these messages are defined/returned from Gerrit. https://code.google.com/p/gerrit/issues/detail?id=3730

            Issue may be in Gerrit side, but in the meantime, adding review comments of Gerrit ssh command to Gerrit server should be retry-able for Jenkins side.

            environment:

            gerrit-events :2.7.1
            gerrit-trigger:2.14.0
            Sometimes adding comments "Build Started" by gerrit-trigger-plugin from specific Jenkins server *more than 2 jobs running* to Gerrit server, fails.

            In case Jenkins has 2 jobs and these are triggered by uploaded patchset on gerrit,
            either "Build Started ... (1/2)" or "Build Started ... (2/2)" cannot be upload occasionally .


            Here is the stacktrace, issue happens in gerrit-events package :

            {code:java}
            java.io.IOException: Error during sending command
                    at com.sonymobile.tools.gerrit.gerritevents.workers.cmd.AbstractSendCommandJob.sendCommand2(AbstractSendCommandJob.java:118)
                    at com.sonymobile.tools.gerrit.gerritevents.workers.cmd.AbstractSendCommandJob.sendCommand(AbstractSendCommandJob.java:79)
                    at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.GerritNotifier.buildStarted(GerritNotifier.java:88)
                    at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.job.ssh.BuildStartedCommandJob.run(BuildStartedCommandJob.java:80)
                    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
                    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
                    at java.lang.Thread.run(Thread.java:745)
            Caused by: com.sonymobile.tools.gerrit.gerritevents.ssh.SshException: error: Cannot post review
            one or more reviews failed; review output above (1)
                    at com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionImpl.executeCommand(SshConnectionImpl.java:254)
                    at com.sonymobile.tools.gerrit.gerritevents.workers.cmd.AbstractSendCommandJob.sendCommand2(AbstractSendCommandJob.java:116)
                    ... 8 more

            {code}

            In my investigation, It seems that *simultaneous attempt* of review gerrit's ssh commnd causes error:
            "_cannot post review_
            _one or more reviews failed; review output above_", these messages are defined/returned from Gerrit. https://code.google.com/p/gerrit/issues/detail?id=3730

            Issue may be in Gerrit side, but in the meantime, adding review comments of Gerrit ssh command to Gerrit server should take care for error (such as retrying) for Jenkins side.

            environment:

            gerrit-events :2.7.1
            gerrit-trigger:2.14.0
            Summary Add "Build Started" comments attempt needs retry-able Add "Build Started" comments attempt sometimes fails on Gerrit side
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 167891 ] JNJira + In-Review [ 182884 ]
            ssbarnea Sorin Sbarnea made changes -
            Link This issue duplicates JENKINS-20808 [ JENKINS-20808 ]
            ssbarnea Sorin Sbarnea made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]

            Resolved in which version?

            dilipm79 Dilip Mahadevappa added a comment - Resolved in which version?

            Please let us know in which version of Gerrit Plugin this problem is fixed?

             

            espamhy shilpa manjunath added a comment - Please let us know in which version of Gerrit Plugin this problem is fixed?  
            chantivlad chanti vlad added a comment -

            Still happening with:

            Jenkins ver. 2.73.1

            Gerrit Trigger 2.26.0

             

            chantivlad chanti vlad added a comment - Still happening with: Jenkins ver. 2.73.1 Gerrit Trigger  2.26.0  
            chantivlad chanti vlad made changes -
            Issue Type Improvement [ 4 ] Bug [ 1 ]

            People

              rsandell rsandell
              ryoichitan Ryoichi Taniguchi
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: