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

Stop continuous looping during closedown (POSIX) #127

Open
vanrein opened this issue May 3, 2019 · 2 comments
Open

Stop continuous looping during closedown (POSIX) #127

vanrein opened this issue May 3, 2019 · 2 comments
Assignees

Comments

@vanrein
Copy link
Contributor

vanrein commented May 3, 2019

The POSIX system has inherited a Windows-compliance patch that is impacting its proper function. This should be reverted, even if only on POSIX.

To reproduce on Linux, start a chatsrv in the background and a chatcli in the foreground. Talk a bit and press ^D. This starts an inifinite loop that ends abruptly when chatsrv is brought to the foreground, constantly printing these lines:

TLS Pool[46086]: already done local shutdown
TLS Pool[46086]: inout [0].revents 0x0010
TLS Pool[46086]: inout [1].revents 0x0000

This is bad: The TLS Pool is drawing CPU because a client program does not respond (is misbehaving). In this case, it is probably suspended due to backgrounding, or waiting to read from the console. Anyway, the TLS Pool should not wait for the client program to shutdown its half but instead stop looping, or stop watching revents or somehow other reduce this load.

The load is observable as a running fan, so it is not subtle. The Windows patch that causes it is probably the one that silenced the fan on Windows, so this may be a POSIX incompatibility (of either platform!) caused by the fuzzy "definition" of POSIX in this point.

@vanrein
Copy link
Contributor Author

vanrein commented May 3, 2019

Wil jij hier (eerst) eens naar kijken, Henri?

@hfmanson
Copy link
Contributor

fixed by using select instead of poll

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

No branches or pull requests

2 participants