Skip to content

[BUG] PA plugin does not work due to missing required access #144

@sruti1312

Description

@sruti1312

What is the bug?
PA plugin 1.3.0.0 does not work on OpenSearch 1.3.0 clusters.

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Create a OpenSearch 1.3.0 cluster.
  2. Install PA plugin 1.3.0.0 on the nodes.
  3. Enable PA on the cluster using,
curl localhost:9200/_opendistro/_performanceanalyzer/cluster/config -H 'Content-Type: application/json' -d '{"enabled": true}'
curl localhost:9200/_opendistro/_performanceanalyzer/rca/cluster/config -H 'Content-Type: application/json' -d '{"enabled": true}'

See error:

[2022-02-15T20:12:34,617][ERROR][o.o.b.OpenSearchUncaughtExceptionHandler] [d2aa23b3fec1] fatal error in thread [pa-collectors-th], exiting
java.lang.IllegalAccessError: class org.opensearch.performanceanalyzer.jvm.ThreadList (in unnamed module @0x6031a9c9) cannot access class sun.tools.attach.HotSpotVirtualMachine (in module jdk.attach) because module jdk.attach does not export sun.tools.attach to unnamed module @0x6031a9c9
	at org.opensearch.performanceanalyzer.jvm.ThreadList.runAttachDump(ThreadList.java:206) ~[performanceanalyzer-rca-1.3.0.0.jar:?]
	at org.opensearch.performanceanalyzer.jvm.ThreadList.lambda$runThreadDump$0(ThreadList.java:325) ~[performanceanalyzer-rca-1.3.0.0.jar:?]
	at org.opensearch.performanceanalyzer.core.Util.lambda$invokePrivileged$1(Util.java:78) ~[performanceanalyzer-rca-1.3.0.0.jar:?]
	at java.security.AccessController.doPrivileged(AccessController.java:318) ~[?:?]
	at org.opensearch.performanceanalyzer.core.Util.invokePrivileged(Util.java:74) ~[performanceanalyzer-rca-1.3.0.0.jar:?]

What is the expected behavior?
No errors after PA is enabled and metrics should be populated in /tmp directory.

What is your host/environment?

  • OS: Linux

Do you have any additional context?
Possibly related to jdk change in 1.3. 1.2 version was working as expected. The issue started happening after the bundled JDK was updated from AdoptOpenJDK 15 to Adoptium 17 with PR opensearch-project/OpenSearch#1922. This was a backport change from OpenSearch 2.0 to 1.x (then and now 1.3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions