If a Spark task is killed while writing blocks to disk (due to intentional job kills, automated killing of redundant speculative tasks, etc) then Spark may log exceptions like
If BypassMergeSortShuffleWriter is being used then a single cancelled task can result in hundreds of these stacktraces being logged.
Here are some StackOverflow questions asking about this:
Can we prevent this exception from occurring? If not, can we treat this "expected exception" in a special manner to avoid log spam? My concern is that the presence of large numbers of spurious exceptions is confusing to users when they are inspecting Spark logs to diagnose other issues.