microsoft/SDN

[PTP] Client stopped accepting announce messages; never sent delay requests

Ddezibel opened this issue · 5 comments

Hey all,

I have a problem running the PTP Client. TDLR at bottom.

We have a hardware Grandmaster Clock, a switch and the Windows 10 (Version 1909) Client connected to a secluded network. Nothing else is connected to it, and it has no connection to the internet. The switch is running in forward mode, which will inevitably lead to higher delays, but should not have any influence otherwise.

I followed the guides for High Accuracy as well as Timestamping and the PTP setup. Everything is set up according to the guidelines (sorry for the German config, I think it's still clear).

[Konfiguration]

EventLogFlags: 2 (Lokal)
AnnounceFlags: 10 (Lokal)
TimeJumpAuditOffset: 28800 (Lokal)
MinPollInterval: 4 (Lokal)
MaxPollInterval: 4 (Lokal)
MaxNegPhaseCorrection: 4294967295 (Lokal)
MaxPosPhaseCorrection: 4294967295 (Lokal)
MaxAllowedPhaseOffset: 300 (Lokal)
(I originally tried with the suggest Min- and MaxPollInterval of 6, but changed them since, in case anyone is wondering).

FrequencyCorrectRate: 2 (Lokal)
PollAdjustFactor: 5 (Lokal)
LargePhaseOffset: 50000000 (Lokal)
SpikeWatchPeriod: 900 (Lokal)
LocalClockDispersion: 10 (Lokal)
HoldPeriod: 5 (Lokal)
PhaseCorrectRate: 1 (Lokal)
UpdateInterval: 100 (Lokal)

[Zeitanbieter]

PtpClient (Lokal)
DllName: C:\Windows\System32\ptpprov.dll (Lokal)
Enabled: 1 (Lokal)
InputProvider: 1 (Lokal)

NtpClient (Lokal)
DllName: C:\WINDOWS\SYSTEM32\w32time.DLL (Lokal)
Enabled: 0 (Lokal)
InputProvider: 1 (Lokal)

NtpServer (Lokal)
DllName: C:\WINDOWS\SYSTEM32\w32time.DLL (Lokal)
Enabled: 0 (Lokal)
InputProvider: 0 (Lokal)

VMICTimeProvider (Lokal)
DllName: C:\WINDOWS\System32\vmictimeprovider.dll (Lokal)
Enabled: 0 (Lokal)
InputProvider: 1 (Lokal)

After not working for some time, Windows was randomly able to pick up the announce messages (Event 512) and select the best master successfully (513). However, when running w32time /resync it never sent any delay request messages to the master and thus never synchronized, giving the error The computer did not resync because no time data was available.
After a while, however, Windows stopped accepting the announce messages completely, and I only get Event 515 about once per hour, no matter whether I execute w32tm /resync:

grafik

From what is specified in the PTP Validation guide, everything is set up correctly. The flags PTP_TIMESCALE and PTP_UTC_REASONABLE are set to 1, as specified. The domain number is 0, and PTP version is 2:

grafik

I can also see all the messages coming in with Wireshark, but Windows seems to discard them.

grafik

I successfully synchronized a Linux system with ptp4l to the network, so this is definitely not a problem of the clock or the switch.

Thus, it seems to me as if there might be another setting leading Windows to discard the messages, which might not be noted in the Validation Guide. Any tips or hints as to where the problem might be are highly welcomed. I can provide more info on the exact clock settings or anything else, if necessary.

TDLR; Windows Client was able to receive announce messages and select grandmaster, but didn't send delay requests. Now it neither receives announce messages, nor selects a grandmaster, nor sends delay requests. Problem somewhere within Windows, as I can see all messages coming in with Wireshark.

I have made a lot of progress understanding the whole issue. There seem to be two problems.

  1. I cannot get w32time to pick up the announce messages. I tried different software to sync with PTP, and everything worked, thus confirming again that this is not a network/firewall issue. When I uninstalled the software again, events 512 and 513 came running in for the PTP-Time-Provider. After a while, they stopped again, and I only get 515 about once per hour. To me it seems as if the service is stopping somehow. Neither restarting the service under Services does the trick, nor does w32tm /resync, nor setting the enabled registry entry to 0, then calling w32tm /config /update, then setting enabled to 1 again and calling update again.

  2. As soon as I see events 512 and 513 delay request messages are also being sent, yet the master clock does not respond. The reason for this is the PTP_UNICAST flag, which is set to 1. Unfortunately I need this to be multicast. Is there anway to have the delay request message be multicast, or might this be a planned feature in the future? I would imagine a Registry entry similar to EnableMulticastRx named EnableMulticastTx or similar.

grafik

On another note, might WSL 2 with e.g. linuxptp/ptp4l work? I can only try WSL 1, where it doesn't.

Hi @Ddezibel , I'm facing the same issues with the w32time not receiving event 512 / 513, and the unicast issue.
Did you manage to solve it somehow?
Thanks

Hey @nitsanhasson , I could not solve the issue. I bought software (a certain "domain time client"), which has been working fine ever since.

@Ddezibel OK, thanks anyway

I would suggest to enable debug logging for w32time and checking the PTP log. I found through error messages in the file 'w32time.log_ptpprov' that some registry keys were missing. Once I added those I was able to use PTP in Windows 10.