Skip to content

[BUG] PPL alerting monitors crash the node on 3.10.0: NoClassDefFoundError ProgressTrackingTask (regression from #5910) #5923

Closed

Description

@ps48

What is the bug?

On OpenSearch 3.10.0 (staging), any PPL alerting monitor crashes the whole node. Creating a ppl_monitor (alerting validates the query by running it) or running one on schedule throws java.lang.NoClassDefFoundError: org/opensearch/sql/opensearch/executor/progress/ProgressTrackingTask. Because it is a java.lang.Error, it reaches OpenSearchUncaughtExceptionHandler and the JVM exits.

This looks like a regression from #5910 (Report progress for asynchronous Calcite queries, merged 2026-10-31). That PR changed org.opensearch.sql.plugin.transport.PPLQueryTask to implements org.opensearch.sql.opensearch.executor.progress.ProgressTrackingTask. PPLQueryTask ships in the opensearch-sql-thin jar, which the alerting plugin bundles and loads in its own plugin classloader to call PPLQueryAction. ProgressTrackingTask and QueryProgressTracker live in the opensearch module, which is not in the thin jar, so alerting's classloader cannot define PPLQueryTask when TransportPPLQueryRequest.createTask(...) instantiates it.

Verified with javap on the jar bundled in plugins/opensearch-alerting/opensearch-sql-thin-3.10.0.0.jar:

public class org.opensearch.sql.plugin.transport.PPLQueryTask extends org.opensearch.tasks.CancellableTask implements org.opensearch.sql.opensearch.executor.progress.ProgressTrackingTask

The jar contains no org/opensearch/sql/opensearch/executor/progress/ classes. They are only in plugins/opensearch-sql/opensearch-3.10.0.0.jar.

How can one reproduce the bug?

  1. Start a single node: docker run -d -p 9292:9200 -e discovery.type=single-node -e DISABLE_SECURITY_PLUGIN=true -e DISABLE_INSTALL_DEMO_CONFIG=true opensearchstaging/opensearch:3.10.0
  2. Create an index with one document:
curl -XPUT localhost:9292/repro-logs -H 'Content-Type: application/json' -d '{"mappings":{"properties":{"@timestamp":{"type":"date"},"level":{"type":"keyword"}}}}'
curl -XPOST 'localhost:9292/repro-logs/_doc?refresh=true' -H 'Content-Type: application/json' -d '{"@timestamp":"2026-11-02T00:00:00Z","level":"error"}'
  1. Plain PPL works: curl -XPOST localhost:9292/_plugins/_ppl -H 'Content-Type: application/json' -d '{"query":"source=repro-logs | stats count() as cnt"}'
  2. Create a PPL monitor:
curl -XPOST localhost:9292/_plugins/_alerting/monitors -H 'Content-Type: application/json' -d '{"type":"monitor","monitor_type":"ppl_monitor","name":"repro-ppl-monitor","enabled":false,"schedule":{"period":{"interval":1,"unit":"MINUTES"}},"inputs":[{"ppl_input":{"query":"source=repro-logs | stats count() as cnt","query_language":"ppl"}}],"triggers":[{"ppl_trigger":{"name":"any","severity":"1","actions":[],"type":"custom","custom_condition":"where cnt > 0"}}]}'
  1. The request gets no response and the container exits with code 1.

Stack trace (trimmed):

[ERROR][o.o.b.OpenSearchUncaughtExceptionHandler] fatal error in thread [Thread-8], exiting
java.lang.NoClassDefFoundError: org/opensearch/sql/opensearch/executor/progress/ProgressTrackingTask
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:962)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:144)
	at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:454)
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:367)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:557)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:490)
	at org.opensearch.alerting.PPLUtils.executePplQuery(PPLUtils.kt:155)
	at org.opensearch.alerting.transport.TransportIndexMonitorAction.validatePPLQuery(TransportIndexMonitorAction.kt:504)
	at org.opensearch.alerting.transport.TransportIndexMonitorAction.checkPPLQueryAndExecute(TransportIndexMonitorAction.kt:383)
	at org.opensearch.alerting.transport.TransportIndexMonitorAction.doExecute(TransportIndexMonitorAction.kt:290)
	at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:220)

The scheduled path fails the same way, through TriggerService.runPplCustomTrigger (TriggerService.kt:398) and QueryLevelMonitorRunner.runMonitor (QueryLevelMonitorRunner.kt:191) into PPLUtils.executePplQuery. On a long running cluster with existing PPL monitors this puts the node into a crash loop, once per monitor run.

What is the expected behavior?

The PPL monitor is created and runs, as on 3.9.0. With the same script on opensearchproject/opensearch:3.9.0, monitor creation succeeds, _execute returns "triggered":true with ppl_query_results: [{"cnt":1}], and the node stays up.

What is your host/environment?

  • OS: Docker on Amazon Linux 2 (x86_64)
  • Version: opensearchstaging/opensearch:3.10.0 (image built 2026-11-02, distribution build 12327, sql commit 760eead, alerting commit c17572ecb). Not reproducible on opensearchproject/opensearch:3.9.0.
  • Plugins: default distribution (opensearch-sql 3.10.0.0, opensearch-alerting 3.10.0.0)

Do you have any screenshots?

N/A, logs above.

Do you have any additional context?

Possible fixes:

  • Keep the classes in the thin jar free of opensearch module types, for example by moving ProgressTrackingTask and QueryProgressTracker into the module that produces the thin jar, or by keeping progress tracking out of PPLQueryTask itself.
  • Add a CI check that loads every class in the thin jar with only the thin jar and OpenSearch core on the classpath, so a new dependency is caught before it breaks downstream plugins.

Separately, alerting could catch LinkageError around PPL execution so a broken dependency fails the monitor instead of the node. I can open that on the alerting repo.

Since 3.10.0 is planned for 2026-11-17, this probably needs to be fixed before release.

Activity

  1. added
    bug
    on Nov 2, 2026
  2. ig-suyas commented on Nov 2, 2026

    @ig-suyas

    Hi, I'd like to work on this. I'll start by reproducing it with the Docker steps above and checking how the thin jar is built, then pick the least invasive fix from the options in the description. I'll also add a test that loads the thin jar's classes without the opensearch module on the classpath, so this can't regress.

    @ps48 please let me know if someone is already on it or if you prefer a particular approach.

  3. ps48 commented on Nov 2, 2026

    @ps48
    MemberAuthor

    @ig-suyas Thanks for offering to take this up. Looks like the @ahkcs already fixed the issue. Please feel free to take a stab on other open issues in this repo.

  4. added 2 commits that reference this issue on Nov 3, 2026
    324971c
    1d4ce53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions