Uploaded image for project: 'Apache Tez'
  1. Apache Tez
  2. TEZ-3696

Jobs can hang when both concurrency and speculation are enabled

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.7.2, 0.9.0, 0.8.6
    • None
    • None
    • Reviewed

    Description

      We can reproduce the hung job by doing the following:

      1. Run a sleep job with a concurrency of 1, speculation enabled, and 3 tasks

      HADOOP_CLASSPATH="$TEZ_HOME/*:$TEZ_HOME/lib/*:$TEZ_CONF_DIR" yarn jar $TEZ_HOME/tez-tests-*.jar mrrsleep -Dtez.am.vertex.max-task-concurrency=1 -Dtez.am.speculation.enabled=true -Dtez.task.timeout-ms=60000 -m 3 -mt 60000 -ir 0 -irt 0 -r 0 -rt 0
      

      2. Let the 1st task run to completion and then stop the 2nd task so that a speculative attempt is scheduled. Once the speculative attempt is scheduled for the 2nd task, continue the original attempt and let it complete.

      kill -STOP <pid>
      // wait a few seconds for a speculative attempt to kick off
      kill -CONT <pid>
      

      3. Kill the 3rd task, which will create a 2nd attempt

      kill -9 <pid> 
      

      4. The next thing to be drawn off of the queue will be the speculative attempt of the 2nd task. However, it is already completed, so it will just sit in the final state and the job will hang.

      Basically, for the failure to happen, the number of speculative tasks that are scheduled, but not yet ran has to be >= the concurrency of the job and there has to be at least 1 task failure.

      Attachments

        1. TEZ-3696.001.patch
          3 kB
          Eric Badger
        2. TEZ-3696.002.patch
          9 kB
          Eric Badger
        3. TEZ-3696.003.patch
          9 kB
          Eric Badger
        4. TEZ-3696.004.patch
          9 kB
          Eric Badger
        5. TEZ-3696-branch-0.7.004.patch
          9 kB
          Eric Badger

        Activity

          People

            ebadger Eric Badger
            ebadger Eric Badger
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: