Skip to content

Fix: termination detector race condition#438

Merged
bosilca merged 1 commit intoICLDisco:masterfrom
therault:fixes/termdet-fourcounter
Nov 1, 2022
Merged

Fix: termination detector race condition#438
bosilca merged 1 commit intoICLDisco:masterfrom
therault:fixes/termdet-fourcounter

Conversation

@therault
Copy link
Copy Markdown
Contributor

@therault therault commented Nov 1, 2022

This is a backport of fixes made in TESSEOrg/parsec fork. There is a race condition in the termination detector that tries to free the monitor too early. The solution consists in adding an explicit 'unmonitor taskpool' function in the termination detector API and wait that the taskpool is destroyed / recycled to unmonitor the taskpool. This should help solve the issues in the taspool_wait PR too.

  • Amend cherry-pick to fit master
  • fix conflicts during rebase with master

@therault therault requested a review from a team as a code owner November 1, 2022 15:16
@therault therault added this to the v4.0 milestone Nov 1, 2022
Comment thread parsec/class/parsec_rwlock.h Outdated

#if defined(PARSEC_DEBUG_PARANOID)
#define PARSEC_RWLOCK_UNLOCKED { PARSEC_ATOMIC_UNLOCKED, PARSEC_ATOMIC_UNLOCKED, 0, 0 }
#define PARSEC_RWLOCK_UNLOCKED PARSEC_ATOMIC_UNLOCKED, PARSEC_ATOMIC_UNLOCKED, 0, 0,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change seems to unintended. Didn't we just make the change to add the brackets to the PARSEC_RWLOCK_UNLOCKED?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed (and applied the same changes to the non-debug-paranoid case)

@therault therault force-pushed the fixes/termdet-fourcounter branch from 9b28c25 to 80b139e Compare November 1, 2022 15:27
@therault therault force-pushed the fixes/termdet-fourcounter branch from 80b139e to cf8629a Compare November 1, 2022 15:48
@bosilca
Copy link
Copy Markdown
Contributor

bosilca commented Nov 1, 2022

Please update the commit log to identify the original commit that was cherry-picked.

@bosilca bosilca merged commit 38945c8 into ICLDisco:master Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants