aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe
diff options
context:
space:
mode:
authorGravatar Janak Ramakrishnan <janakr@google.com>2015-10-05 15:14:48 +0000
committerGravatar Laszlo Csomor <laszlocsomor@google.com>2015-10-06 07:03:02 +0000
commit271c10b2211f6e0bad4b2c09d29af6d9b1723ef9 (patch)
tree1918e33a5275eb2aca0ee2935f390ae7b0bc2893 /src/main/java/com/google/devtools/build/lib/skyframe
parent6716ec32d329213d39b9831792ac40b65a3849cc (diff)
Add debugging info in case of unexpected crash.
-- MOS_MIGRATED_REVID=104658639
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java
index 8ef183b00d..6e1b6c3e08 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java
@@ -389,11 +389,15 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver
// Sadly, even if we discovered inputs, sometimes the action runs and discovers more inputs.
// Technically, this means our pre-execution input discovery is buggy, but it turns out this
// is impractical to fix.
- // Any new inputs should already have been built -- this is a check that our input
- // discovery code is not missing too much. It may have to be removed if further input
- // discovery quirks are found.
- Preconditions.checkState(!env.valuesMissing(), "%s %s %s",
- action, metadataFoundDuringActionExecution, state);
+ if (env.valuesMissing()) {
+ // Any new inputs should already have been built -- this is a check that our input
+ // discovery code is not missing too much. It may have to be removed if further input
+ // discovery quirks are found.
+ Set<Artifact> missingArtifacts =
+ Maps.filterValues(metadataFoundDuringActionExecution, Predicates.isNull()).keySet();
+ throw new IllegalStateException(
+ "Missing artifacts: " + missingArtifacts + ", " + state + action);
+ }
Set<FileArtifactValue> knownMetadata =
ImmutableSet.copyOf(state.inputArtifactData.values());
ImmutableSet.Builder<Artifact> discoveredInputBuilder =