NullPointerException: change 22069: change not processed by merge strategy

215 views
Skip to first unread message

Лёша М

unread,
Jul 7, 2023, 8:40:30 PM7/7/23
to Repo and Gerrit Discussion
Hello Repo and Gerrit Discussion.

After upgrading to 3.8.0 we started seeing internal server errors. The log says:

[2023-07-07T07:04:05.728-77:00] [HTTP POST /g/changes/Project~22086/revisions/2/submit (lyosha37 from 99.88.555.333)] ERROR com.google.gerrit.httpd.restapi.restApiServlet : Error in POST /g/changes/Project~22086/revisions/2/submit: NullPointerException [CONTEXT project="Project" request="REST /g/*/Project~22086/*/
2/*" ]
java.lang.NullPointerException: change 22069: change not processed by merge strategy
        at java.base/java.util.Objects.requireNonNull(Objects.java:246)
        at com.google.gerrit.server.submit.SubmitStrategyListener.checkCommitStatus(SubmitStrategyListener.java:107)
        at com.google.gerrit.server.submit.SubmitStrategyListener.afterUpdateRepos(SubmitStrategyListener.java:57)
        at com.google.gerrit.server.update.BatchUpdate.notifyAfterUpdateRepo(BatchUpdate.java:200)
        at com.google.gerrit.server.update.BatchUpdate.execute(BatchUpdate.java:158)
        at com.google.gerrit.server.update.SubmissionExecutor.execute(SubmissionExecutor.java:61)
        at com.google.gerrit.server.submit.MergeOp.integrateIntoHistory(MergeOp.java:666)
        at com.google.gerrit.server.submit.MergeOp.lambda$merge$1(MergeOp.java:535)
        at com.google.gerrit.server.update.RetryableChangeAction.lambda$new$0(RetryableChangeAction.java:48)
        at com.github.rholder.retry.AttemptTimeLimiters$NoAttemptTimeLimit.call(AttemptTimeLimiters.java:78)
        at com.github.rholder.retry.Retryer.call(Retryer.java:160)
        at com.google.gerrit.server.update.RetryHelper.executeWithTimeoutCount(RetryHelper.java:564)
        at com.google.gerrit.server.update.RetryHelper.execute(RetryHelper.java:507)
        at com.google.gerrit.server.update.RetryableAction.call(RetryableAction.java:173)
        at com.google.gerrit.server.update.RetryableChangeAction.call(RetryableChangeAction.java:84)
        at com.google.gerrit.server.submit.MergeOp.merge(MergeOp.java:544)
        at com.google.gerrit.server.restapi.change.Submit.mergeChange(Submit.java:214)
        at com.google.gerrit.server.restapi.change.Submit.apply(Submit.java:191)
        at com.google.gerrit.server.restapi.change.Submit.apply(Submit.java:88)
        at com.google.gerrit.httpd.restapi.RestApiServlet.lambda$invokeRestModifyViewWithRetry$7(RestApiServlet.java:915)
        at com.github.rholder.retry.AttemptTimeLimiters$NoAttemptTimeLimit.call(AttemptTimeLimiters.java:78)
        at com.github.rholder.retry.Retryer.call(Retryer.java:160)
        at com.google.gerrit.server.update.RetryHelper.executeWithTimeoutCount(RetryHelper.java:564)
        at com.google.gerrit.server.update.RetryHelper.execute(RetryHelper.java:507)
        at com.google.gerrit.server.update.RetryableAction.call(RetryableAction.java:173)
        at com.google.gerrit.httpd.restapi.RestApiServlet.invokeRestEndpointWithRetry(RestApiServlet.java:990)
        at com.google.gerrit.httpd.restapi.RestApiServlet.invokeRestModifyViewWithRetry(RestApiServlet.java:910)
        at com.google.gerrit.httpd.restapi.RestApiServlet.service(RestApiServlet.java:560)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:290)
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:280)
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:184)
        at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:89)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
        at com.google.gerrit.httpd.raw.StaticModule$PolyGerritFilter.doFilter(StaticModule.java:412)
etc.

Our merge strategy is Rebase if needed. I have never seen this issue before 3.8.0.

Any clues?

Thank you!

Dmitrii Filippov

unread,
Jul 8, 2023, 4:19:54 PM7/8/23
to Repo and Gerrit Discussion
Hi,
The stack trace and the message is exactly the same as in https://issues.gerritcodereview.com/issues/289505276

Probably, this is the same issue.

Лёша М

unread,
Jul 8, 2023, 9:02:06 PM7/8/23
to Repo and Gerrit Discussion
This is great to hear, thanks! Is there a way to get a binary with this fix applied? This bug is really too annoying.

Лёша М

unread,
Jul 25, 2023, 3:10:37 PM7/25/23
to Repo and Gerrit Discussion
Any chance for any progress on this? This is the top annoyance for us right now.

Terry Z

unread,
Oct 6, 2023, 3:37:59 PM10/6/23
to Repo and Gerrit Discussion

I recently encountered the "change not processed by merge strategy" on 3.7 after upgrading from 2.14.  We use an application that uses REST API to "submit" changes. I suspect it is an issue with the "Inherit" permission logic for Submit Type and/or Allow content merges.  I was able to work around the issue by setting Submit type and Allow content merges settings in the project instead of the keeping the Inherit (Rebase if necessary) and Inherit(true) values.  I will be trying more experiments as I migrate three other gerrit servers from 2.14 to 3.7.  I plan to try to set the settings in the parent at various levels deep.  Our currently permission inheritance hierarchy has many parents 4+ until reaching All-Projects. 

One other thing I noticed was that if the delivery was rebased, the "change not processed by merge strategy" did not occur.  Leading me to think that somehow it was defaulting to "Fast forward only" which is why I suspected an error in the inheritance logic where it was picking up a hard coded default value.

I'll post more details about experiments and results as I collect them.

Sven Selberg

unread,
Oct 9, 2023, 9:13:48 AM10/9/23
to Repo and Gerrit Discussion
On Friday, October 6, 2023 at 9:37:59 PM UTC+2 Terry Z wrote:

I recently encountered the "change not processed by merge strategy" on 3.7 after upgrading from 2.14.  We use an application that uses REST API to "submit" changes. I suspect it is an issue with the "Inherit" permission logic for Submit Type and/or Allow content merges.  I was able to work around the issue by setting Submit type and Allow content merges settings in the project instead of the keeping the Inherit (Rebase if necessary) and Inherit(true) values.  I will be trying more experiments as I migrate three other gerrit servers from 2.14 to 3.7.  I plan to try to set the settings in the parent at various levels deep.  Our currently permission inheritance hierarchy has many parents 4+ until reaching All-Projects. 

One other thing I noticed was that if the delivery was rebased, the "change not processed by merge strategy" did not occur.  Leading me to think that somehow it was defaulting to "Fast forward only" which is why I suspected an error in the inheritance logic where it was picking up a hard coded default value.

I'll post more details about experiments and results as I collect them.


On Tuesday, July 25, 2023 at 3:10:37 PM UTC-4 Лёша М wrote:
Any chance for any progress on this? This is the top annoyance for us right now.

On Saturday, July 8, 2023 at 6:02:06 PM UTC-7 Лёша М wrote:
This is great to hear, thanks! Is there a way to get a binary with this fix applied? This bug is really too annoying.

The revert is included in:
3.6.7, 3.7.5, 3.8.2
Reply all
Reply to author
Forward
0 new messages