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 1479834 - Multiple ptp4l use same /var/run/ptp4l
Summary: Multiple ptp4l use same /var/run/ptp4l
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: linuxptp
Version: 7.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Lichvar
QA Contact: Qiao Zhao
URL:
Whiteboard:
Depends On:
Blocks: 1549614
TreeView+ depends on / blocked
 
Reported: 2017-08-09 13:59 UTC by Beat Rubischon
Modified: 2020-09-10 11:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-17 09:09:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Beat Rubischon 2017-08-09 13:59:28 UTC
Description of problem:

ptp4l uses the socket /var/run/ptp4l to communicate with the management tool pmc and to deliver an up to date interface list to phc2sys. Multiple ptp4l by intention or by mistake will use the same socket.

Killing one of those ptp4l processes would remove the socket, phc2sys won't be able to synchronize any longer due to the lack of communication with ptp4l.

Version-Release number of selected component (if applicable):

Tested on

linuxptp-1.4-3.20140718gitbdb6a3.el7.x86_64
linuxptp-1.7.1.fc25.x86_64
linuxptp-1.8-3.el7.x86_64

How reproducible:

always

Steps to Reproduce:
1. Install linuxptp
2. Run "ptp4l -i enp0s25 -m"
3. Run "phc2sys -a -m"
4. Run "ptp4l -i enp0s25 -m"
5. Stop second instance of ptp4l

Actual results:

phc2sys will stop synchronizing time, complaining...

phc2sys[3829328.174]: uds: sendto failed: No such file or directory
phc2sys[3829328.174]: uds: sendto failed: No such file or directory
phc2sys[3829329.174]: uds: sendto failed: No such file or directory

Expected results:

phc2sys will continue synchronizing time

Additional info:

phc2sys requires bare metal system with an PTP capable NIC.

It's unclear to me if and when how we could change the current behavior. In multiple ptp4l setups the phc2sys process is usually configured manually, still we have an issue in cases where a second ptp4l was started "to check the functionality" and killed afterwards. Leaving the socket in place might be an option, but requires further testing.

Comment 2 Miroslav Lichvar 2017-08-10 11:09:27 UTC
I think one way to solve this would be to modify ptp4l to not try to remove the socket on start. If binding to the socket fails, ptp4l will work without the UDS transport, or perhaps it could be handled as a fatal error.

The question is if it would be acceptable behavior in case the socket was left there due to ptp4l terminating in an abnormal way (e.g. crash). The user would have to manually remove the socket in order to get phc2sys working. It will change the user experience.

Comment 3 Miroslav Lichvar 2017-10-12 07:27:18 UTC
FWIW, an RFC patch was posted for this on the upstream list

https://www.mail-archive.com/linuxptp-devel@lists.sourceforge.net/msg02103.html

Comment 4 Miroslav Lichvar 2018-03-22 11:05:04 UTC
As this would change the behavior of ptp4l in case of an existing socket (from existing or crashed ptp4l instance), I think it would rather be a candidate for the next major RHEL release instead of minor release.

Comment 8 Red Hat Bugzilla Rules Engine 2018-05-17 09:09:53 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.


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