Skip to content

[CI] MachineLearningLicensingTests] [testAutoCloseJobWithDatafeed fails with NPE #51285

@henningandersen

Description

@henningandersen

MachineLearningLicensingTests.testAutoCloseJobWithDatafeed fails rarely with NPE. Can be reproduced by adding a sleep in the onResponse method here and using following repro line:

./gradlew ':x-pack:plugin:ml:test' --tests "org.elasticsearch.license.MachineLearningLicensingTests.testAutoCloseJobWithDatafeed" -Dtests.seed=8505B129BBE04142 -Dtests.security.manager=true -Dtests.locale=en-SG -Dtests.timezone=Asia/Hovd -Dcompiler.java=13

It failed on a couple of PR builds, for instance this one:

https://gradle-enterprise.elastic.co/s/doocabu3vhmdm/tests/7bifs6bt3pims-kf5sbxwq5fdpm

The assertion error in that build is new code, but caused by the NullPointerException:

Caused by: java.lang.NullPointerException
	at org.elasticsearch.xpack.ml.datafeed.DatafeedManager.getJobId(DatafeedManager.java:271)
	at org.elasticsearch.xpack.ml.datafeed.DatafeedManager.getJobState(DatafeedManager.java:275)
	at org.elasticsearch.xpack.ml.datafeed.DatafeedManager$TaskRunner.runWhenJobIsOpened(DatafeedManager.java:498)
	at org.elasticsearch.xpack.ml.datafeed.DatafeedManager$1.onResponse(DatafeedManager.java:94)
	at org.elasticsearch.xpack.ml.datafeed.DatafeedManager$1.onResponse(DatafeedManager.java:91)
	at org.elasticsearch.action.ActionListener$4.onResponse(ActionListener.java:162)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions