Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parallel-tactic: fix deadlocking race between shutdown and get_task #6152

Merged

Commits on Jul 11, 2022

  1. parallel-tactic: fix deadlocking race between shutdown and get_task

    Deadlock/Race is as follows:
      1. get_task() reads m_shutdown == false and enters loop body
      2. shutdown() is called; sets m_shutdown = true
      3. shutdown() calls m_cond.notify_all()
      4. get_task() finds no task in try_get_task()
      5. get_task() calls m_cond.wait(), missing the notification
      6. solve() waits forever on join()
    
    Provided patch wraps (2) and (3) with the condition variable lock so that
    step (5) cannot miss the notification.
    Anthony Romano committed Jul 11, 2022
    Configuration menu
    Copy the full SHA
    01e87f7 View commit details
    Browse the repository at this point in the history