Hi,
We are having problems merging pull requests in one of our repositories after upgrading our BitBucket instance from version 5.16.1 to the latest, 7.1.2.
Attempting to merge a pull request in this repository will cause the merge button to show a spinner for 1 minute, after which the merge dialogue box closes, and “This page could not be displayed” is shown. On the server, a git process starts when clicking the merge button and runs for 3+ minutes. Top shows it running at 50%+ CPU, so it is doing something during that time. The output of ps -f shows the git process to be /bin/git cat-file --batch. As long as the git process is running, making another attempt at merging the pull request results in an error message saying “This pull request is already being merged”. After the process has ended, it is possible to attempt to merge the pull request again. The BitBucket logs show no errors from git or anything else.
To see if I could find out what was wrong, I made a new repository, and copied everything from the problematic repository into it. I then created a new branch, changed a single file and made a pull request. The same problem then occurred for this repository.
To make it simpler, I created another new repository, copied a single file from the problematic repository into the corresponding location in the new repo, made a new branch, changed a file and made a pull request. The same problem occurred again.
I made another new repository, and added a Hello World-file. I then made a new branch, made a change, created a pull request and successfully merged it. I then went back to master, and added all files from our problem repository. I then made a new branch, made a random change and successfully merged the pull request for that branch.
In the end, it looks like if anything in the first commit of a new repository is already in our problem repository, then pull requests in the new repository will not work. (Many files in our problem repository is already in another, older repository where pull requests work fine, this seems to fit the pattern)
Our BitBucket server runs on a Red Hat Enterprise Linux 7.5 server, using Git 2.24.1 (the problem also occurs if using git 2.23.0). It is running on the default RHEL JRE, OpenJDK 1.8.0.181-3.b13.el7_5.
Any help and suggestions for further troubleshooting steps would be appreciated.
Best regards,
Kristian K. Skordal
Applica Consulting A/S