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

SEGFAULT core dump after detach; ReventLoop::RemovePollHandler() can cause race condition #14

Closed
wfjm opened this issue May 20, 2017 · 1 comment
Assignees
Labels

Comments

@wfjm
Copy link
Owner

wfjm commented May 20, 2017

The detach of a tcp type virtual terminal or a tap type virtual ethernet device can lead to a SEGFAULT core dump, e.g. after a

    cpu0ttb0 det

This is caused by a race condition between the detach run-down and the implementation of
ReventLoop::RemovePollHandler().

@wfjm wfjm added the bug label May 20, 2017
@wfjm wfjm self-assigned this May 20, 2017
@wfjm
Copy link
Owner Author

wfjm commented May 19, 2019

The culprit was a design error in the RemovePollHandler flow, which allowed that DoPoll returned while poll list updates were still pending and the subsequent execution of DoCall called removed handlers.

DoPoll now loops until there are no pending poll list updates and DoCall quits processing poll change notifications when it detects pending poll list updates.

Fixed with commit 6f56f29.

@wfjm wfjm closed this as completed May 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant