forked from jamis/net-ssh-multi
-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Hello, I noticed knife ssh
(a Chef tool) sometimes pegs a core. I traced the issue back to this library, which sometimes falls into a busy IO.select
loop here (via the parent's loop_forever
):
net-ssh-multi/lib/net/ssh/multi/session.rb
Line 435 in f4c787e
readers, writers, = IO.select(readers, writers, nil, wait) |
This happens when the readers and writers arrays are both empty.
Here are the syscalls being executed which clearly shows the issue:
[pid 25954] getpid() = 25954
[pid 25954] pselect6(1, [], [], NULL, {tv_sec=0, tv_nsec=0}, NULL) = 0 (Timeout)
[pid 25954] getpid() = 25954
[pid 25954] pselect6(1, [], [], NULL, {tv_sec=0, tv_nsec=0}, NULL) = 0 (Timeout)
[pid 25954] getpid() = 25954
[pid 25954] pselect6(1, [], [], NULL, {tv_sec=0, tv_nsec=0}, NULL) = 0 (Timeout)
I haven't dug into this enough to recommend a fix. Not sure if Chef is mis-using this library or if it's purely a library bug, but either way it seems the library shouldn't get into this state.
Metadata
Metadata
Assignees
Labels
No labels