samba-bugs at samba.org
2013-Apr-12 15:16 UTC
[Bug 9789] New: rsync hangs when NTP update system clock time
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.
samba-bugs at samba.org
2013-Apr-17 12:02 UTC
[Bug 9789] rsync hangs when NTP update system clock time
https://bugzilla.samba.org/show_bug.cgi?id=9789 --- Comment #1 from Abhinav <abhinav0487 at gmail.com> 2013-04-17 12:02:22 UTC --- Looks like nobody is taking care of this bugzilla still got no response even after so many days of posting the comment Too bad... -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
samba-bugs at samba.org
2013-May-19 22:55 UTC
[Bug 9789] rsync hangs when NTP update system clock time
https://bugzilla.samba.org/show_bug.cgi?id=9789
Wayne Davison <wayned at samba.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Wayne Davison <wayned at samba.org> 2013-05-19
22:55:05 UTC ---
I'm checking in a change to the msleep() function that will ensure that a
backward movement in time doesn't generate a huge sleep. These 2 new lines
are
being added after the call to gettimeofday(&t2, NULL):
+ if (t2.tv_sec < t1.tv_sec)
+ t1 = t2; /* Time went backwards, so start over. */
This fix will be released in 3.1.0.
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.