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

Fixed NPE 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

Edit tasklist title
Beta Give feedback Tasklist Submitter checklist, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
    Options
  2. Ensure that the pull request title represents the desired changelog entry
    Options
  3. Please describe what you did
    Options
  4. Link to relevant issues in GitHub or Jira
    Options
  5. Link to relevant pull requests, esp. upstream and downstream changes
    Options
  6. Ensure you have provided tests - that demonstrates feature works or fixes the issue
    Options

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants