Skip to content

tetragon: fix initialization deadlock #574

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

Merged
merged 1 commit into from
Dec 5, 2022
Merged

Conversation

kkourt
Copy link
Contributor

@kkourt kkourt commented Dec 2, 2022

There is a potential for a deadlock in the initialization case. This might happen if, for example, we pass a wrong filename for the config file.

We fix this by generating a new context which we can cancel without causing deadlocks.

The patch also adds comments to explain why this is needed so more details can be found there.

Signed-off-by: Djalal Harouni [email protected]
Signed-off-by: Kornilios Kourtis [email protected]
Reported-by: Zhiyu Wang [email protected]

@kkourt kkourt requested a review from a team as a code owner December 2, 2022 11:06
@kkourt kkourt requested a review from tpapagian December 2, 2022 11:06
@kkourt kkourt force-pushed the pr/kkourt/init-config-deadlock branch 2 times, most recently from 632b453 to 251122a Compare December 2, 2022 11:20
There is a potential for a deadlock in the initialization case. This
might happen if, for example, we pass a wrong filename for the config
file.

We fix this by generating a new context which we can cancel without
causing deadlocks.

The patch also adds comments to explain why this is needed so more
details can be found there.

Reported-by: Zhiyu Wang <[email protected]>
Signed-off-by: Djalal Harouni <[email protected]>
Signed-off-by: Kornilios Kourtis <[email protected]>
@kkourt kkourt force-pushed the pr/kkourt/init-config-deadlock branch from 251122a to 9214209 Compare December 2, 2022 11:28
@kkourt kkourt requested a review from tixxdz December 2, 2022 11:28
Copy link
Member

@tpapagian tpapagian left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@kkourt kkourt merged commit 7d51e6f into main Dec 5, 2022
@kkourt kkourt deleted the pr/kkourt/init-config-deadlock branch December 5, 2022 11:31
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