Skip to content

Coord: Fixed epoll_wait corner case.#1205

Merged
karya0 merged 1 commit intomainfrom
dev/karya0/coord-epoll
May 6, 2025
Merged

Coord: Fixed epoll_wait corner case.#1205
karya0 merged 1 commit intomainfrom
dev/karya0/coord-epoll

Conversation

@karya0
Copy link
Copy Markdown
Member

@karya0 karya0 commented May 1, 2025

When processing epoll_wait events, EPOLLIN should be processed before EPOLLHUP. This ensures no messages are dropped if a client disconnects immediately after sending a message.

@karya0 karya0 requested review from Copilot, gc00 and xuyao0127 May 1, 2025 19:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a corner case in handling epoll_wait events by ensuring that EPOLLIN events are processed before EPOLLHUP to avoid dropping messages when clients disconnect immediately after sending data.

  • EPOLLIN events are now handled first to read any incoming data from client sockets.
  • The disconnection events (EPOLLHUP, EPOLLRDHUP, EPOLLERR) are checked afterward to safely detach sockets.

When processing epoll_wait events, EPOLLIN should be processed before
EPOLLHUP. This ensures no messages are dropped if a client disconnects
immediately after sending a message.
@karya0 karya0 force-pushed the dev/karya0/coord-epoll branch from b82de2e to ebbce88 Compare May 1, 2025 21:16
Copy link
Copy Markdown
Collaborator

@xuyao0127 xuyao0127 left a comment

Choose a reason for hiding this comment

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

I'm approving to unblock your progress. I'm not familiar with this part of DMTCP. Maybe Gene can provide more feedback.

@karya0
Copy link
Copy Markdown
Member Author

karya0 commented May 6, 2025

Thanks @xuyao0127. I'll merge it now. If @gc00 has any comments, I'll create a follow-up PR to address them.

@karya0 karya0 merged commit ac7a8f5 into main May 6, 2025
1 check passed
@karya0 karya0 deleted the dev/karya0/coord-epoll branch May 6, 2025 00:01
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