Open watson6282 opened 5 months ago
The 2*fanout
estimate possibly only applies to the rcmd
implementation and not exec
(it could be 4*fanout here because there's potentially a socketpair(2)
call for both stdin/out and stderr). Perhaps all that is required here is to increase the multiplier to 4 (and fix the segfault of course).
The current maximum number of open files (RLIMIT_NOFILE) is not being set high enough. In some cases, certain combinations of the fanout and the current open file limit leads to pdsh dumping core after reaching its maximum number of open files. This code:
does end up setting enough file descriptors in a case like this (ssh rcmd, 1024 max files, 300 fanout):