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

BWC builds failing with gradle error (irregularly) #37061

Closed
tvernum opened this issue Jan 2, 2019 · 5 comments · Fixed by #37726
Closed

BWC builds failing with gradle error (irregularly) #37061

tvernum opened this issue Jan 2, 2019 · 5 comments · Fixed by #37726
Labels
:Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team >test-failure Triaged test failures from CI

Comments

@tvernum
Copy link
Contributor

tvernum commented Jan 2, 2019

This seems to have been failing once or twice per day for the past week.

I think the first of the recent failures was https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+intake/937/console
The most recent is https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+multijob-unix-compatibility/os=ubuntu&&virtual/155/console

There was also an earlier failure here which was presumed to be due to the gradle 5 bump, but it seems to have been a one-off so we didn't pin down the root cause.

The failure is (from build 155):

23:25:54 1: Task failed with an exception.
23:25:54 -----------
23:25:54 * Where:
23:25:54 Build file '/var/lib/jenkins/workspace/elastic+elasticsearch+master+multijob-unix-compatibility/os/ubuntu&&virtual/distribution/bwc/build.gradle' line: 146
23:25:54 
23:25:54 * What went wrong:
23:25:54 Execution failed for task ':distribution:bwc:staged:buildBwcVersion'.
23:25:54 > Cannot invoke method add() on null object
23:25:54 
23:25:54 * Try:
23:25:54 Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
23:25:54 ==============================================================================
23:25:54 
23:25:54 2: Task failed with an exception.
23:25:54 -----------
23:25:54 * Where:
23:25:54 Build file '/var/lib/jenkins/workspace/elastic+elasticsearch+master+multijob-unix-compatibility/os/ubuntu&&virtual/distribution/bwc/build.gradle' line: 146
23:25:54 
23:25:54 * What went wrong:
23:25:54 Execution failed for task ':distribution:bwc:minor:buildBwcVersion'.
23:25:54 > Cannot invoke method add() on null object
23:25:54 
@tvernum tvernum added :Delivery/Build Build or test infrastructure >test-failure Triaged test failures from CI labels Jan 2, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@alpar-t
Copy link
Contributor

alpar-t commented Jan 14, 2019

The scan for the failures that are still available:
https://gradle.com/s/q2gygthoxrmkg
https://gradle.com/s/iiz7yqtj3ne7w

@alpar-t
Copy link
Contributor

alpar-t commented Jan 14, 2019

The relevant stack trace is:

at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:91)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:47)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:34)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at java_util_List$add$0.call(Unknown Source)
at org.elasticsearch.gradle.BuildPlugin.requireJavaHome(BuildPlugin.groovy:412)
at org.elasticsearch.gradle.BuildPlugin$requireJavaHome$13.callStatic(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:55)
at org.elasticsearch.gradle.BuildPlugin$requireJavaHome$13.callStatic(Unknown Source)
at org.elasticsearch.gradle.BuildPlugin.getJavaHome(BuildPlugin.groovy:417)
at org.elasticsearch.gradle.BuildPlugin$getJavaHome$12.callStatic(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:55)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:196)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:216)

We use a map and [:].withDefault{key -> return []} , then we do requiredJavaVersions.get(version).add(task). The get should retrun an empty list instead of null, but this doesn't seem to be the case. Relevant SO: https://stackoverflow.com/questions/24738903/creating-map-using-withdefault-causing-null-when-putting-element

alpar-t added a commit to alpar-t/elasticsearch that referenced this issue Jan 22, 2019
alpar-t added a commit that referenced this issue Jan 23, 2019
alpar-t added a commit that referenced this issue Jan 23, 2019
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team >test-failure Triaged test failures from CI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants