Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-1046

Race condition in IoMgr. Blocked ranges enqueued after cancel.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 1.4
    • Impala 1.4
    • None
    • None

    Description

      if (!enough_memory) {
          RequestContext::PerDiskState& state = reader->disk_states_[disk_queue->disk_id];
          unique_lock<mutex> reader_lock(reader->lock_);
          if (!range->ready_buffers_.empty()) {
            // We have memory pressure and this range doesn't need another buffer
            // (it already has one queued). Skip this range and pick it up later.
            range->blocked_on_queue_ = true;
            reader->blocked_ranges_.Enqueue(range);                                                <-- This is bad and breaks the invariant that blocked ranges are not queued anymore if the reader is cancelled. Not sure if this is a good invariant or if it should be fixed here.
            state.DecrementRequestThread();
            return;
          } else {
            // We need to get a buffer anyway since there are none queued. The query
            // is likely to fail due to mem limits but there's nothing we can do about that
            // now.
          }
        }
      

      Attachments

        Activity

          People

            nong_impala_60e1 Nong Li
            nong_impala_60e1 Nong Li
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: