-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 8.9.0
-
Component/s: Pull Requests
-
1
-
Severity 3 - Minor
-
0
Issue Summary
While trying to rebase a PR via the Bitbucket UI, getting the message: "'git cat-file --batch' exited with code 15" on the Bitbucket UI and in the logs.
This is reproducible on Data Center: Yes
Steps to Reproduce
- Step 1: Create a branch in a repository where the first file is encountered within a subdirectory more than 1 level deep
- Step 2: Create a PR between another branch with the same kind of directory structure (this can happen if either source or destination branch has only folders at the top-level or both the branches have only folders at the top-level)
- Step 3: On the PR Overview page, click on the three dots next to the Merge button, in the drop-down click on Rebase.
Expected Results
The Rebase should happen successfully.
Actual Results
The PR Rebase will timeout after around 5 minutes
The below exception is thrown in the atlassian-bitbucket.log file:
2024-01-23 15:23:17,319 DEBUG [http-nio-7990-exec-4] admin @L0P3GBx918x132945x0 t41kcd 172.29.191.127,10.224.221.55 "POST /rest/git/latest/projects/FIR/repos/second-repo/pull-requests/2/rebase HTTP/1.1" c.a.s.i.r.e.ServiceExceptionMapper Mapping ServiceException to REST response 500 com.atlassian.bitbucket.scm.CommandFailedException: 'git cat-file --batch' exited with code 15 at com.atlassian.stash.internal.scm.git.mesh.DefaultErrorTranslator.translateDefault(DefaultErrorTranslator.java:190) at com.atlassian.stash.internal.scm.git.mesh.DefaultErrorTranslator.translate(DefaultErrorTranslator.java:141) at com.atlassian.stash.internal.scm.git.mesh.RebaseErrorTranslator.translate(RebaseErrorTranslator.java:60) at com.atlassian.stash.internal.scm.git.mesh.DefaultErrorTranslator.translateIfKnownCause(DefaultErrorTranslator.java:264) at com.atlassian.stash.internal.scm.git.mesh.DefaultErrorTranslator.maybeTranslate(DefaultErrorTranslator.java:57) at com.atlassian.stash.internal.scm.git.mesh.AbstractFutureResponseObserver.maybeTranslate(AbstractFutureResponseObserver.java:209) at com.atlassian.stash.internal.scm.git.mesh.ConversationalResponseObserver.onError(ConversationalResponseObserver.java:57) at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:479) at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23) at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40) at com.atlassian.stash.internal.scm.git.mesh.LastSeenClientInterceptor$LastSeenClientListener.onClose(LastSeenClientInterceptor.java:40) at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23) at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40) at com.atlassian.stash.internal.scm.git.mesh.StatefulClientCallListener.onClose(StatefulClientCallListener.java:34) at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23) at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40) at com.atlassian.stash.internal.scm.git.mesh.DeadlinePropagatingClientInterceptor$DeadlinePropagatingListener.onClose(DeadlinePropagatingClientInterceptor.java:156) at com.atlassian.stash.internal.scm.git.mesh.ErrorHandlingClientInterceptor$ErrorHandlingCall$1.onClose(ErrorHandlingClientInterceptor.java:149) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:562) at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:70) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:743) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:722) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.lang.Thread.run(Thread.java:829) ... 1 frame trimmed Caused by: io.grpc.StatusRuntimeException: INTERNAL: [git cat-file --batch] exited with code 15 at io.grpc.Status.asRuntimeException(Status.java:535) ... 23 common frames omitted
Bitbucket Profiler logs:
2024-01-23 15:23:17,320 | http-nio-7990-exec-4 | @L0P3GBx918x132945x0 | admin | t41kcd [300027.6ms] - "POST /rest/git/latest/projects/FIR/repos/second-repo/pull-requests/2/rebase HTTP/1.1" [1.1ms] - InternalPullRequest com.atlassian.stash.internal.pull.PullRequestDao.findByRepositoryScopedId(int,long) [300022.3ms] - git: rebase 22:2@0 [300020.7ms] - Branch com.atlassian.stash.internal.scm.git.mesh.RpcCommitClient.rebase(Repository,Repository,Builder)
Bitbucket Access logs:
atlassian-bitbucket-access-2024-01-23.0.log:85071:172.29.191.127,10.224.221.55 | https | i@L0P3GBx918x132945x0 | - | 2024-01-23 15:18:17,292 | "POST /rest/git/latest/projects/FIR/repos/second-repo/pull-requests/2/rebase HTTP/1.1" | "https://instenv-228052-6f9b.instenv.internal.atlassian.com/projects/FIR/repos/second-repo/pull-requests/2/overview" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" | - | - | - | - | - | t41kcd | atlassian-bitbucket-access-2024-01-23.0.log:85312:172.29.191.127,10.224.221.55 | https | o@L0P3GBx918x132945x0 | admin | 2024-01-23 15:23:17,320 | "POST /rest/git/latest/projects/FIR/repos/second-repo/pull-requests/2/rebase HTTP/1.1" | "https://instenv-228052-6f9b.instenv.internal.atlassian.com/projects/FIR/repos/second-repo/pull-requests/2/overview" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" | 500 | 13 | 153 | - | 300028 | t41kcd |
Workaround
- Add a file to the top-level of the repository