title: What is the main cause of "self-suppression not permitted" in Spark?
body: <p>When the spark was writing a large file to HDFS using saveAsTextFile, I got an error: <code>java.lang.IllegalArgumentException: Self-suppression not permitted at java.lang.Throwable.addSuppressed(Throwable.java:1043)
  Caused by: java.io.IOException: All datanodes DatanodeInfoWithStorage
  </code></p>
  
  <p>I've searched for a solution to this, but I've not found the right solution and I don't know why.</p>
  
  <p>What is causing these errors, and how can I fix them?</p>