Updating Add-ons in JIRA is slow
- Updating Add-ons in JIRA takes a very long time. The progress indicator appears to freeze, but will eventually complete.
- JIRA itself is suffering from bad performance during this.
Thread dumps taken during the update show the following long running thread:
"http-bio-8080-exec-7" daemon prio=10 tid=0x00007f25842d2000 nid=0x9fa runnable [0x00007f2550fc3000] java.lang.Thread.State: RUNNABLE at org.apache.felix.framework.ModuleImpl.getWires(ModuleImpl.java:461) - locked <0x00000000c28a2938> (a org.apache.felix.framework.ModuleImpl) at org.apache.felix.framework.Felix.getImportingBundles(Felix.java:3309) at org.apache.felix.framework.ExportedPackageImpl.getImportingBundles(ExportedPackageImpl.java:67) at com.atlassian.plugin.osgi.factory.OsgiPluginInstalledHelper.getRequiredPluginsFromExports(OsgiPluginInstalledHelper.java:152) at com.atlassian.plugin.osgi.factory.OsgiPluginInstalledHelper.getRequiredPlugins(OsgiPluginInstalledHelper.java:126) at com.atlassian.plugin.osgi.factory.OsgiPlugin.getRequiredPlugins(OsgiPlugin.java:402) at com.atlassian.upm.impl.SafeModeServiceImpl.getWithDependenciesFirst(SafeModeServiceImpl.java:384) at com.atlassian.upm.impl.SafeModeServiceImpl.sortByDependencies(SafeModeServiceImpl.java:361) at com.atlassian.upm.impl.SafeModeServiceImpl.disableAllUserInstalledPlugins(SafeModeServiceImpl.java:194) at com.atlassian.upm.impl.SafeModeServiceImpl.access$300(SafeModeServiceImpl.java:49) at com.atlassian.upm.impl.SafeModeServiceImpl$1.doInTransaction(SafeModeServiceImpl.java:92) at com.atlassian.upm.impl.SafeModeServiceImpl$1.doInTransaction(SafeModeServiceImpl.java:81) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25) at com.atlassian.jira.DefaultHostContextAccessor.doInTransaction(DefaultHostContextAccessor.java:34) at sun.reflect.GeneratedMethodAccessor147.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source)
The following loop will search for any plugin JAR files using wildcards that would potentially be problematic:
for jar in *.jar; do unzip -p $jar META-INF/MANIFEST.MF | grep -q 'DynamicImport-Package' && echo $jar; done
You'll need to run this inside of the $JIRA-HOME/plugins/installed-plugins directory.
Once you have a list of the plugin JAR files, you can output the the contents of each of them with:
unzip -p plugin-jar-name.jar META-INF/MANIFEST.MF
Replace the plugin-jar-name.jar file with the file names for each JAR returned in the first command.
- Next, you'll want to look at the output for each of the plugins to see if they make use of a wildcard in the
DynamicImport-Package: com.atlassian.upm.api.license.entity;version="2 .0.1", com.atlassian.upm.api.license;version="2.0.1", com.atlassian.u pm.api.util;version="2.0.1", com.atlassian.upm.license.storage.plugin ;version="2.4.1",*
In the above example there is a wildcard used as the last entry.
- This is caused by the use of a wildcard in the plugin manifest import directives. This was fixed as part of - UPM-4570Getting issue details... STATUS .
- Upgrade to JIRA 6.3 or Confluence 5.5 where this has already been fixed!
- If that is not an option, ensure the plugin identified using a wildcard is up to date and the latest compatible version available for the release of JIRA you are running.
- If this doesn't solve the problem, then reach out to the plugin vendor to inform them of the problem and further assistance.
This has been identified and subsequently fixed in the following plugins: JIRA Misc Workflow Extensions, JIRA Misc Custom Fields, JIRA Timesheet Reports and Gadgets. Make sure you are running the latest compatible version of these plugins if you have any of them installed.