Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/640#discussion_r12389302
  
    --- Diff: core/src/main/scala/org/apache/spark/api/python/PythonRDD.scala 
---
    @@ -210,10 +126,15 @@ private[spark] class PythonRDD[T: ClassTag](
                   Array.empty[Byte]
               }
             } catch {
    -          case e: Exception if readerException != null =>
    +
    +          case e: Exception if context.interrupted =>
    +            logDebug("Exception thrown after task interruption", e)
    +            throw new TaskKilledException
    +
    +          case e: Exception if writerThread.exception.isDefined =>
                 logError("Python worker exited unexpectedly (crashed)", e)
    -            logError("Python crash may have been caused by prior 
exception:", readerException)
    -            throw readerException
    +            logError("This may have been caused by a prior exception:", 
writerThread.exception.get)
    +            throw writerThread.exception.get
     
               case eof: EOFException =>
                 throw new SparkException("Python worker exited unexpectedly 
(crashed)", eof)
    --- End diff --
    
    Ok, yeah I also did a quick elsewhere: it looks like `IOExceptions` are 
triggered if the stream is abruptly closed on our side (among other unexpected 
errors), but `EOFExceptions` are triggered if the stream is closed on their 
side.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to