Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-11497

Pull request does not load with a java.lang.StackOverflowError: null exception

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 6.0.0
    • 5.7.3, 5.16.0
    • None
    • None

    Description

      Summary

      When opening a pull request (overview, diff or commits tab), a 500 error is displayed and the details are not loaded.

      Steps to Reproduce

      1. Add the following string to the description:
        ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
        
      2. Save the change to the description

      Expected Results

      The pull request loads successfully.

      Actual Results

      The pull request does not load.

      The below exception is thrown in the atlassian-bitbucket.log file:

      ERROR [http-nio-7990-exec-1] <user> <request> <ip> "GET /projects/<project>/repos/<repository>/pull-requests/<pull request id>/overview HTTP/1.1" o.a.c.c.C.[.[.[.[springMvc] Servlet.service() for servlet [springMvc] threw exception
      java.lang.StackOverflowError: null
      at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3799)
      at java.util.regex.Pattern$GroupHead.match(Pattern.java:4660)
      at java.util.regex.Pattern$Loop.match(Pattern.java:4787)
      at java.util.regex.Pattern$GroupTail.match(Pattern.java:4719)
      at java.util.regex.Pattern$Curly.match0(Pattern.java:4281)
      at java.util.regex.Pattern$Curly.match(Pattern.java:4236)
      at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3800)
      at java.util.regex.Pattern$GroupHead.match(Pattern.java:4660)
      at java.util.regex.Pattern$Loop.match(Pattern.java:4787)
      at java.util.regex.Pattern$GroupTail.match(Pattern.java:4719)
      at java.util.regex.Pattern$Curly.match0(Pattern.java:4281)
      at java.util.regex.Pattern$Curly.match(Pattern.java:4236)
      at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3800)
      

      Notes

      There could be other strings leading to this behaviour. The exact description causing the problem can be detected by using the following rest API and inspecting the description field in the resulting Json.

      rest/api/1.0/projects/<project>/repos/<repository>/pull-requests/<pull request id>
      

      Workaround

      Update the pull request by editing the description using the REST API

      1. Get the current version field from the GET rest/api/1.0/projects/<project>/repos/<repository>/pull-requests/<pull request id>
      2. Update the pull request by using the same endpoint (with PUT as a method)
        curl --user username:password -H "Content-Type: application/json" --data @input.json -X PUT <Bitbucket_URL>/rest/api/1.0/projects/<project>/repos/<repository>/pull-requests/<pull request id>
        

        Where the input.json file contains the following and version is the same value as the one returned by the request above:

        {
            "version": 6,
            "description": "expected description"
        }
        

      Attachments

        1. stacktrace.txt
          409 kB
          Ben Humphreys

        Activity

          People

            Unassigned Unassigned
            amarques@atlassian.com Andre Marques (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: