Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-29386

DefaultSimpleLinkManager has a plugin reloadability issue

    XMLWordPrintable

Details

    Description

      We have discovered a plugin reloadability problems in and around the SimpleLinkFactory code.

      Its seems it related to the case where UPM is self updated. After this the
      DefaultSimpleLinkFactory and its underlying DefaultPluginModuleTracker plugins code seems to hold onto a reference to the unloaded GH instance and does not contain a reference to the new instance.

      I hypothesize that it does not get the right "plugin event" and hence misses the opportunity to update itself and therefore has stale data.

      [INFO] [talledLocalContainer] 2012-08-17 11:15:14,325 http-2990-6 ERROR admin 675x2100x1 1a03cus 127.0.0.1 /rest/api/1.0/menus/greenhopper_menu [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service
      [INFO] [talledLocalContainer] java.lang.NullPointerException
      [INFO] [talledLocalContainer] 	at com.atlassian.greenhopper.service.I18nFactoryServiceImpl.getI18n(I18nFactoryServiceImpl.java:84)
      [INFO] [talledLocalContainer] 	at com.atlassian.greenhopper.service.I18nFactoryServiceImpl.getI18n(I18nFactoryServiceImpl.java:61)
      [INFO] [talledLocalContainer] 	at com.atlassian.greenhopper.web.navigation.RapidViewHistoryLinkFactory.getLinks(RapidViewHistoryLinkFactory.java:56)
      [INFO] [talledLocalContainer] 	at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinks(DefaultSimpleLinkManager.java:161)
      [INFO] [talledLocalContainer] 	at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinksForSection(DefaultSimpleLinkManager.java:124)
      [INFO] [talledLocalContainer] 	at sun.reflect.GeneratedMethodAccessor282.invoke(Unknown Source)
      [INFO] [talledLocalContainer] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [INFO] [talledLocalContainer] 	at java.lang.reflect.Method.invoke(Method.java:597)
      [INFO] [talledLocalContainer] 	at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$AbstractMultiTenantAwareInvocationHandler.invokeInternal(MultiTenantComponentFactoryImpl.java:181)
      [INFO] [talledLocalContainer] 	at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$MultiTenantAwareInvocationHandler.invoke(MultiTenantComponentFactoryImpl.java:211)
      

      To reproduce do the following

      • Have JIRA 5.1.2 up with GH installed
      • The Agile menu should have a drop down of all available boards
      • Then go to the other tab and drop the GH Agile menu.
      • The call will fail and result in an exception on the server and a red error message for the user.

      (Try this a couple of times if you dont replicate. There seems to be some timing involved but not a lot since I was able to do it 3 times out of 4.)

      The problem is that because the "old implementation" is cached, it stays broken until JIRa restarts.

      The NullPointerException you see above is because the GH code that it is calling has already been torn down and hence goes pop when called.

      I think this is a UPM related thing because if I plugin reload GH then it all works as expected. I think its the UPM self update that is causing this problem.

      For the record GH has an optional dependency on UPM. (Licencing). When UPM goes down, then so does GH because of this now wired dep. GH comes back up once UPM is back up but the damage is donw and the internal JIRA SimpleLinkFactory cache is not cleared properly.

      This issue is the cause of GHS-5633.

      I think with the "increased propensity" for people to auto upgarde UPM, this is going to cause us a future support headache.

      Attachments

        Issue Links

          Activity

            People

              edalgliesh Eric Dalgliesh
              bbaker ɹǝʞɐq pɐɹq
              Votes:
              2 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: