Hello,
I got an issue with rsync and (fcntl) locked files.
When rsync tries to sync a file that is opened and locked by another
process (that use fcntl write lock), it ends up in Disk Sleep.
Then i need to reboot to remove that dead processes (let me now if
there's another solution).
Is there a way to force rsync to skip locked files ?
Here are some facts:
Hosts on which this issue has been verified:
i686 linux kernel 2.2.14 -> 2.2.22
glibc 2.1.3 -> 2.2.5
root> rsync --version
rsync version 2.5.5 protocol version 26
Copyright (C) 1996-2002 by Andrew Tridgell and others
<http://rsync.samba.org/>
Capabilities: 64-bit files, socketpairs, hard links, symlinks, batchfiles,
IPv6, 64-bit system inums, 64-bit internal inums
...
root> cat /proc/locks
1: POSIX ADVISORY WRITE 2191 09:05:31491 4 7 c5589040 00000000 c105e000
00000000 00000000
2: POSIX ADVISORY WRITE 10932 09:05:31491 0 3 c105e000 c5589040 c11ed400
c5589040 00000000
....
root> ps aux
....
root 10932 0.0 1.6 3068 2080 ? D Nov07 0:17 rsync --daemon
root 2191 0.0 0.8 2076 1052 ? D 03:45 0:00 rsync --daemon
....
root> ls -l /proc/2191/*
-r--r--r-- 1 root root 0 Nov 8 10:09 /proc/2191/cmdline
lrwx------ 1 root root 0 Nov 8 10:09 /proc/2191/cwd ->
/home/mail/virtual
-r-------- 1 root root 0 Nov 8 10:09 /proc/2191/environ
lrwx------ 1 root root 0 Nov 8 10:09 /proc/2191/exe ->
/usr/bin/rsync
pr--r--r-- 1 root root 0 Nov 8 10:09 /proc/2191/maps
-rw------- 1 root root 0 Nov 8 10:09 /proc/2191/mem
lrwx------ 1 root root 0 Nov 8 10:09 /proc/2191/root -> /
-r--r--r-- 1 root root 0 Nov 8 10:09 /proc/2191/stat
-r--r--r-- 1 root root 0 Nov 8 10:09 /proc/2191/statm
-r--r--r-- 1 root root 0 Nov 8 10:09 /proc/2191/status
/proc/2191/fd:
total 0
lrwx------ 1 root root 64 Nov 8 10:09 0 -> socket:[6186417]
lrwx------ 1 root root 64 Nov 8 10:09 1 -> /dev/null
lrwx------ 1 root root 64 Nov 8 10:09 10 -> socket:[2966778]
lrwx------ 1 root root 64 Nov 8 10:09 11 -> socket:[2966779]
lrwx------ 1 root root 64 Nov 8 10:09 12 -> socket:[2966780]
lrwx------ 1 root root 64 Nov 8 10:09 13 -> socket:[2966781]
lrwx------ 1 root root 64 Nov 8 10:09 14 -> socket:[2966782]
lrwx------ 1 root root 64 Nov 8 10:09 15 -> socket:[2966783]
lrwx------ 1 root root 64 Nov 8 10:09 16 -> socket:[4095463]
lrwx------ 1 root root 64 Nov 8 10:09 17 -> socket:[4095464]
lrwx------ 1 root root 64 Nov 8 10:09 18 -> socket:[4095465]
lrwx------ 1 root root 64 Nov 8 10:09 19 -> socket:[4095466]
lrwx------ 1 root root 64 Nov 8 10:09 2 -> /dev/null
lrwx------ 1 root root 64 Nov 8 10:09 20 -> socket:[4095467]
lrwx------ 1 root root 64 Nov 8 10:09 21 -> socket:[4095468]
lrwx------ 1 root root 64 Nov 8 10:09 22 -> socket:[4095469]
lrwx------ 1 root root 64 Nov 8 10:09 3 ->
/var/run/rsyncd.lock
lrwx------ 1 root root 64 Nov 8 10:09 4 -> socket:[6186425]
lr-x------ 1 root root 64 Nov 8 10:09 5 ->
/home/mail/virtual
lr-x------ 1 root root 64 Nov 8 10:09 6 ->
/home/mail/virtual/norz.org
lr-x------ 1 root root 64 Nov 8 10:09 7 ->
/home/mail/virtual/norz.org/mbox
lrwx------ 1 root root 64 Nov 8 10:09 9 -> socket:[2966777]
root> ls -l /proc/10932/*
-r--r--r-- 1 root root 0 Nov 8 10:10 /proc/10932/cmdline
lrwx------ 1 root root 0 Nov 8 10:10 /proc/10932/cwd ->
/home/mail/virtual
-r-------- 1 root root 0 Nov 8 10:10 /proc/10932/environ
lrwx------ 1 root root 0 Nov 8 10:10 /proc/10932/exe ->
/usr/bin/rsync
pr--r--r-- 1 root root 0 Nov 8 10:10 /proc/10932/maps
-rw------- 1 root root 0 Nov 8 10:10 /proc/10932/mem
lrwx------ 1 root root 0 Nov 8 10:10 /proc/10932/root -> /
-r--r--r-- 1 root root 0 Nov 8 10:10 /proc/10932/stat
-r--r--r-- 1 root root 0 Nov 8 10:10 /proc/10932/statm
-r--r--r-- 1 root root 0 Nov 8 10:10 /proc/10932/status
/proc/10932/fd:
total 0
lrwx------ 1 root root 64 Nov 8 10:10 0 -> socket:[6092850]
lrwx------ 1 root root 64 Nov 8 10:10 1 -> /dev/null
lrwx------ 1 root root 64 Nov 8 10:10 10 -> socket:[2966778]
lrwx------ 1 root root 64 Nov 8 10:10 11 -> socket:[2966779]
lrwx------ 1 root root 64 Nov 8 10:10 12 -> socket:[2966780]
lrwx------ 1 root root 64 Nov 8 10:10 13 -> socket:[2966781]
lrwx------ 1 root root 64 Nov 8 10:10 14 -> socket:[2966782]
lrwx------ 1 root root 64 Nov 8 10:10 15 -> socket:[2966783]
lrwx------ 1 root root 64 Nov 8 10:10 16 -> socket:[4095463]
lrwx------ 1 root root 64 Nov 8 10:10 17 -> socket:[4095464]
lrwx------ 1 root root 64 Nov 8 10:10 18 -> socket:[4095465]
lrwx------ 1 root root 64 Nov 8 10:10 19 -> socket:[4095466]
lrwx------ 1 root root 64 Nov 8 10:10 2 -> /dev/null
lrwx------ 1 root root 64 Nov 8 10:10 20 -> socket:[4095467]
lrwx------ 1 root root 64 Nov 8 10:10 21 -> socket:[4095468]
lrwx------ 1 root root 64 Nov 8 10:10 22 -> socket:[4095469]
lrwx------ 1 root root 64 Nov 8 10:10 3 ->
/var/run/rsyncd.lock
lrwx------ 1 root root 64 Nov 8 10:10 4 -> socket:[6092858]
lr-x------ 1 root root 64 Nov 8 10:10 5 ->
/home/mail/virtual/norz.org/mbox
lrwx------ 1 root root 64 Nov 8 10:10 9 -> socket:[2966777]
Thanks for any help and for rsync ;)
--
Zas