Skip to content

Conversation

@happyharryh
Copy link

This PR fixes two issues that may occur during program shutdown.

  1. Phy::whack() is intended to be called from another thread to abort poll(). However, I found that _whackReceiveSocket is not added to _readfds via FD_SET. As a result, Phy::whack() has no actual effect, and the program may block in the select() call during shutdown.

  2. In OneServiceImpl, _serverThreadRunning / _serverThreadRunningV6 are used to decide whether to join the HTTPControlPlane threads (_serverThread / _serverThreadV6). However, these flags are not thread-safe. When the program is about to exit, after calling _controlPlane.stop() / _controlPlaneV6.stop(), _serverThreadRunning / _serverThreadRunningV6 may immediately become false, causing _serverThread / _serverThreadV6 not to be joined. This can lead to the log message terminate called without an active exception and the program exiting with code 134.

The two commits in this PR fix the issues described above respectively.

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.

1 participant