elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
1.01k stars 24.82k forks source link

[ML] NPE in MlAssignmentNotifier #112136

Open davidkyle opened 2 months ago

davidkyle commented 2 months ago

Elasticsearch Version

8.13

Installed Plugins

No response

Java Version

bundled

OS Version

any

Problem Description

An NullPointerException with this stack trace has been reported

[instance-0000000021] uncaught exception in thread [elasticsearch[instance-0000000021][generic][T#30254]] java.lang.NullPointerException: Cannot invoke "org.elasticsearch.xpack.core.ml.utils.MlTaskState.isFailed()" because the return value of "org.elasticsearch.persistent.PersistentTasksCustomMetadata$PersistentTask.getState()" is null at org.elasticsearch.xpack.ml.MlAssignmentNotifier.findLongTimeUnassignedTasks(MlAssignmentNotifier.java:303) ~[?:?] at org.elasticsearch.xpack.ml.MlAssignmentNotifier.logLongTimeUnassigned(MlAssignmentNotifier.java:270) ~[?:?] at org.elasticsearch.xpack.ml.MlAssignmentNotifier.lambda$clusterChanged$0(MlAssignmentNotifier.java:94) ~[?:?] at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:917) ~[elasticsearch-8.13.2.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?] at java.lang.Thread.run(Thread.java:1583) ~[?:?]

Steps to Reproduce

Unknown

Logs (if relevant)

No response

elasticsearchmachine commented 2 months ago

Pinging @elastic/ml-core (Team:ML)