我在远程 Ubuntu 14.04.3 LTS(Trusty Tahir)实例上使用 Rsync 时遇到了奇怪的情况。
每当我执行它时,它都会运行一段时间(未完成),然后似乎会自动终止。之后它就坏了(不再有二进制文件/usr/bin/rsync
),清除并重新安装后,同样的行为又会发生。
rsync --delay-updates -F --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no' '--out-format=<<CHANGED>>%i %n%L' /tmp/production/tmp.CKlHWYgC6c/core/ /home/ubuntu/production/versions/build/prod-service_1.10.0_TEST/core/
<<CHANGED>>.d..t...... ./
<<CHANGED>>>f+++++++++ HOWTO.txt
<<CHANGED>>>f+++++++++ __init__.py
<<CHANGED>>>f+++++++++ app_store_customized.py
<<CHANGED>>>f+++++++++ av_appstore_package.py
<<CHANGED>>>f+++++++++ av_archive_file_handler.py
<<CHANGED>>>f+++++++++ av_build_relations.py
<<CHANGED>>>f+++++++++ av_build_ui_conditions.py
<<CHANGED>>>f+++++++++ av_cach.py
<<CHANGED>>>f+++++++++ av_countdown_caller.py
<<CHANGED>>>f+++++++++ av_glogin_dbsync.py
<<CHANGED>>>f+++++++++ av_local_module.py
<<CHANGED>>>f+++++++++ av_logger.py
...
...
<<CHANGED>>>f+++++++++ modules/av_cyren/avsdk/aivsecon-v2.def
<<CHANGED>>>f+++++++++ modules/av_cyren/avsdk/antivir-v2.def
<<CHANGED>>>f+++++++++ modules/av_cyren/avsdk/csamd
<<CHANGED>>>f+++++++++ modules/av_cyren/avsdk/csamd.conf
<<CHANGED>>>f+++++++++ modules/av_cyren/avsdk/libaivse000.so.5
Killed
ubuntu@ansible-tower-server:~$ rsync
-bash: /usr/bin/rsync: No such file or directory
ubuntu@ansible-tower-server:~$ sudo apt-get remove --purge rsync && sudo apt-get install rsync
...
然后尝试重新运行 rsync,它再次被自动终止。
这是最近才发生的,之前运行正常。有什么想法吗?
更新1: rsync 版本
rsync version 3.1.0 protocol version 31
Copyright (C) 1996-2013 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, xattrs, iconv, symtimes, prealloc
在 rsync 运行期间(请注意,我还没有为该实例分配交换)
ubuntu@ansible-tower-server:~$ free -m
total used free shared buffers cached
Mem: 7513 6467 1046 20 558 3909
-/+ buffers/cache: 1999 5514
Swap: 0 0 0
更新 2
我增加了内存和交换,似乎不是内存的问题
total used free shared buffers cached
Mem: 15042 3043 11998 19 326 1225
-/+ buffers/cache: 1492 13550
Swap: 7337 0 7337
使用 -vvvv 重新运行
这里是它被杀死的地方(并且丢失了二进制文件)
<<CHANGED>>>f+++++++++ modules/ap_cyren/ctasd/ctasd_initd
sending file_sum
false_alarms=0 hash_hits=0 matches=0
sender finished /tmp/avanan/tmp.fzMHAGBzXU/core/modules/ap_cyren/ctasd/ctasd_initd
send_files(474, /tmp/avanan/tmp.fzMHAGBzXU/core/modules/ap_cyren/ctasd/libaivse000.so)
count=0 n=0 rem=0
send_files mapped /tmp/avanan/tmp.fzMHAGBzXU/core/modules/ap_cyren/ctasd/libaivse000.so of size 2080872
calling match_sums /tmp/avanan/tmp.fzMHAGBzXU/core/modules/ap_cyren/ctasd/libaivse000.so
<<CHANGED>>>f+++++++++ modules/ap_cyren/ctasd/libaivse000.so
rsync: [receiver] write error: Broken pipe (32)
[receiver] _exit_cleanup(code=10, file=io.c, line=837): entered
Killed
renaming modules/ap_cyren/ctasd/.libaivse000.so.9Ar2ch to modules/ap_cyren/ctasd/.~tmp~/libaivse000.so
ubuntu@ansible-tower-server:~$ rsync error: error in socket IO (code 10) at io.c(837) [receiver=3.1.0]
[receiver] _exit_cleanup(code=10, file=io.c, line=837): about to call exit(10)
我尝试在机器上对 2 个较简单的目录(文件较少)进行 rsync,它工作正常。但仅对上述 rsync(从包含 2000 多个文件(包括文本、二进制文件)的目录)进行 rsync,它失败了(此外,它自身崩溃了)