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

[4.2.0rc1] rules_apple fails with NoSuchElementException #13713

Closed
katre opened this issue Jul 19, 2021 · 1 comment
Closed

[4.2.0rc1] rules_apple fails with NoSuchElementException #13713

katre opened this issue Jul 19, 2021 · 1 comment
Assignees
Labels
P1 I'll work on this now. (Assignee required) team-Rules-Server Issues for serverside rules included with Bazel type: bug

Comments

@katre
Copy link
Member

katre commented Jul 19, 2021

Downstream rules_apple tests for the 4.2.0rc1 release (#13558) are failing with NoSuchElementException in error handling code.

Error stack trace:

(16:44:12) FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.RuntimeException: Unrecoverable error while evaluating node 'ActionLookupData{actionLookupKey=ConfiguredTargetKey{label=//test/starlark_tests/resources:bundle_library_ios_lib, config=BuildConfigurationValue.Key[3bc2cf8a763c114aaa88eca5ffcf097389b4a9682260ba2edc7b24fd980e62cf]}, actionIndex=3}' (requested by nodes 'ArtifactNestedSetKey{rawChildren=[File:[[<execution_root>]bazel-out/ios-arm64-min8.0-applebin_ios-ios_arm64-opt-ST-2c3b17108f53/bin]test/starlark_tests/resources/libbasic_bundle_lib.a, File:[[<execution_root>]bazel-out/ios-arm64-min8.0-applebin_ios-ios_arm64-opt-ST-2c3b17108f53/bin]test/starlark_tests/resources/libbundle_library_ios_lib.a, File:[[<execution_root>]bazel-out/ios-arm64-min8.0-applebin_ios-ios_arm64-opt-ST-2c3b17108f53/bin]test/starlark_tests/resources/libempty_strings_file_lib.a, File:[[<execution_root>]bazel-out/ios-arm64-min8.0-applebin_ios-ios_arm64-opt-ST-2c3b17108f53/bin]test/starlark_tests/resources/libios_localized_assets_lib.a, File:[[<execution_root>]bazel-out/ios-arm64-min8.0-applebin_ios-ios_arm64-opt-ST-2c3b17108f53/bin]test/starlark_tests/resources/libios_non_localized_assets_lib.a, File:[[<execution_root>]bazel-out/ios-arm64-min8.0-applebin_ios-ios_arm64-opt-ST-2c3b17108f53/bin]test/starlark_tests/resources/libnested_bundle_lib.a, File:[[<execution_root>]bazel-out/ios-arm64-min8.0-applebin_ios-ios_arm64-opt-ST-2c3b17108f53/bin]test/starlark_tests/resources/libobjc_main_lib.a, File:[[<execution_root>]bazel-out/ios-arm64-min8.0-applebin_ios-ios_arm64-opt-ST-2c3b17108f53/bin]test/starlark_tests/resources/libobjc_common_lib.a, File:[[<execution_root>]bazel-out/ios-arm64-min8.0-applebin_ios-ios_arm64-opt-ST-2c3b17108f53/bin]test/starlark_tests/resources/libsticker_pack_ios_lib.a, File:[[<execution_root>]bazel-out/ios-arm64-min8.0-applebin_ios-ios_arm64-opt-ST-2c3b17108f53/bin]test/starlark_tests/targets_under_test/ios/app-linker.objlist]}')
	at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:563)
	at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:398)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.util.NoSuchElementException
	at java.base/java.util.LinkedHashMap$LinkedHashIterator.nextNode(Unknown Source)
	at java.base/java.util.LinkedHashMap$LinkedEntryIterator.next(Unknown Source)
	at java.base/java.util.LinkedHashMap$LinkedEntryIterator.next(Unknown Source)
	at com.google.devtools.build.lib.runtime.UiStateTracker.describeActionProgress(UiStateTracker.java:713)
	at com.google.devtools.build.lib.runtime.UiStateTracker.describeAction(UiStateTracker.java:783)
	at com.google.devtools.build.lib.runtime.UiStateTracker.sampleOldestActions(UiStateTracker.java:948)
	at com.google.devtools.build.lib.runtime.UiStateTracker.printActionState(UiStateTracker.java:882)
	at com.google.devtools.build.lib.runtime.UiStateTracker.writeProgressBar(UiStateTracker.java:1257)
	at com.google.devtools.build.lib.runtime.UiEventHandler.addProgressBar(UiEventHandler.java:968)
	at com.google.devtools.build.lib.runtime.UiEventHandler.handleLocked(UiEventHandler.java:352)
	at com.google.devtools.build.lib.runtime.UiEventHandler.handleInternal(UiEventHandler.java:430)
	at com.google.devtools.build.lib.runtime.UiEventHandler.handle(UiEventHandler.java:458)
	at com.google.devtools.build.lib.events.Reporter.handle(Reporter.java:142)
	at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.dumpRecordedOutErr(SkyframeActionExecutor.java:1629)
	at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.dumpRecordedOutErr(SkyframeActionExecutor.java:1612)
	at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.access$1800(SkyframeActionExecutor.java:130)
	at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.actuallyCompleteAction(SkyframeActionExecutor.java:1094)
	at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.continueAction(SkyframeActionExecutor.java:1065)
	at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.run(SkyframeActionExecutor.java:975)
	at com.google.devtools.build.lib.skyframe.ActionExecutionState.runStateMachine(ActionExecutionState.java:129)
	at com.google.devtools.build.lib.skyframe.ActionExecutionState.getResultOrDependOnFuture(ActionExecutionState.java:81)
	at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.executeAction(SkyframeActionExecutor.java:472)
	at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.checkCacheAndExecuteIfNeeded(ActionExecutionFunction.java:834)
	at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.compute(ActionExecutionFunction.java:307)
	at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:477)
	... 4 more
bazel build failed with exit code 37

More details: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/2105#d0d81f5b-9c85-4db8-b1ac-dfe2e57ba30f

@katre katre added type: bug P1 I'll work on this now. (Assignee required) release blocker team-Rules-Server Issues for serverside rules included with Bazel labels Jul 19, 2021
@katre katre self-assigned this Jul 19, 2021
@katre katre mentioned this issue Jul 19, 2021
9 tasks
@katre
Copy link
Member Author

katre commented Jul 19, 2021

Looks like there is a race condition in UiStateTracker.describeActionProgress.

Specifically, the code first checks if action.runningProgresses is empty, then grabs the first, but something is clearing the list between the lines.

This isn't deterministic, but should still be fixed. Passing back to @coeuvre to investigate.

@katre katre assigned coeuvre and unassigned katre Jul 19, 2021
coeuvre added a commit to coeuvre/bazel that referenced this issue Jul 23, 2021
Fixes bazelbuild#13713.

I will create checkpick request for 4.2.0 once merged into main branch.

Closes bazelbuild#13719.

PiperOrigin-RevId: 386213448
katre pushed a commit to coeuvre/bazel that referenced this issue Jul 23, 2021
Fixes bazelbuild#13713.

I will create checkpick request for 4.2.0 once merged into main branch.

Closes bazelbuild#13719.

PiperOrigin-RevId: 386213448
larsrc-google pushed a commit to larsrc-google/bazel that referenced this issue Jul 28, 2021
Fixes bazelbuild#13713.

I will create checkpick request for 4.2.0 once merged into main branch.

Closes bazelbuild#13719.

PiperOrigin-RevId: 386213448
larsrc-google pushed a commit to larsrc-google/bazel that referenced this issue Jul 30, 2021
Fixes bazelbuild#13713.

I will create checkpick request for 4.2.0 once merged into main branch.

Closes bazelbuild#13719.

PiperOrigin-RevId: 386213448
luca-digrazia pushed a commit to luca-digrazia/DatasetCommitsDiffSearch that referenced this issue Sep 4, 2022
    Fixes bazelbuild/bazel#13713.

    I will create checkpick request for 4.2.0 once merged into main branch.

    Closes #13719.

    PiperOrigin-RevId: 386213448
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 I'll work on this now. (Assignee required) team-Rules-Server Issues for serverside rules included with Bazel type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants