在我运行ansible --version
的一台服务器上,有时它会永久挂起(或至少10到20秒)。
我试图以strace ansible --version
的身份运行它,这就是它卡住的地方。
open("/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/_conditionalmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/_conditional.py", O_RDONLY) = 14
fstat(14, {st_mode=S_IFREG|0644, st_size=10899, ...}) = 0
open("/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/_conditional.pyc", O_RDONLY) = 15
fstat(15, {st_mode=S_IFREG|0644, st_size=15240, ...}) = 0
read(15, "\3\363\r\n\16\304\262\\c\0\0\0\0\0\0\0\0\3\0\0\0@`\1\0s\306\2\0\0d\0"..., 4096) = 4096
fstat(15, {st_mode=S_IFREG|0644, st_size=15240, ...}) = 0
read(15, "_LOSt\32\0\0\0X509_V_FLAG_SUITEB_128_"..., 8192) = 8192
read(15, "yt\33\0\0\0EVP_PKEY_get_raw_public_ke"..., 4096) = 2952
read(15, "", 4096) = 0
close(15) = 0
close(14) = 0
futex(0x7f7f6bb7ce24, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f7f6bb7ce04, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f7f6bb7cdf4, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f7f6bb7cf14, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f7f6bb7cdc4, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f7f6bb7cdb4, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f7f6bb7b274, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f7f6bb7cc44, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f7f6bb7cc24, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f7f6bb7cc18, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f7f6bb7cde4, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f7f6bb7cd54, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f7f6bb7cd44, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f7f6bb7cd34, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getuid() = 1001
geteuid() = 1001
getgid() = 1002
getegid() = 1002
open("/opt/pyca/cryptography/openssl/openssl.cnf", O_RDONLY) = -1 ENOENT (No such file or directory)
futex(0x7f7f6bb7cdac, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f7f6bb7b0e8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f7f6bb7b0d4, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getuid() = 1001
geteuid() = 1001
getgid() = 1002
getegid() = 1002
open("/opt/pyca/cryptography/openssl/lib/engines-1.1/osrandom.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
close(13) = 0
stat("/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/primitives/kdf/scrypt", 0x7ffdd38d88e0) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/primitives/kdf/scrypt.x86_64-linux-gnu.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/primitives/kdf/scrypt.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/primitives/kdf/scryptmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/primitives/kdf/scrypt.py", O_RDONLY) = 13
fstat(13, {st_mode=S_IFREG|0644, st_size=2155, ...}) = 0
open("/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/primitives/kdf/scrypt.pyc", O_RDONLY) = 14
fstat(14, {st_mode=S_IFREG|0644, st_size=2743, ...}) = 0
read(14, "\3\363\r\n\16\304\262\\c\0\0\0\0\0\0\0\0\4\0\0\0@`\1\0s\300\0\0\0d\0"..., 4096) = 2743
fstat(14, {st_mode=S_IFREG|0644, st_size=2743, ...}) = 0
read(14, "", 4096) = 0
close(14) = 0
close(13) = 0
open("/dev/random", O_RDONLY) = 13
fcntl(13, F_GETFD) = 0
fcntl(13, F_SETFD, FD_CLOEXEC) = 0
poll([{fd=13, events=POLLIN}], 1, -1
在其他时间,它成功运行(在同一盒子上,同一用户),打印以下内容:
ansible 2.6.4
config file = None
configured module search path = [u'/home/gabor/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.12 (default, Nov 12 2018, 14:36:49) [GCC 5.4.0 20160609]
知道发生了什么事以及如何避免它吗?