IllegalAccessError - Guava Iterators.emptyIterator() + Fugue

XMLWordPrintable

    • Type: Bug
    • Resolution: Not a bug
    • Priority: High
    • None
    • Affects Version/s: 7.13.0
    • Component/s: Jira 7.13 EAP
    • None
    • 7.13
    • Severity 1 - Critical

      Issue Summary

      Hi,
      Getting the following error with latest version of Jira DC (7.13) and Jira Service Desk (3.16.0) on latest Azure Ubuntu 16.04 LTS image. See attached logs for both Jira and ServiceDesk.
       
      2018-12-24 12:44:18,122 http-nio-8080-exec-43 ERROR      [c.a.j.web.servlet.InternalServerErrorServlet] {errorId=6daf95c4-29eb-4d92-b4bb-e3c4ba797190, interpretedMsg=, cause=java.lang.IllegalAccessError: tried to access method com.google.common.collect.Iterators.emptyIterator()Lcom/google/common/collect/UnmodifiableIterator; from class com.atlassian.fugue.Option, stacktrace=java.lang.IllegalAccessError: tried to access method com.google.common.collect.Iterators.emptyIterator()Lcom/google/common/collect/UnmodifiableIterator; from class com.atlassian.fugue.Option
              at com.atlassian.fugue.Option.iterator(Option.java:254) [fugue-2.6.0.jar:?]
              at java.lang.Iterable.forEach(Iterable.java:74) [?:1.8.0_181]
              at com.atlassian.jira.cache.JiraVCacheInitialisationUtils.cleanupVCache(JiraVCacheInitialisationUtils.java:89) [classes/:?]
              at com.atlassian.jira.web.filters.steps.requestinfo.RequestInfoFirstStep.finallyAfterDoFilter(RequestInfoFirstStep.java:41) [classes/:?]
              at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:78) [classes/:?]
              at com.atlassian.jira.web.filters.JiraFirstFilter.doFilter(JiraFirstFilter.java:57) [classes/:?]
       
      This Guava error was addressed in https://bitbucket.org/atlassian/fugue/pull-requests/35/remove-guava-add-java-8/diff presumably for Fugue 3.0.x.
       
      For some reason Jira DC and Jira Service Desk have both fugue 2.6 and 4.5 versions bundled in with the installation
       
      monty@monty-XPS-15-9570:/opt/atlassian/jsd
      $ sudo find . -name *.jar  | grep -i fugue
      ./atlassian-jira/WEB-INF/lib/fugue-4.5.0.jar
      ./atlassian-jira/WEB-INF/lib/fugue-guava-4.5.0.jar
      ./atlassian-jira/WEB-INF/lib/fugue-2.6.0.jar
      ./atlassian-jira/WEB-INF/lib/fugue-retry-4.5.0.jar
      ./atlassian-jira/WEB-INF/atlassian-bundled-plugins/fugue-4.5.0.jar
      ./atlassian-jira/WEB-INF/atlassian-bundled-plugins/fugue-guava-4.5.0.jar
      ./atlassian-jira/WEB-INF/atlassian-bundled-plugins/fugue-scala-4.5.0.jar
      ./atlassian-jira/WEB-INF/atlassian-bundled-plugins/fugue-optics-4.5.0.jar
      ./atlassian-jira/WEB-INF/atlassian-bundled-plugins/fugue-retry-4.5.0.jar
       
      Likewise Jira:
      monty@monty-XPS-15-9570:/opt/atlassian/jira
      $ sudo find . -name *.jar  | grep -i fugue
      ./atlassian-jira/WEB-INF/lib/fugue-4.5.0.jar
      ./atlassian-jira/WEB-INF/lib/fugue-guava-4.5.0.jar
      ./atlassian-jira/WEB-INF/lib/fugue-2.6.0.jar
      ./atlassian-jira/WEB-INF/lib/fugue-retry-4.5.0.jar
      ./atlassian-jira/WEB-INF/atlassian-bundled-plugins/fugue-4.5.0.jar
      ./atlassian-jira/WEB-INF/atlassian-bundled-plugins/fugue-guava-4.5.0.jar
      ./atlassian-jira/WEB-INF/atlassian-bundled-plugins/fugue-scala-4.5.0.jar
      ./atlassian-jira/WEB-INF/atlassian-bundled-plugins/fugue-optics-4.5.0.jar
      ./atlassian-jira/WEB-INF/atlassian-bundled-plugins/fugue-retry-4.5.0.jar
       
      Is there anything "environmental" that causes the different version of fugue to be used? The reason I'm suggesting this that the Azure Ubuntu image is a factor. We use always use the "latest" Azure image (which gets frequently updated):
       
      $ az vm image list --location canadacentral --publisher Canonical --offer UbuntuServer --sku 16.04-LTS --all --output table
      Offer         Publisher    Sku        Urn                                               Version
      -----------  ---------  -------  ----------------------------------------------  --------------
      UbuntuServer  Canonical    16.04-LTS  Canonical:UbuntuServer:16.04-LTS:16.04.201611220  16.04.201611220
      ...
      UbuntuServer  Canonical    16.04-LTS  Canonical:UbuntuServer:16.04-LTS:16.04.201811140  16.04.201811140
      UbuntuServer  Canonical    16.04-LTS  Canonical:UbuntuServer:16.04-LTS:16.04.201812040  16.04.201812040
      UbuntuServer  Canonical    16.04-LTS  Canonical:UbuntuServer:16.04-LTS:16.04.201812070  16.04.201812070
      UbuntuServer  Canonical    16.04-LTS  Canonical:UbuntuServer:16.04-LTS:16.04.201812230  16.04.201812230
       
      I noticed the Guava error started occurring midway through the 23rd Dec where the new image "16.04.201812230" presumably started to come into effect. Specifying the version to be "16.04.201811140" rather than latest Jira + JSD start up successfully. However this isn't the only time I have seen this error - as part of https://hello.atlassian.net/wiki/spaces/DC/pages/359629496/Upgrading+Azure+Jira+Nodes, I attempted to deploy old Ubuntu images too (with the intention of seeing them upgraded) and there were a number of them raising the exact same issue. At the time I just kept on going to I got a working image just putting it down to JDK 7/8 OS issues. Given that Jira + JSD comes with it's own Oracle JDK (and clearly uses it from the logs), this is extremely weird but also easily reproducible as well. I have attached logs were we downgrade to "16.04.201811140".
       
      Either way given that Fugue is an internal Atlassian library I don't see any reason to be using a deprecated version of it in the latest release of Jira and JSD. Hardcoding the Azure Ubuntu image either isn't going to be feasible either, given we'll miss out on latest security updates.

      Environment

      • Azure Ubuntu 16.04 LTS image -  16.04.201812230

      Steps to Reproduce

      1. Deploy Jira or JSD to an Azure 16.04 LTS 16.04.201812230 image

       

      Workaround

      Moved from "latest" 16.04 LTS version to "16.04.201811140" version.

        1. ubuntudowngradedlogs.zip
          89 kB
          Stephen Montgomery
        2. logs.zip
          506 kB
          Stephen Montgomery

            Assignee:
            Przemyslaw Czuj (Inactive)
            Reporter:
            Stephen Montgomery (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: