Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-20365

Potential deadlock if roxiemem callback is active when shared stream requested

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.4.26
    • Component/s: Thor
    • Labels:
      None

      Description

      If the roxiemem background OOM callback is active, calling a spillable row collector, and at the same time that row collector is being called to get its output stream and used by multiple outputs (e.g. because row collector is being used by a graph result), then deadlock can occur.

      In this situation, the CThorRowCollectorBase::getStream locks the spillableRows mutex, and on the 1st call setups a shared spillable row set container for any remaining rows in memory. In doing to it calls back into roxiemem to setup a new callback.
      If roxiemem is already blocked on the spillableRows mutex via it's background thread, then deadlock ensues.

      The fix is likely to be to ensure that the new shared spillable row set object, only installs the new callback once it's released the row collector's spillableRows mutex.

        Attachments

          Activity

            People

            • Assignee:
              jakesmith Jake Smith
              Reporter:
              jakesmith Jake Smith
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: