[chrony-users] Linux time goes wrong after changing the time with 'date' cmd |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
- To: <chrony-users@xxxxxxxxxxxxxxxxxxxx>, Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Subject: [chrony-users] Linux time goes wrong after changing the time with 'date' cmd
- From: Feng Tang <feng.tang@xxxxxxxxx>
- Date: Fri, 10 May 2024 09:43:25 +0800
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WHECzwrD+2X/4uizBbDYJnDLl6PrP+v/g4d138YloXM=; b=oGZMwxF6elcR4NWwX4DMUAhCQuV2KM9JadRjZ6rk9KKa4nEUtXsnAQbyLzHh6ncAaXJvJJSyEW12zW5xKrxczVtndVfO7nmJWHzfaiWEzDx5BJNN3olm/6fttcsqLX++KwwWcdrN5dyAR/lRVeloTt0U+hwNqxopV2RQttjHlB34TB0HrEDpMXTdRi7yYDMonAr6+lLEKR3wamdqLaCaI5Zv7UmlBvMq4IUkChd7UMqQLuy2Z25VsHlRRgPYUdeSa6nhrUVnkk0ApoF4EZcoL6LgN+ntqBSlHj/kSsIvil9/skbrMn6inUpKXAfiMYrg+t8Vbib6HmI9EsusDxDENg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cJfF7FwjjnQstvMlDpeVQbWZUhZ21vcKcMs5/xQyMqD5DUzOlRBfVYiYxjIH3hjcTGTD1O4+wAXt52zCRnarro1R15SRNrhUMh7VTMV3YzovfyRujuN0T2fR5HV96OWc90iQdkCwehNQNf9qicb2xABpWjUD7HkMSgoKuHCVvjj2q8OfrGNdixYHgC5zPMB0k4s0u3WV7GeOe0opTh2kj/u/UY4BKRjZByYNgz+1db3aOaA9CFm0Kvo4AhhBzSXY1x1x277eJJCl+CHNHfSV/WFL66iDDbTPvs0I11bm1A86DnEBur2f2RbvIYxii0f86wY+MjRz8aUkCtmFmCkhxQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com;
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715306312; x=1746842312; h=date:from:to:subject:message-id:mime-version; bh=JXGQ2t53VnDMa2FpkkN2DJE4yT2Q5aotnn78Fe1OmoI=; b=Rt02/TPhXt5RCc5YEX0LCl3Jofsk4rXNQa94gGOAlZI+QQCWr7djO3T+ TJN6JIYDdYOZ/3+rT86QxNGD5TaOZLlfCnusuxkxg8CFECvkfrQ09QXsi xsV6ahg6cfoGe1eoB6oKipRekKQ9SweoPpi+fprlEgBO1FapJpormxg2z sWrlxRF6w8s/cOYBavK/O6Zn0kBvhc/SrwXcf89Jd6V68Dtc1Fi5EIluW i+ACiPUXwAa1V7O7dOcbZgsKLRKpNyL7Ew+Mp2Z1/FoQcaCfrGIwYYnYx SL9C68jOJcYp9COuzglKosHG8IomzBgL0EWDYmPzh+N66vNJmHNQQHTP5 g==;
We got a report that the Linux time system went weird after change time
backwards with command: " date --set '04/24 15:23:10 2024' ", after a
while (about 200 seconds), they saw strange 10% performance improvment
for some workload, and also if you run "sleep 60" command and it actually
will completed in about 54 seconds.
We tested on several HW platforms including desktop and servers, with
FC 40, Cent OS 9 etc, and different Linux kernel versions like 5.14 and
6.8, all can reproduce this.
After debugging, we found if we disable 'chronyd' service, then the
problem can't be reproduced.
Add debug hooks in kernel shows, after 'date' command changes system time,
around 150 seconds later, the chronyd process send 'clock_adjtime' syscalls
down to kernel with txc mode 'ADJ_TICK | ADJ_FREQUENCY', then the time
starts to go wrong.
I know very little about chrony, and don't know in the above case that
user set a big time jumping backwards, should we correct them with the
NTP time received from time server, as when user choses to enable
chrony it should trust and respect the time it provides?
Or any suggestion how to hanle this? I read the /etc/chorny.conf and
didn't find any option may help this. Many thanks!
- Feng
--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.