[Cyberduck-trac] [Cyberduck] #10604: Running program takes minutes to execute
Cyberduck
trac at cyberduck.io
Wed Mar 27 23:57:52 UTC 2019
#10604: Running program takes minutes to execute
--------------------+----------------------
Reporter: jkvbe | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: cli | Version: 6.9.2
Severity: normal | Resolution:
Keywords: | Architecture:
Platform: |
--------------------+----------------------
Comment (by frwessling):
Hey, we ran into this today and it appears as though the issues is with
the use of /dev/random in certain calls that are being made.
If the system in use is low on entropy then /dev/random will block until
there are enough bits to satisfy whatever request is being made.
*How to test*
# On a system w/low entropy (Linux VMs that don't see a lot of CPU I/O are
good candidates):
In one terminal or screen session run " time duck -h"
# In another run:
"lsof |grep duck|grep random"
You will see calls to both /dev/urandom and /dev/random
Now on that same system (as root) do the following:
(if necessary "ctrl-c" your previously running duck session)
"mv /dev/random /dev/random.orig"
"cp -a /dev/urandom /dev/random"
Once you've replaced /dev/random with /dev/urandom run:
"time duck -h"
It should return a *whole* lot quicker.
In our case it went from 11m to 8s.
Don't forget to put your system back the way it was:
"rm -f /dev/random"
"mv /dev/random.orig /dev/random"
You can tell how much entropy is available (in bits) for /dev/random by:
"cat /proc/sys/kernel/random/entropy_avail"
In our test case where "duck -h" took 11m to run, we had about 118 bits of
available entropy.
*Some Suggestions for the devs:*
# Only be use /dev/random (or libraries that invoke it) if absolutely
necessary; otherwise use /dev/urandom
# Provide a run-time option that would allow the user to choose the use
/dev/urandom exclusively
--
Ticket URL: <https://trac.cyberduck.io/ticket/10604#comment:6>
Cyberduck <https://cyberduck.io>
Libre FTP, SFTP, WebDAV, S3 & OpenStack Swift browser for Mac and Windows
More information about the Cyberduck-trac
mailing list