You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug description: ns_job_persist_disarm_test were failing
because of a race condition.
Fix description: We need to lock the cb mutex before we arm
the job so the order of operations that happens there is
determined.
First we lock the mutex, then after the rearm it will
disarm it and will wait inside for the mutex unlock.
In a meanwhile, our testing thread will come to cond_wait
and it will unlock the mutex while waiting for the signal.
The mutex inside of callback will be acquired and cb_check will set to 1
and the signal will be sent. After that, cond_wait will be released and
the test will check for the right cb_check value.
Cloned from Pagure Pull-Request: https://pagure.io/389-ds-base/pull-request/49592
Bug description: ns_job_persist_disarm_test were failing
because of a race condition.
Fix description: We need to lock the cb mutex before we arm
the job so the order of operations that happens there is
determined.
First we lock the mutex, then after the rearm it will
disarm it and will wait inside for the mutex unlock.
In a meanwhile, our testing thread will come to cond_wait
and it will unlock the mutex while waiting for the signal.
The mutex inside of callback will be acquired and cb_check will set to 1
and the signal will be sent. After that, cond_wait will be released and
the test will check for the right cb_check value.
Resolves: #2631
Reviewed by: wibrown (Thanks!)
The text was updated successfully, but these errors were encountered: