Add debugging for --notrack_incremental_state crash in
@@ -447,9 +447,7 @@ public abstract class InvalidatingNodeVisitor<GraphT extends QueryableGraph> {
}
for (final SkyKey key : keysToGet) {
executor.execute(
- new Runnable() {
- @Override
- public void run() {
+ () -> {
ThinNodeEntry entry = entries.get(key);
if (entry == null) {
@@ -468,20 +466,21 @@ public abstract class InvalidatingNodeVisitor<GraphT extends QueryableGraph> {
return;
}
- // It is not safe to interrupt the logic from this point until the end of the
- // method.
+ // It is not safe to interrupt the logic from this point until the end of the method.
// Any exception thrown should be unrecoverable.
// This entry remains in the graph in this dirty state until it is re-evaluated.
MarkedDirtyResult markedDirtyResult;
try {
- markedDirtyResult =
- entry.markDirty(isChanged ? DirtyType.CHANGE : DirtyType.DIRTY);
+ markedDirtyResult = entry.markDirty(isChanged ? DirtyType.CHANGE : DirtyType.DIRTY);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
// This can only happen if the main thread has been interrupted, and so the
// AbstractQueueVisitor is shutting down. We haven't yet removed the pending
// visitation, so we can resume next time.
return;
+ } catch (IllegalStateException e) {
+ // Debugging for #10912.
+ throw new IllegalStateException("Crash caused by " + key, e);
}
if (markedDirtyResult == null) {
// Another thread has already dirtied this node. Don't do anything in this thread.
@@ -494,13 +493,11 @@ public abstract class InvalidatingNodeVisitor<GraphT extends QueryableGraph> {
// only be marked dirty (because only a dependency of theirs has changed).
visit(markedDirtyResult.getReverseDepsUnsafe(), InvalidationType.DIRTIED, key);
- progressReceiver.invalidated(
- key, EvaluationProgressReceiver.InvalidationState.DIRTY);
+ progressReceiver.invalidated(key, EvaluationProgressReceiver.InvalidationState.DIRTY);
// Remove the node from the set as the last operation.
if (supportInterruptions) {
pendingVisitations.remove(Pair.of(key, invalidationType));
}
- }
});
}
}
