Add logging for BuildEventServiceUploader cancelation. I saw an OOM hang and keep on going, and I'd like to eliminate this as the cause of that.
@@ -49,6 +49,8 @@ import com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos;
import com.google.devtools.build.lib.buildeventstream.LargeBuildEventSerializedEvent;
import com.google.devtools.build.lib.buildeventstream.PathConverter;
import com.google.devtools.build.lib.clock.Clock;
+import com.google.devtools.build.lib.profiler.AutoProfiler;
+import com.google.devtools.build.lib.profiler.GoogleAutoProfilerUtils;
import com.google.devtools.build.lib.util.AbruptExitException;
import com.google.devtools.build.lib.util.ExitCode;
import com.google.devtools.build.lib.util.Sleeper;
@@ -545,6 +547,8 @@ public final class BuildEventServiceUploader implements Runnable {
}
throw e;
} finally {
+ logger.info("About to cancel all local file uploads");
+ try (AutoProfiler ignored = GoogleAutoProfilerUtils.logged("local file upload cancelation")) {
// Cancel all local file uploads that may still be running
// of events that haven't been uploaded.
EventLoopCommand event;
@@ -560,6 +564,7 @@ public final class BuildEventServiceUploader implements Runnable {
}
}
}
+ }
private void cancelLocalFileUpload(SendRegularBuildEventCommand event) {
ListenableFuture<PathConverter> localFileUploaderFuture = event.localFileUploadProgress();
