[Bug 9789] New: rsync hangs when NTP update system clock time

samba-bugs at samba.org samba-bugs at samba.org
Fri Apr 12 09:16:07 MDT 2013


https://bugzilla.samba.org/show_bug.cgi?id=9789

           Summary: rsync hangs when NTP update system clock time
           Product: rsync
           Version: 2.6.2
          Platform: PPC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: core
        AssignedTo: wayned at samba.org
        ReportedBy: abhinav0487 at gmail.com
         QAContact: rsync-qa at samba.org


Hi,

There is a periodic rsync which runs in my system every 1 min. When system is
coming up, NTP update the time and if at the same moment this periodic rsync
executes, then it gets hanged. Following was the output after running strace on
rsync:
select(0,NULL,NULL,NULL,{~550hrs})

After going through the code of rsync it looks like there is problem in msleep
function. It uses gettimeofday linux API. If system clock time changes between
two successive calls to this function then the time difference will be a very
large value which is getting assigned to a 32bit signed integer variable tdiff.
Since that time difference is larger than 2^31, tdiff finally gets a large
negative number.
this number is passed as positive value in the select call used for sleeping.
Thus ultimately leading to rsync hang for a very large amount of time.
In my case it hanged for 550hrs. I tried to assigned NTP time reset value in ms
to a 32-bit signed int variable, and it is coming around 550hrs. 
I just wanted to know has this issue been fix in higher versions or not, and if
fixed, then which version.

Many thanks in advance.
Abhinav

-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the rsync mailing list