JIRA/Atlassian plugin unable to start when instrumented with SteelCentral AppInternals 10.x

Categories: SteelCentral AppInternals (AppInternals Xpert)
Solution Number: S33234

Issue

We are trying to instrument JIRA with SteelCentral AppInternals 10.x and we see exceptions in application log as below when instrumentation is turned on.

ThreadPoolAsyncTaskExecutor::Thread 8 ERROR      [c.a.p.osgi.factory.OsgiPlugin] Unable to start the plugin container for plugin 'com.atlassian.httpclient.atlassian-httpclient-plugin'
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpClientService': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpClient' defined in URL [bundle://41.0:0/META-INF/spring/httpclient-components.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.atlassian.httpclient.apache.httpcomponents.ApacheAsyncHttpClient]: Constructor threw exception; nested exception is java.lang.VerifyError: Inconsistent stackmap frames at branch target 70
Exception Details:
  Location:
    com/atlassian/httpclient/apache/httpcomponents/BoundedHttpAsyncClient.execute(Lorg/apache/http/nio/protocol/HttpAsyncRequestProducer;Lorg/apache/http/nio/protocol/HttpAsyncResponseConsumer;Lorg/apache/http/protocol/HttpContext;Lorg/apache/http/concurrent/FutureCallback;)Ljava/util/concurrent/Future; @70: aload
  Reason:
    Type 'java/util/concurrent/Future' (current frame, locals[8]) is not assignable to 'org/apache/http/impl/nio/client/CloseableHttpAsyncClient' (stack map, locals[8])
  Current Frame:
    bci: @52
    flags: { }
    locals: { 'com/atlassian/httpclient/apache/httpcomponents/BoundedHttpAsyncClient', 'org/apache/http/nio/protocol/HttpAsyncRequestProducer', 'org/apache/http/nio/protocol/HttpAsyncResponseConsumer', 'org/apache/http/protocol/HttpContext', 'org/apache/http/concurrent/FutureCallback', 'com/riverbed/instrumentation/da/jida/AwApplicationThread', 'java/lang/String', 'java/util/concurrent/Future', 'java/util/concurrent/Future' }
    stack: { 'java/util/concurrent/Future' }
  Stackmap Frame:
    bci: @70
    flags: { }
    locals: { 'com/atlassian/httpclient/apache/httpcomponents/BoundedHttpAsyncClient', 'org/apache/http/nio/protocol/HttpAsyncRequestProducer', 'org/apache/http/nio/protocol/HttpAsyncResponseConsumer', 'org/apache/http/protocol/HttpContext', 'org/apache/http/concurrent/FutureCallback', 'com/riverbed/instrumentation/da/jida/AwApplicationThread', 'java/lang/String', 'java/util/concurrent/Future', 'org/apache/http/impl/nio/client/CloseableHttpAsyncClient' }
    stack: { }
  Bytecode:
    0x0000000: 013a 0501 3a06 2bb9 005b 0100 b600 5c3a
    0x0000010: 06a7 000a 3a07 1907 b800 582a 1906 b800
    0x0000020: 5d3a 052a 2b2c 2d19 04b6 005e 3a07 1907
    0x0000030: 3a08 1907 c600 1219 07c1 005f 9a00 0a19
    0x0000040: 07b8 0060 3a08 1905 2a19 08b8 0061 1907
    0x0000050: b03a 0719 052a 1907 b800 6219 07bf
  Exception Handler Table:
    bci [6, 17] => handler: 20
    bci [35, 80] => handler: 81
  Stackmap Table:
    full_frame(@20,{Object[#143],Object[#164],Object[#165],Object[#146],Object[#166],Object[#139],Object[#141]},{Object[#142]})
    same_frame(@27)
    append_frame(@70,Object[#167],Object[#168])
    full_frame(@81,{Object[#143],Object[#164],Object[#165],Object[#146],Object[#166],Object[#139],Object[#141]},{Object[#142]})

 

Solution


When instrumenting Atlassian/JIRA with SteelCentral AppInternals there is chance that application restarts might take longer than usual or some plugins might fail to start. 
When looking into the application log you can see exceptions/stack map and some byte codes as mentioned in the problem description above.

The simple solution is to add a NEVER filter for a class. The class can be found based on the class name after Location:

Exception Details:
  Location:

    com/atlassian/httpclient/apache/httpcomponents/BoundedHttpAsyncClient.execute(Lorg/apache/http/nio/protocol/HttpAsyncRequestProducer;Lorg/apache/http/nio/protocol/HttpAsyncResponseConsumer;Lorg/apache/http/protocol/HttpContext;Lorg/apache/http/concurrent/FutureCallback;)Ljava/util/concurrent/Future; @70: aload


You can add NEVER filter for the following

class - com.atlassian.httpclient.apache.httpcomponents.BiubdedHttpAsyncClient
method - *

This is a known issue and is being tracked by the bug attached below.

**Please open a technical support  case if you run into any issues

Environment

SteelCentral AppInternals, Atlassian/JIRA
NOTICE: Riverbed® product names have changed. Please refer to the Product List for a complete list of product names.
Last Modified: 2019-03-07
Can't find an answer? Create a case