RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1787376 - Wrong sample timestamps in system->PHC synchronization
Summary: Wrong sample timestamps in system->PHC synchronization
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: linuxptp
Version: 8.1
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: rc
: 8.0
Assignee: Miroslav Lichvar
QA Contact: Yalin.Li
URL:
Whiteboard:
Depends On:
Blocks: 1810050 1817044 1825061
TreeView+ depends on / blocked
 
Reported: 2020-01-02 15:45 UTC by Miroslav Lichvar
Modified: 2020-11-04 02:45 UTC (History)
1 user (show)

Fixed In Version: linuxptp-2.0-5.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 02:45:41 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4661 0 None None None 2020-11-04 02:45:46 UTC

Description Miroslav Lichvar 2020-01-02 15:45:07 UTC
Description of problem:
When phc2sys is configured to synchronize a hardware clock (PHC) to the system clock, the sample timestamps have an error which may cause the estimated frequency offset to have an error and instability of the clock servo.

Upstream fix:
https://github.com/richardcochran/linuxptp/commit/e0580929f451e685d92cd10d80b76f39e9b09a97

Version-Release number of selected component (if applicable):
linuxptp-2.0-4.el8.x86_64

How reproducible:
always

Steps to Reproduce:
1. phc_ctl eth0 freq -- -10000000
2. phc2sys -c eth0 -s CLOCK_REALTIME -m -O 0 
3. observe the frequency and how long it takes to settle down

Actual results:
phc2sys[10767.272]: eth0 sys offset 3637567363725 s0 freq +10000000 delay   1066
phc2sys[10768.272]: eth0 sys offset 3637557405121 s1 freq +239728 delay   1067
phc2sys[10769.272]: eth0 sys offset   -196400 s2 freq  +43328 delay   1066
phc2sys[10770.272]: eth0 sys offset   -196316 s2 freq  -15508 delay   1069
phc2sys[10771.273]: eth0 sys offset   -137395 s2 freq  -15482 delay   1066
phc2sys[10772.273]: eth0 sys offset    -78487 s2 freq   +2208 delay   1060
phc2sys[10773.273]: eth0 sys offset    -37283 s2 freq  +19866 delay   1065
phc2sys[10774.273]: eth0 sys offset    -13726 s2 freq  +32238 delay   1065
phc2sys[10775.273]: eth0 sys offset     -2558 s2 freq  +39288 delay   1062
phc2sys[10776.273]: eth0 sys offset      1563 s2 freq  +42641 delay   1066
phc2sys[10777.273]: eth0 sys offset      2353 s2 freq  +43900 delay   1067
phc2sys[10778.273]: eth0 sys offset      1864 s2 freq  +44117 delay   1070
phc2sys[10779.273]: eth0 sys offset      1151 s2 freq  +43963 delay   1060
phc2sys[10780.274]: eth0 sys offset       602 s2 freq  +43760 delay   1062
phc2sys[10781.274]: eth0 sys offset       273 s2 freq  +43611 delay   1074
phc2sys[10782.274]: eth0 sys offset        64 s2 freq  +43484 delay   1062
phc2sys[10783.274]: eth0 sys offset         4 s2 freq  +43443 delay   1069
phc2sys[10784.274]: eth0 sys offset       -30 s2 freq  +43411 delay   1065

Expected results:
phc2sys[10795.796]: eth0 sys offset -28363696 s0 freq +10000000 delay   1061
phc2sys[10796.796]: eth0 sys offset -38322352 s1 freq  +43407 delay   1065
phc2sys[10797.796]: eth0 sys offset       -47 s2 freq  +43360 delay   1080
phc2sys[10798.796]: eth0 sys offset        -6 s2 freq  +43387 delay   1060
phc2sys[10799.796]: eth0 sys offset        12 s2 freq  +43403 delay   1067
phc2sys[10800.796]: eth0 sys offset        14 s2 freq  +43409 delay   1066
phc2sys[10801.796]: eth0 sys offset        25 s2 freq  +43424 delay   1062
phc2sys[10802.796]: eth0 sys offset         5 s2 freq  +43411 delay   1068

Additional info:
This bug was introduced in the code added for bug #1677217.

Comment 1 Miroslav Lichvar 2020-01-02 16:49:18 UTC
An analysis shows that in the default configuration most impacted could be PHCs with maximum frequency offset (as reported by phc_ctl caps) of about 20% or more, where phc2sys can get stuck not updating the clock due to the clock check. A workaround is to increase or disable the frequency limit of the clock check (-L option).

Comment 6 Yalin.Li 2020-07-23 04:07:16 UTC
Verified on linuxptp-2.0-5.el8:
[root@dell-per740-46 ~]# rpm -q linuxptp
linuxptp-2.0-5.el8.x86_64
[root@dell-per740-46 ~]#
[root@dell-per740-46 ~]# phc_ctl ens1f0 freq -- -10000000
phc_ctl[1106.062]: adjusted clock frequency offset to -10000000.000000ppb
[root@dell-per740-46 ~]# phc2sys -c ens1f0 -s CLOCK_REALTIME -m -O 0
phc2sys[1129.270]: ens1f0 sys offset -569476179 s0 freq +10000000 delay   1564
phc2sys[1130.271]: ens1f0 sys offset -579518569 s1 freq  -38812 delay   1543
phc2sys[1131.271]: ens1f0 sys offset       -62 s2 freq  -38874 delay   1563
phc2sys[1132.271]: ens1f0 sys offset       -21 s2 freq  -38852 delay   1554
phc2sys[1133.271]: ens1f0 sys offset        10 s2 freq  -38827 delay   1554
phc2sys[1134.271]: ens1f0 sys offset         3 s2 freq  -38831 delay   1559
phc2sys[1135.272]: ens1f0 sys offset        22 s2 freq  -38811 delay   1542
phc2sys[1136.272]: ens1f0 sys offset        12 s2 freq  -38815 delay   1548
phc2sys[1137.272]: ens1f0 sys offset        16 s2 freq  -38807 delay   1562
phc2sys[1138.272]: ens1f0 sys offset         3 s2 freq  -38815 delay   1564
phc2sys[1139.273]: ens1f0 sys offset        -9 s2 freq  -38826 delay   1553
phc2sys[1140.273]: ens1f0 sys offset      -439 s2 freq  -39259 delay   1545
phc2sys[1141.273]: ens1f0 sys offset      -986 s2 freq  -39938 delay   1562
phc2sys[1142.273]: ens1f0 sys offset      -839 s2 freq  -40087 delay   1543
phc2sys[1143.273]: ens1f0 sys offset      -554 s2 freq  -40053 delay   1545
phc2sys[1144.274]: ens1f0 sys offset      -300 s2 freq  -39965 delay   1548
phc2sys[1145.274]: ens1f0 sys offset      -138 s2 freq  -39893 delay   1543
phc2sys[1146.274]: ens1f0 sys offset       -31 s2 freq  -39828 delay   1550
phc2sys[1147.274]: ens1f0 sys offset       -17 s2 freq  -39823 delay   1546
phc2sys[1148.274]: ens1f0 sys offset         4 s2 freq  -39807 delay   1550
phc2sys[1149.275]: ens1f0 sys offset        17 s2 freq  -39793 delay   1553
phc2sys[1150.275]: ens1f0 sys offset         4 s2 freq  -39801 delay   1550
^Cphc2sys[1150.643]: ens1f0 sys offset        22 s2 freq  -39782 delay   1569
[root@dell-per740-46 ~]# 
 
reproduced on linuxptp-2.0-4.el8.x86_64
[root@dell-per740-46 ~]# phc_ctl ens1f0 freq -- -10000000
phc_ctl[2049.406]: adjusted clock frequency offset to -10000000.000000ppb
[root@dell-per740-46 ~]# phc2sys -c ens1f0 -s CLOCK_REALTIME -m -O 0
phc2sys[2067.684]: ens1f0 sys offset -358656179 s0 freq +10000000 delay   1567
phc2sys[2068.684]: ens1f0 sys offset -368700140 s1 freq +159375 delay   1570
phc2sys[2069.685]: ens1f0 sys offset   -199825 s2 freq  -40450 delay   1578
phc2sys[2070.685]: ens1f0 sys offset   -199650 s2 freq -100223 delay   1582
phc2sys[2071.685]: ens1f0 sys offset   -139679 s2 freq -100147 delay   1578
phc2sys[2072.685]: ens1f0 sys offset    -79789 s2 freq  -82161 delay   1585
phc2sys[2073.686]: ens1f0 sys offset    -37874 s2 freq  -64182 delay   1577
phc2sys[2074.686]: ens1f0 sys offset    -13955 s2 freq  -51625 delay   1573
phc2sys[2075.686]: ens1f0 sys offset     -2589 s2 freq  -44446 delay   1570
phc2sys[2076.686]: ens1f0 sys offset      1586 s2 freq  -41048 delay   1563
phc2sys[2077.687]: ens1f0 sys offset      2364 s2 freq  -39794 delay   1576
phc2sys[2078.687]: ens1f0 sys offset      1902 s2 freq  -39547 delay   1573
phc2sys[2079.687]: ens1f0 sys offset      1196 s2 freq  -39682 delay   1578
phc2sys[2080.687]: ens1f0 sys offset       596 s2 freq  -39923 delay   1577
phc2sys[2081.688]: ens1f0 sys offset       262 s2 freq  -40078 delay   1572
phc2sys[2082.688]: ens1f0 sys offset        71 s2 freq  -40191 delay   1582
phc2sys[2083.688]: ens1f0 sys offset       -16 s2 freq  -40257 delay   1570
phc2sys[2084.688]: ens1f0 sys offset       -13 s2 freq  -40258 delay   1564
phc2sys[2085.689]: ens1f0 sys offset       -33 s2 freq  -40282 delay   1582
phc2sys[2086.689]: ens1f0 sys offset        -1 s2 freq  -40260 delay   1573
phc2sys[2087.689]: ens1f0 sys offset        -8 s2 freq  -40267 delay   1586
phc2sys[2088.689]: ens1f0 sys offset         0 s2 freq  -40262 delay   1565
phc2sys[2089.690]: ens1f0 sys offset         0 s2 freq  -40262 delay   1573
phc2sys[2090.690]: ens1f0 sys offset        -9 s2 freq  -40271 delay   1574
phc2sys[2091.690]: ens1f0 sys offset        14 s2 freq  -40251 delay   1573
phc2sys[2092.690]: ens1f0 sys offset         5 s2 freq  -40255 delay   1571
phc2sys[2093.691]: ens1f0 sys offset        -1 s2 freq  -40260 delay   1569
^Cphc2sys[2093.979]: ens1f0 sys offset        15 s2 freq  -40244 delay   1651
[root@dell-per740-46 ~]# rpm -q linuxptp
linuxptp-2.0-4.el8.x86_64
[root@dell-per740-46 ~]#

Comment 10 errata-xmlrpc 2020-11-04 02:45:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (linuxptp bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4661


Note You need to log in before you can comment on or make changes to this bug.