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

PR - Issue 49572 - ns_job_wait race on condvar #2651

Closed
389-ds-bot opened this issue Sep 13, 2020 · 4 comments
Closed

PR - Issue 49572 - ns_job_wait race on condvar #2651

389-ds-bot opened this issue Sep 13, 2020 · 4 comments
Labels
merged Migration flag - PR pr Migration flag - PR

Comments

@389-ds-bot
Copy link

389-ds-bot commented Sep 13, 2020

Cloned from Pagure Pull-Request: https://pagure.io/389-ds-base/pull-request/49592

  • Created at 2018-03-02 13:19:09 by spichugi (@droideck)
  • Merged at 2018-03-05 08:48:46

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!)

@389-ds-bot 389-ds-bot added merged Migration flag - PR pr Migration flag - PR labels Sep 13, 2020
@389-ds-bot
Copy link
Author

Comment from vashirov (@vashirov) at 2018-03-02 15:06:36

/rebuild

@389-ds-bot
Copy link
Author

Comment from firstyear (@Firstyear) at 2018-03-05 00:49:09

Ack from me :)

@389-ds-bot
Copy link
Author

Comment from spichugi (@droideck) at 2018-03-05 08:48:47

Pull-Request has been merged by droideck

@389-ds-bot
Copy link
Author

Patch
49592.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged Migration flag - PR pr Migration flag - PR
Projects
None yet
Development

No branches or pull requests

1 participant