Skip to content

DAOS-10202 event: private event needs lock on completion and poll (#8… - #8780

Merged
jolivier23 merged 1 commit into
release/2.2from
mschaara/10202-2.2
Apr 21, 2022
Merged

jolivier23 merged 1 commit into
release/2.2from
mschaara/10202-2.2

Conversation

@mchaarawi

Copy link
Copy Markdown
Contributor

…738)

It is possible that the error is not reset to 0 when a process is retrieving the private event in a multi-threaded environment since another thread might have processed the event completion.

add a lock on daos_event_t for events that are not part of an event queue, including the thread private event. This is required because in a multithreaded environment like dfuse, the event can be completed and the error set non
atomically, while the main thread sees the completion but before the error has actually set, causing the owner of the event to reset the event error, with the other thread setting the error after. this affects future use of the event that launches with ev_error already set to the previous error.

Signed-off-by: Mohamad Chaarawi mohamad.chaarawi@intel.com

@mchaarawi
mchaarawi requested a review from a team as a code owner April 20, 2022 16:03
)

It is possible that the error is not reset to 0 when a process is retrieving the private event in a multi-threaded environment since another thread might have processed the event completion.

add a lock on daos_event_t for events that are not part of an event queue, including the thread private event. This is required because in a multithreaded environment like dfuse, the event can be completed and the error set non
atomically, while the main thread sees the completion but before the error has actually set, causing the owner of the event to reset the event error, with the other thread setting the error after. this affects future use of the event that launches with ev_error already set to the previous error.

Signed-off-by: Mohamad Chaarawi <mohamad.chaarawi@intel.com>

@daosbuild1 daosbuild1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

@daosbuild1 daosbuild1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

@mchaarawi
mchaarawi requested a review from a team April 21, 2022 11:04
@jolivier23
jolivier23 merged commit 3b3cc23 into release/2.2 Apr 21, 2022
@jolivier23
jolivier23 deleted the mschaara/10202-2.2 branch April 21, 2022 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants