-
Notifications
You must be signed in to change notification settings - Fork 180
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
NullPointerException with bazel@HEAD in CI #488
Comments
Looks like this was caused by https://cs.opensource.google/bazel/bazel/+/e9022f6731b4f62d3a08bdc4eacce70ad28e3c78. Cc @oquenchil |
Taking a look. |
I'm a bit puzzled about why this happens. I can't reproduce locally with 100000 runs per test, I don't see a race condition and even if the variables that I take from the environment The only thing I can think of right now is adding more logging to detect if we put/get null from the concurrent hash map, then log all the environment variables in the environment and all the entries in the map. We'd check that in and if we see the exception again use the new info to find out what's going on. @fmeum wdyt? |
The But yes, more logging would certainly help. |
I thought it was always atomic within the same filesystem. In which filesystem types isn't it atomic? |
That does seem to be true for the It shouldn't be used on Ubuntu unless there is some other bug, so you are right that this isn't likely to be the cause here. |
I think that there is a race, I'm just not sure whether it can arise in practice: If spawn #1 blocks on the |
Ah yes, but would we have seen this error? From the error I'd say there was an entry in the map but it was actually null somehow. Apart from logging the environment variables and the contents of the map, can you think of anything else that would be useful to log? |
The result of the |
Wonderful, thanks! |
Downstream CI of bazel-skylib is Green now https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/3689#018df801-66e8-42eb-8fcf-b047fad7a8cd. We can close this issue. |
Attempts to address NPE reported in: bazelbuild/bazel-skylib#488 (comment) and #21665 (comment) The `put()` call to the runfiles dir map is placed before the call that stashes the corresponding directory to address the race condition described here: bazelbuild/bazel-skylib#488 (comment). The exception will now log: - entries in the runfiles dir map - environment variables - stashes on disk Closes #21668. PiperOrigin-RevId: 615739651 Change-Id: Ida90e334d1d1f890cf204d272134726bb1f70eb9
Attempts to address NPE reported in: bazelbuild/bazel-skylib#488 (comment) and bazelbuild#21665 (comment) The `put()` call to the runfiles dir map is placed before the call that stashes the corresponding directory to address the race condition described here: bazelbuild/bazel-skylib#488 (comment). The exception will now log: - entries in the runfiles dir map - environment variables - stashes on disk Closes bazelbuild#21668. PiperOrigin-RevId: 615739651 Change-Id: Ida90e334d1d1f890cf204d272134726bb1f70eb9
…message (#21692) Attempts to address NPE reported in: bazelbuild/bazel-skylib#488 (comment) and #21665 (comment) The `put()` call to the runfiles dir map is placed before the call that stashes the corresponding directory to address the race condition described here: bazelbuild/bazel-skylib#488 (comment). The exception will now log: - entries in the runfiles dir map - environment variables - stashes on disk Closes #21668. Commit 59dbf7a PiperOrigin-RevId: 615739651 Change-Id: Ida90e334d1d1f890cf204d272134726bb1f70eb9 Co-authored-by: Pedro <plf@google.com>
CI: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/3681#018de327-837e-4bb4-8986-ec35f627c4d9
Platform: Ubuntu
Logs:
Steps:
CC Greenteam @meteorcloudy
The text was updated successfully, but these errors were encountered: