FS#46571 - [pssh] 2.3.1-6 fails with "ValueError: the fd 4 must be in non-blocking mode"

Attached to Project: Community Packages
Opened by gmtch (gmtch) - Monday, 05 October 2015, 20:32 GMT
Last edited by Jaroslav Lichtblau (Dragonlord) - Monday, 18 January 2016, 17:45 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jaroslav Lichtblau (Dragonlord)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 9
Private No

Details

Description:

pssh fails since upgrade from 2.3.1-5 to 2.3.1-6. I also python from 3.4.3-3 to 3.5.0-2 at the same time so that might be the cause.

It was running perfectly at the previous version.

This is the problem:

$ /usr/bin/pssh -H 127.0.0.1 df -h
Traceback (most recent call last):
File "/usr/bin/pssh", line 118, in <module>
do_pssh(hosts, cmdline, opts)
File "/usr/bin/pssh", line 71, in do_pssh
manager = Manager(opts)
File "/usr/lib/python3.5/site-packages/psshlib/manager.py", line 42, in __init__
self.iomap = IOMap()
File "/usr/lib/python3.5/site-packages/psshlib/manager.py", line 215, in __init__
signal.set_wakeup_fd(wakeup_writefd)
ValueError: the fd 4 must be in non-blocking mode

Please let me know if you need more info - this is my first Arch bug report.

This task depends upon

Closed by  Jaroslav Lichtblau (Dragonlord)
Monday, 18 January 2016, 17:45 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixing patch added in pssh 2.3.1-7
Comment by Tim Balzer (EagleNumberOne) - Tuesday, 06 October 2015, 07:08 GMT
I can reproduce this also. Downgrading to python 3.4.3-3 and pssh 2.3.1-5 solves the issue and upgrading reintroduces it again (see below), so the upgrade is most likely the cause.

$ pssh -iH localhost echo foo
[1] 09:04:21 [SUCCESS] localhost
foo
$ yaourt -Syu
... snip ...
==> Package upgrade only (new release):
community/pssh 2.3.1-5 5 -> 6

==> Software upgrade (new version) :
extra/python 3.4.3-3 -> 3.5.0-2
... snip ...
$ pssh -iH localhost echo foo
Traceback (most recent call last):
File "/usr/bin/pssh", line 118, in <module>
do_pssh(hosts, cmdline, opts)
File "/usr/bin/pssh", line 71, in do_pssh
manager = Manager(opts)
File "/usr/lib/python3.5/site-packages/psshlib/manager.py", line 42, in __init__
self.iomap = IOMap()
File "/usr/lib/python3.5/site-packages/psshlib/manager.py", line 215, in __init__
signal.set_wakeup_fd(wakeup_writefd)
ValueError: the fd 4 must be in non-blocking mode
Comment by Oleksandr Natalenko (post-factum) - Thursday, 08 October 2015, 07:00 GMT
Confirm as well:

===
[~]$ pssh --host=host-1 --host=host-2 foo bar
Traceback (most recent call last):
File "/usr/bin/pssh", line 118, in <module>
do_pssh(hosts, cmdline, opts)
File "/usr/bin/pssh", line 71, in do_pssh
manager = Manager(opts)
File "/usr/lib/python3.5/site-packages/psshlib/manager.py", line 42, in __init__
self.iomap = IOMap()
File "/usr/lib/python3.5/site-packages/psshlib/manager.py", line 215, in __init__
signal.set_wakeup_fd(wakeup_writefd)
ValueError: the fd 4 must be in non-blocking mode
===
Comment by Boris Momčilović (User) - Friday, 09 October 2015, 16:07 GMT
I can reproduce as well:

➜ ~ pssh -iH localhost echo foo
Traceback (most recent call last):
File "/usr/bin/pssh", line 118, in <module>
do_pssh(hosts, cmdline, opts)
File "/usr/bin/pssh", line 71, in do_pssh
manager = Manager(opts)
File "/usr/lib/python3.5/site-packages/psshlib/manager.py", line 42, in __init__
self.iomap = IOMap()
File "/usr/lib/python3.5/site-packages/psshlib/manager.py", line 215, in __init__
signal.set_wakeup_fd(wakeup_writefd)
ValueError: the fd 4 must be in non-blocking mode
Comment by Sakis Hrist (sakishrist) - Tuesday, 13 October 2015, 10:39 GMT
Downgrading to those packages really solves the issue with pssh but breaks libreoffice.

Otherwise, same issue here.
Comment by Nicolas PLANEL (nplanel) - Thursday, 22 October 2015, 14:09 GMT
a quick fix/workaround :

o add import fcntl on the top file
o add this line here /usr/lib/python3.5/site-packages/psshlib/manager.py:213
fcntl.fcntl(wakeup_writefd, fcntl.F_SETFL, os.O_NONBLOCK)

the package should follow a github repo as code.google.com is closed from a while.

My cloned fixed version as I didn't found any maintener : https://github.com/nplanel/parallel-ssh
Comment by gmtch (gmtch) - Friday, 23 October 2015, 14:36 GMT
I confirm that the fix from Nicolas PLANEL works.

Thanks
Comment by Arvid Warnecke (nostalgix) - Tuesday, 10 November 2015, 06:22 GMT
A permanent fix would be nice. Right now I switch back and forth between python 3.4 and 3.5 depending on what I need to do.
Comment by Nicolas PLANEL (nplanel) - Tuesday, 10 November 2015, 06:49 GMT
Up to Jaroslav Lichtblau (Dragonlord) to respond and make a new package ... my comment is 3 weeks old already
Comment by Michael Wallner (mike) - Wednesday, 23 December 2015, 08:00 GMT
I can also confirm that the fix [1] works.

[1] https://bugs.archlinux.org/task/46571#comment140319
Comment by Jaroslav Lichtblau (Dragonlord) - Sunday, 17 January 2016, 11:14 GMT
Fixing patch added in pssh 2.3.1-7

Loading...