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

Close eventfd shutdown/wakeup race by closely tracking epoll edges #9586

Merged
merged 3 commits into from Sep 23, 2019

Commits on Sep 20, 2019

  1. Close eventfd shutdown/wakeup race by closely tracking epoll edges

    Motivation
    
    This is another iteration of #9476.
    
    Modifications
    
    Instead of maintaining a count of all writes performed and then using
    reads during shutdown to ensure all are accounted for, just set a flag
    after each write and don't reset it until the corresponding event has
    been returned from epoll_wait.
    
    This requires that while a write is still pending we don't reset
    wakenUp, i.e. continue to block writes from the wakeup() method.
    
    Result
    
    Race condition eliminated. Fixes #9362
    
    Co-authored-by: Norman Maurer <norman_maurer@apple.com>
    njhill and normanmaurer committed Sep 20, 2019
    Copy the full SHA
    a320db1 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    3527c9a View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    8523b5a View commit details
    Browse the repository at this point in the history