Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-15975

Improper Popen.wait() return code handling in dev/run-tests

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.0
    • Fix Version/s: 1.5.3, 1.6.2, 2.0.0
    • Component/s: Project Infra
    • Labels:
      None
    • Target Version/s:

      Description

      In dev/run-tests.py there's a line where we effectively do

      retcode = some_popen_instance.wait()
      if retcode > 0:
        err
      # else do nothing
      

      but this code is subtlety wrong because Popen's return code will be negative if the child process was terminated by a signal: https://docs.python.org/2/library/subprocess.html#subprocess.Popen.returncode

      We should change this to retcode != 0 so that we properly error out and exit due to termination by signal.

        Attachments

          Activity

            People

            • Assignee:
              joshrosen Josh Rosen
              Reporter:
              joshrosen Josh Rosen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: