Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2079129

Summary: Reading of PHC fails and phc2sys exits
Product: Red Hat Enterprise Linux 8 Reporter: Alexandre Maumené <amaumene>
Component: linuxptpAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED ERRATA QA Contact: Yalin.Li <yalli>
Severity: medium Docs Contact:
Priority: urgent    
Version: 8.4CC: dcain, fkrska, kzhang, mlichvar, pvaanane
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: linuxptp-3.1.1-3.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2123277 2123278 (view as bug list) Environment:
Last Closed: 2022-11-08 09:49:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2123277, 2123278    

Description Alexandre Maumené 2022-04-27 03:37:17 UTC
Description of problem:
Reading of PHC sometimes fails with ice driver and phc2sys exit.

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

How reproducible:
Randomly but happens often

Steps to Reproduce:
1. Run phc2sys with ice driver
2. Eventually it fails to read PHC and exit

Actual results:
phc2sys exits

Expected results:
phc2sys should retry again

Additional info:
Apr 25 10:18:38 MR400411-1123-785-980-11042-984fee184b8b phc2sys[3228834]: phc2sys[1194475.374]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
Apr 25 10:18:38 MR400411-1123-785-980-11042-984fee184b8b kernel: ice 0000:16:00.0: PTP failed to get time
Apr 25 10:18:38 MR400411-1123-785-980-11042-984fee184b8b phc2sys[3228834]: [1194475.374] ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
Apr 25 10:18:38 MR400411-1123-785-980-11042-984fee184b8b systemd[1]: phc2sys.service: Main process exited, code=exited, status=255/n/a
Apr 25 10:18:38 MR400411-1123-785-980-11042-984fee184b8b systemd[1]: phc2sys.service: Failed with result 'exit-code'.

There is this patch upstream https://sourceforge.net/p/linuxptp/mailman/message/37623532/ from Miroslav Lichvar. I saw it's not upstream yet but wondering if we could backport it to RHEL.

Comment 12 Yalin.Li 2022-07-07 10:10:00 UTC
phc2sys keep running after error happened. Marked as Tested.
# rpm -q linuxptp
linuxptp-3.1.1-3.el8.x86_64
# grep busy phc2sys.log 
phc2sys[1275.936]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[1293.945]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[1295.132]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[1310.148]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[1313.897]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[1323.348]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[1343.753]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[1377.078]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[1382.650]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[1406.060]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[1457.656]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[1464.915]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[1546.140]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[1550.929]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[1561.913]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[1573.168]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[1581.804]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[1584.117]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[1626.153]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[1658.371]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[1675.946]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
# tail phc2sys.log
phc2sys[1700.867]: CLOCK_REALTIME phc offset        12 s2 freq  -82546 delay    480
phc2sys[1700.930]: CLOCK_REALTIME phc offset        -6 s2 freq  -82561 delay    494
phc2sys[1700.992]: CLOCK_REALTIME phc offset        -2 s2 freq  -82558 delay    505
phc2sys[1701.055]: CLOCK_REALTIME phc offset        35 s2 freq  -82522 delay    452
phc2sys[1701.117]: CLOCK_REALTIME phc offset        -3 s2 freq  -82550 delay    500
phc2sys[1701.180]: CLOCK_REALTIME phc offset         4 s2 freq  -82543 delay    545
phc2sys[1701.243]: CLOCK_REALTIME phc offset        10 s2 freq  -82536 delay    495
phc2sys[1701.305]: CLOCK_REALTIME phc offset        -4 s2 freq  -82547 delay    548
phc2sys[1701.368]: CLOCK_REALTIME phc offset         2 s2 freq  -82542 delay    500
phc2sys[1701.431]: CLOCK_REALTIME phc offset        -8 s2 freq  -82552 delay    500
# ps aux | grep phc2sys
root       19004  0.1  0.0  12324  1332 pts/0    S    06:00   0:00 phc2sys -rm -n 24 -N 8 -s ens2f0 -O 37 -R 16
root       19199  0.0  0.0   9216  1084 pts/0    S+   06:07   0:00 grep --color=auto phc2sys

Comment 15 Yalin.Li 2022-07-19 12:16:34 UTC
Verified on 3.1.1-3, phc2sys doesn't end after "device or resource busy" error happened. Marked as verified.
# rpm -q linuxptp
linuxptp-3.1.1-3.el8.x86_64
# tail ptp4l.log
ptp4l[535541.292]: rms    7 max   15 freq    +32 +/-  12 delay   319 +/-   1
ptp4l[535542.266]: rms    5 max   10 freq    +31 +/-   8 delay   319 +/-   1
ptp4l[535543.314]: rms    5 max   10 freq    +39 +/-   8 delay   320 +/-   2
ptp4l[535544.300]: rms    5 max   10 freq    +38 +/-   8 delay   317 +/-   1
ptp4l[535545.311]: rms    5 max   12 freq    +37 +/-   9 delay   320 +/-   1
ptp4l[535546.265]: rms    7 max   17 freq    +30 +/-  11 delay   320 +/-   1
ptp4l[535547.299]: rms    6 max   14 freq    +30 +/-  10 delay   319 +/-   1
ptp4l[535548.314]: rms    8 max   15 freq    +38 +/-  13 delay   317 +/-   1
ptp4l[535549.318]: rms    6 max   13 freq    +37 +/-  10 delay   319 +/-   1
ptp4l[535550.315]: rms    6 max   16 freq    +41 +/-  10 delay   318 +/-   1
# tail phc2sys
phc2sys[535560.030]: CLOCK_REALTIME phc offset      4009 s2 freq  -77330 delay    607
phc2sys[535560.092]: CLOCK_REALTIME phc offset      3687 s2 freq  -76450 delay    610
phc2sys[535560.155]: CLOCK_REALTIME phc offset      3304 s2 freq  -75727 delay    605
phc2sys[535560.218]: CLOCK_REALTIME phc offset      2907 s2 freq  -75132 delay    606
phc2sys[535560.280]: CLOCK_REALTIME phc offset      2440 s2 freq  -74727 delay    557
phc2sys[535560.403]: CLOCK_REALTIME phc offset      1516 s2 freq  -74919 delay    609
phc2sys[535560.466]: CLOCK_REALTIME phc offset      1050 s2 freq  -74930 delay    559
phc2sys[535560.529]: CLOCK_REALTIME phc offset       587 s2 freq  -75078 delay    610
phc2sys[535560.591]: CLOCK_REALTIME phc offset       132 s2 freq  -75357 delay    611
phc2sys[535560.654]: CLOCK_REALTIME phc offset      -308 s2 freq  -75758 delay    556
# grep busy phc2sys
phc2sys[534032.501]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[534043.586]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[534047.601]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[534077.202]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[534086.396]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[534106.562]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[534230.587]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
phc2sys[534234.535]: ioctl PTP_SYS_OFFSET_EXTENDED: Device or resource busy
# ps aux | grep phc2sys
root      130581  0.1  0.0  12324  1364 pts/0    S    07:50   0:02 phc2sys -rm -n 24 -N 8 -s ens2f0 -O 37 -R 16
root      130950  0.0  0.0 221940  1176 pts/0    S+   08:16   0:00 grep --color=auto phc2sys
#

Comment 25 errata-xmlrpc 2022-11-08 09:49:43 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-2022:7613