Description
As yuchen.huo suggested at https://github.com/apache/spark/pull/34265#discussion_r728805893, we explore modifying DebugFilesystem to throw exceptions in case filesystem operations are performed from inside of the DAGScheduler's event processing thread. This could help prevent future issues that are similar to SPARK-23626.