Hi, I've encountered a strange issue, difficult to reproduce for now. I'm searching from where it comes. Here are some facts: - all programs are compiled from sources using gcc 2.95.3/glibc2.2.x and run on a i686 LFS linux system. - rsync doesn't run above ssl. - using rsync 2.5.4 as server to backup mailboxes on another computer. rsync daemon is launched from xinetd, rsync client from a cron job. - beside this rsync server, i've got a pop3 daemon that access these mailboxes. - when mailbox is opened by pop3 and rsync daemons, both processes ends in uninterruptible sleep. - When a new rsync client request arrives, another rsync daemon is launched and goes in uninterruptible sleep too -> reboot is required. - mailbox is locked by pop3 using fcntl() and F_RDLCK mode. - pop3 server writes modified mailbox to a temporary file then rename() it to mailbox name. What's the behavior of rsync when a file is renamed while it reads it ? What's the behavior of rsync when a file is removed while it reads it ? What's the behavior of rsync when a file is modified while it reads it ? I didn't try with latest rsync version yet and still have difficulties to reproduce this issue but i would like to have your opinion about that. -- Laurent MONIN Syst?mes & R?seaux Metaconcept Sarl http://www.metaconcept.com
On Wed, Jun 12, 2002 at 05:41:41PM +0200, Laurent MONIN wrote:> Hi, > > I've encountered a strange issue, difficult to reproduce for > now. I'm searching from where it comes. > > Here are some facts: > - all programs are compiled from sources using gcc 2.95.3/glibc2.2.x > and run on a i686 LFS linux system.By LFS do you mean "Linux From Scratch"?> - rsync doesn't run above ssl. > - using rsync 2.5.4 as server to backup mailboxes on another computer. > rsync daemon is launched from xinetd, rsync client from a cron job. > - beside this rsync server, i've got a pop3 daemon that access these > mailboxes. > - when mailbox is opened by pop3 and rsync daemons, both processes ends > in uninterruptible sleep. > - When a new rsync client request arrives, another rsync daemon is > launched and goes in uninterruptible sleep too -> reboot is required. > - mailbox is locked by pop3 using fcntl() and F_RDLCK mode. > - pop3 server writes modified mailbox to a temporary file then rename() > it to mailbox name. > > What's the behavior of rsync when a file is renamed while it reads it ?It shouldn't notice, assuming you're on a local filesystem and not an NFS filesystem, because the system should keep the inode open until rsync closes it.> What's the behavior of rsync when a file is removed while it reads it ?Same as the rename.> What's the behavior of rsync when a file is modified while it reads it ?Depending on the modification, it will either not notice, generate an error, or copy inconsistent data.> I didn't try with latest rsync version yet and still have difficulties > to reproduce this issue but i would like to have your opinion about > that.- Dave Dykstra
On Thu, Jun 13, 2002 at 08:08:18PM +0200, Laurent MONIN wrote: ..> rsync doesn't use any lock system on files it reads, right ?Right.> I tried to reproduce that issue using rsync-2.5.4/rsync-2.5.5 on another > system without success for now. I'm still searching in which precise > conditions this issue is created. > > Do you know any case in which rsync may be caught on uninterruptible sleep ?No, sorry. - Dave