Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -606,14 +606,18 @@ private static ImmutableList<SpawnResult> waitBranch(
// for cancellation. Assume the latter here because if this was actually a user interrupt,
// our own get() would have been interrupted as well. It makes no sense to propagate the
// interrupt status across threads.
context
.getEventHandler()
.handle(
Event.info(
String.format(
"Caught InterruptedException from ExecutionException for %s branch of %s,"
+ " which may cause a crash.",
mode, getSpawnReadableId(branch.getSpawn()))));
if (options.debugSpawnScheduler) {
context
.getEventHandler()
.handle(
Event.info(
String.format(
"Caught InterruptedException from ExecutionException for %s branch of %s,"
+ " which may cause a crash:\n%s",
mode,
getSpawnReadableId(branch.getSpawn()),
Throwables.getStackTraceAsString(cause))));
}
return null;
} else {
// Even though we cannot enforce this in the future's signature (but we do in Branch#call),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,11 @@ private static <T> T getFromFuture(Future<T> future) throws IOException, Interru
future.cancel(/* mayInterruptIfRunning= */ true);
throw e;
} catch (CancellationException e) {
throw new InterruptedException();
// TODO(b/173153395): Drop the cause when the crashes with dynamic execution have been
// diagnosed.
var interruptedException = new InterruptedException();
interruptedException.initCause(e);
throw interruptedException;
} catch (ExecutionException e) {
if (e.getCause() instanceof WrappedException wrappedException) {
wrappedException.unwrapAndThrow();
Expand Down