Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-72090] Fixed NullPointerException during reporting #318

Merged
merged 2 commits into from
Oct 2, 2023

Conversation

haumacher
Copy link
Contributor

There is evidence that the key sets of the sourceProxies and reporters
maps get inconsistent. I observe randomly failing builds that report the
following error:

FATAL: Cannot invoke "java.util.List.iterator()" because the return
value of "java.util.Map.get(Object)" is null
java.lang.NullPointerException: Cannot invoke
"java.util.List.iterator()" because the return value of
"java.util.Map.get(Object)" is null
	at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:101)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:883)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526)
	at hudson.model.Run.execute(Run.java:1895)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
	at hudson.model.ResourceController.execute(ResourceController.java:101)
	at hudson.model.Executor.run(Executor.java:442)

The fix skips reporting for modules no reporters have been collected for.

Problem has been reported here: https://issues.jenkins.io/browse/JENKINS-72090

Testing done

The reason for the problem is not know, the fix provided here is only a safety mechanism that prevents the build to fail. There is no known test that triggers the problem.

Submitter checklist

There is evidence that the key sets of the sourceProxies and reporters
maps get inconsistent. I observe randomly failing builds that report the
following error:

```
FATAL: Cannot invoke "java.util.List.iterator()" because the return
value of "java.util.Map.get(Object)" is null
java.lang.NullPointerException: Cannot invoke
"java.util.List.iterator()" because the return value of
"java.util.Map.get(Object)" is null
	at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:101)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:883)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526)
	at hudson.model.Run.execute(Run.java:1895)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
	at hudson.model.ResourceController.execute(ResourceController.java:101)
	at hudson.model.Executor.run(Executor.java:442)
```
@olamy olamy added the bug label Oct 2, 2023
@olamy olamy merged commit 8fba37a into jenkinsci:master Oct 2, 2023
14 checks passed
@basil basil changed the title Fixed NPE during reporting [JENKINS-72090] Fixed NullPointerException during reporting Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants