Hello,
I'm having an issue getting ptp4l to sync when the local time is significantly
behind
the reference time. The behaviour is only present when I have two or more
client ports configured
(connected to the same GM).
With two ports, the first one listed gets stuck in UNCALIBRATED, with the
second in LISTENING.
If I repeat the process with a single port enabled, the port is able to enter
the SLAVE state and
the clock syncs fine. I have been able to replicate this on two separate
servers with the same config.
Could you take a look at these logs and configuration and let me know if you
have any suggestions?
If you have suggestions for where to look in the code to add some more
instrumentation, I'm comfortable
hacking at that.
The only way that I have been able to correct this is by enabling the
step_threshold setting
ie. step_theshold 1.0
But I am looking for a way to resolve this without allowing the clock to be
stepped outside of startup.
Other things I have tried:
changing the clock_servo to pi
upgrading to v3.1
disabling phc2sys and just running ptp4l
ensuring that ntpd and any other time services are not running
switching the order of the ports in the config file
Please let me know if there is any additional information that would be useful.
Thanks,
Cole
###Setup
systemctl stop ptp4l; systemctl stop phc2sys
sudo date 06100800 ; sudo hwclock -w # set to some time in the past, generally
over an hour
sudo reboot now
###Logs after reboot
2021-06-10T21:26:11.000 host1 ptp4l: info [395.561] selected /dev/ptp8 as PTP
clock
2021-06-10T21:26:11.000 host1 ptp4l: warning [395.561] port 2: just a bunch of
devices
2021-06-10T21:26:11.000 host1 phc2sys: err [395.585] uds: sendto failed: No
such file or directory
2021-06-10T21:26:11.000 host1 ptp4l: notice [395.603] port 1: INITIALIZING to
LISTENING on INIT_COMPLETE
2021-06-10T21:26:11.000 host1 ptp4l: notice [395.639] port 2: INITIALIZING to
LISTENING on INIT_COMPLETE
2021-06-10T21:26:11.000 host1 ptp4l: notice [395.639] port 0: INITIALIZING to
LISTENING on INIT_COMPLETE
2021-06-10T21:26:12.000 host1 phc2sys: notice [396.585] Waiting for ptp4l...
2021-06-10T21:26:12.000 host1 phc2sys: info [396.685] reconfiguring after port
state change
2021-06-10T21:26:12.000 host1 phc2sys: info [396.685] selecting ens787f1 for
synchronization
2021-06-10T21:26:12.000 host1 phc2sys: info [396.686] selecting ens787f3 for
synchronization
2021-06-10T21:26:12.000 host1 phc2sys: info [396.686] no source, selecting
ens787f3 as the default clock
2021-06-10T21:26:13.000 host1 ptp4l: notice [396.954] port 2: new foreign
master 6805ca.fffe.3a17b0-1
2021-06-10T21:26:13.000 host1 ptp4l: notice [396.954] port 1: new foreign
master 6805ca.fffe.3a17b0-1
2021-06-10T21:26:17.000 host1 ptp4l: notice [400.954] selected best master
clock 6805ca.fffe.3a17b0
2021-06-10T21:26:17.000 host1 ptp4l: notice [400.954] port 2: LISTENING to
UNCALIBRATED on RS_SLAVE
2021-06-10T21:26:17.000 host1 ptp4l: notice [400.954] selected best master
clock 6805ca.fffe.3a17b0
2021-06-10T21:26:17.000 host1 ptp4l: notice [400.954] port 1: LISTENING to
UNCALIBRATED on RS_SLAVE
2021-06-10T21:26:17.000 host1 ptp4l: notice [400.954] port 2: UNCALIBRATED to
LISTENING on RS_PASSIVE
2021-06-10T21:26:17.000 host1 phc2sys: info [400.987] port 6805ca.fffe.3a16d3-2
changed state
2021-06-10T21:26:17.000 host1 phc2sys: info [400.987] port 6805ca.fffe.3a16d3-1
changed state
2021-06-10T21:26:17.000 host1 phc2sys: info [400.987] port 6805ca.fffe.3a16d3-2
changed state
2021-06-10T21:26:17.000 host1 phc2sys: info [400.987] reconfiguring after port
state change
2021-06-10T21:26:17.000 host1 phc2sys: info [400.987] selecting ens787f1 for
synchronization
2021-06-10T21:26:17.000 host1 phc2sys: info [400.988] master clock not ready,
waiting...
2021-06-10T21:26:23.000 host1 ptp4l: notice [407.141] port 1: UNCALIBRATED to
SLAVE on MASTER_CLOCK_SELECTED
2021-06-10T21:26:23.000 host1 phc2sys: info [407.188] port 6805ca.fffe.3a16d3-1
changed state
2021-06-10T21:26:23.000 host1 phc2sys: info [407.188] reconfiguring after port
state change
2021-06-10T21:26:23.000 host1 phc2sys: info [407.188] selecting ens787f1 for
synchronization
2021-06-10T21:26:23.000 host1 phc2sys: info [407.188] selecting CLOCK_REALTIME
for synchronization
2021-06-10T21:26:23.000 host1 phc2sys: info [407.188] selecting ens787f3 as the
master clock
2021-06-10T21:26:24.000 host1 ptp4l: notice [407.924] selected best master
clock 6805ca.fffe.3a17b0
2021-06-10T21:26:24.000 host1 ptp4l: warning [408.137] clockcheck: clock jumped
forward or running faster than expected!
2021-06-10T21:26:24.000 host1 ptp4l: notice [408.141] port 1: SLAVE to
UNCALIBRATED on SYNCHRONIZATION_FAULT
2021-06-10T21:26:24.000 host1 phc2sys: info [408.189] port 6805ca.fffe.3a16d3-1
changed state
2021-06-10T21:26:24.000 host1 phc2sys: info [408.189] reconfiguring after port
state change
2021-06-10T21:26:24.000 host1 phc2sys: info [408.189] selecting ens787f1 for
synchronization
2021-06-10T21:26:24.000 host1 phc2sys: info [408.189] master clock not ready,
waiting...
2021-06-10T21:26:24.000 host1 ptp4l: warning [408.745] clockcheck: clock jumped
forward or running faster than expected!
2021-06-10T21:26:25.000 host1 ptp4l: warning [409.139] clockcheck: clock jumped
forward or running faster than expected!
2021-06-10T21:26:26.000 host1 ptp4l: warning [410.137] clockcheck: clock jumped
forward or running faster than expected!
2021-06-10T21:26:26.000 host1 ptp4l: warning [410.384] clockcheck: clock jumped
forward or running faster than expected!
2021-06-10T21:26:26.000 host1 ptp4l: warning [410.592] clockcheck: clock jumped
forward or running faster than expected!
2021-06-10T21:26:27.000 host1 ptp4l: notice [410.955] selected best master
clock 6805ca.fffe.3a17b0
2021-06-10T21:26:27.000 host1 ptp4l: warning [411.137] clockcheck: clock jumped
forward or running faster than expected!
2021-06-10T21:26:27.000 host1 ptp4l: warning [411.691] clockcheck: clock jumped
forward or running faster than expected!
2021-06-10T21:26:28.000 host1 ptp4l: warning [412.139] clockcheck: clock jumped
forward or running faster than expected!
2021-06-10T21:26:29.000 host1 ptp4l: warning [413.138] clockcheck: clock jumped
forward or running faster than expected!
2021-06-10T21:26:29.000 host1 ptp4l: warning [413.288] clockcheck: clock jumped
forward or running faster than expected!
2021-06-10T21:26:30.000 host1 ptp4l: warning [414.138] clockcheck: clock jumped
forward or running faster than expected!
2021-06-10T21:26:30.000 host1 ptp4l: notice [414.701] selected best master
clock 6805ca.fffe.3a17b0
2021-06-10T21:26:30.000 host1 ptp4l: warning [414.878] clockcheck: clock jumped
forward or running faster than expected!
2021-06-10T21:26:31.000 host1 ptp4l: warning [415.138] clockcheck: clock jumped
forward or running faster than expected!
2021-06-10T21:26:31.000 host1 ptp4l: warning [415.538] clockcheck: clock jumped
forward or running faster than expected!
2021-06-10T21:26:32.000 host1 ptp4l: warning [416.139] clockcheck: clock jumped
forward or running faster than expected!
2021-06-10T21:26:32.000 host1 ptp4l: warning [416.296] clockcheck: clock jumped
forward or running faster than expected!
2021-06-10T21:26:33.000 host1 ptp4l: notice [416.956] selected best master
clock 6805ca.fffe.3a17b0
2021-06-10T21:26:33.000 host1 ptp4l: warning [417.138] clockcheck: clock jumped
forward or running faster than expected!
2021-06-10T21:26:33.000 host1 ptp4l: warning [417.832] clockcheck: clock jumped
forward or running faster than expected!
2021-06-10T21:26:34.000 host1 ptp4l: warning [418.139] clockcheck: clock jumped
forward or running faster than expected!
2021-06-10T21:26:34.000 host1 ptp4l: warning [418.413] clockcheck: clock jumped
forward or running faster than expected!
/dev/ptp8 continues to get further out of sync
host1:~# phc_ctl /dev/ptp8 cmp
phc_ctl[556.902]: offset from CLOCK_REALTIME is -37000011433ns
host1:~# phc_ctl /dev/ptp8 cmp
phc_ctl[590.510]: offset from CLOCK_REALTIME is -37000013319ns
Stuck in uncalibrated
host1:~# sudo pmc -u -b 0 -f /etc/ptp4l.conf "GET PORT_DATA_SET"
sending: GET PORT_DATA_SET
6805ca.fffe.3a16d3-1 seq 0 RESPONSE MANAGEMENT PORT_DATA_SET
portIdentity 6805ca.fffe.3a16d3-1
portState UNCALIBRATED
logMinDelayReqInterval 0
peerMeanPathDelay 0
logAnnounceInterval 1
announceReceiptTimeout 3
logSyncInterval 0
delayMechanism 1
logMinPdelayReqInterval 0
versionNumber 2
6805ca.fffe.3a16d3-2 seq 0 RESPONSE MANAGEMENT PORT_DATA_SET
portIdentity 6805ca.fffe.3a16d3-2
portState LISTENING
logMinDelayReqInterval 0
peerMeanPathDelay 0
logAnnounceInterval 1
announceReceiptTimeout 3
logSyncInterval 0
delayMechanism 1
logMinPdelayReqInterval 0
versionNumber 2
###Config
host1:~$ ptp4l -v
2.0
host1:~$ phc2sys -v
2.0
host1:~# cat /etc/ptp4l.conf
[global]
#
# Default Data Set
#
slaveOnly 1
time_stamping hardware
delay_mechanism e2e
domainNumber 24
boundary_clock_jbod 1
network_transport L2
summary_interval 6
tx_timestamp_timeout 20
clock_servo linreg
#
# Slave devices
#
[ens787f3]
[ens787f1]
host1:~# cat /etc/sysconfig/ptp4l
OPTIONS="-f /etc/ptp4l.conf"
host1:~# cat /etc/sysconfig/phc2sys
OPTIONS="-a -r -f /etc/ptp4l.conf -R 10 -u 600 "
###System
host1:~# cat /etc/centos-release
CentOS Linux release 7.6.1810 (Core)
host1:~# uname -r
3.10.0-1160.15.2.rt56.1152.el7.tis.4.x86_64
###Devices
host1:~# ethtool -i ens787f3
driver: i40e
version: 2.14.13
firmware-version: 6.01 0x80003484 1.1747.0
expansion-rom-version:
bus-info: 0000:81:00.3
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: yes
host1:~# ethtool -T ens787f3
Time stamping parameters for ens787f3:
Capabilities:
hardware-transmit (SOF_TIMESTAMPING_TX_HARDWARE)
software-transmit (SOF_TIMESTAMPING_TX_SOFTWARE)
hardware-receive (SOF_TIMESTAMPING_RX_HARDWARE)
software-receive (SOF_TIMESTAMPING_RX_SOFTWARE)
software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
hardware-raw-clock (SOF_TIMESTAMPING_RAW_HARDWARE)
PTP Hardware Clock: 8
Hardware Transmit Timestamp Modes:
off (HWTSTAMP_TX_OFF)
on (HWTSTAMP_TX_ON)
Hardware Receive Filter Modes:
none (HWTSTAMP_FILTER_NONE)
ptpv1-l4-sync (HWTSTAMP_FILTER_PTP_V1_L4_SYNC)
ptpv1-l4-delay-req (HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ)
ptpv2-l4-event (HWTSTAMP_FILTER_PTP_V2_L4_EVENT)
ptpv2-l4-sync (HWTSTAMP_FILTER_PTP_V2_L4_SYNC)
ptpv2-l4-delay-req (HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ)
ptpv2-l2-event (HWTSTAMP_FILTER_PTP_V2_L2_EVENT)
ptpv2-l2-sync (HWTSTAMP_FILTER_PTP_V2_L2_SYNC)
ptpv2-l2-delay-req (HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ)
ptpv2-event (HWTSTAMP_FILTER_PTP_V2_EVENT)
ptpv2-sync (HWTSTAMP_FILTER_PTP_V2_SYNC)
ptpv2-delay-req (HWTSTAMP_FILTER_PTP_V2_DELAY_REQ)
host1:~# ethtool -i ens787f1
driver: i40e
version: 2.14.13
firmware-version: 6.01 0x80003484 1.1747.0
expansion-rom-version:
bus-info: 0000:81:00.1
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: yes
host1:~# ethtool -T ens787f1
Time stamping parameters for ens787f1:
Capabilities:
hardware-transmit (SOF_TIMESTAMPING_TX_HARDWARE)
software-transmit (SOF_TIMESTAMPING_TX_SOFTWARE)
hardware-receive (SOF_TIMESTAMPING_RX_HARDWARE)
software-receive (SOF_TIMESTAMPING_RX_SOFTWARE)
software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
hardware-raw-clock (SOF_TIMESTAMPING_RAW_HARDWARE)
PTP Hardware Clock: 5
Hardware Transmit Timestamp Modes:
off (HWTSTAMP_TX_OFF)
on (HWTSTAMP_TX_ON)
Hardware Receive Filter Modes:
none (HWTSTAMP_FILTER_NONE)
ptpv1-l4-sync (HWTSTAMP_FILTER_PTP_V1_L4_SYNC)
ptpv1-l4-delay-req (HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ)
ptpv2-l4-event (HWTSTAMP_FILTER_PTP_V2_L4_EVENT)
ptpv2-l4-sync (HWTSTAMP_FILTER_PTP_V2_L4_SYNC)
ptpv2-l4-delay-req (HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ)
ptpv2-l2-event (HWTSTAMP_FILTER_PTP_V2_L2_EVENT)
ptpv2-l2-sync (HWTSTAMP_FILTER_PTP_V2_L2_SYNC)
ptpv2-l2-delay-req (HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ)
ptpv2-event (HWTSTAMP_FILTER_PTP_V2_EVENT)
ptpv2-sync (HWTSTAMP_FILTER_PTP_V2_SYNC)
ptpv2-delay-req (HWTSTAMP_FILTER_PTP_V2_DELAY_REQ)
_______________________________________________
Linuxptp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-users