Improve concurrency around shutdown in PeriodicJobImpl

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • ALL
    • Programmability 2024-12-09, Programmability 2024-12-23, Programmability 2025-01-06
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      It's possible that PeriodicJobImpl::stop() returns after PeriodicJobImpl::_run() starts a thread. If this happens while the mutex is locked such as here, then we get the "Assertion `INTERNAL_SYSCALL_ERRNO (e, __err) != ESRCH || !robust' failed" errors (owner of lock died).

       

      We could just let the job thread run (and go through normal shutdown/canceled procedure) and join the thread in all cases. Or, the decision making on whether PeriodicJobImpl::stop() joins the job thread could be made atomic.

            Assignee:
            Unassigned
            Reporter:
            Alex Li
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: