uninterruptible sleep with rsync 2.5.4

Dave Dykstra dwd at bell-labs.com
Thu Jun 13 10:42:52 EST 2002


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




More information about the rsync mailing list