[LinuxPPS] same old issues.. :-(

Udo van den Heuvel udovdh at xs4all.nl
Sat Jan 8 10:43:14 CET 2011


2.6.37-ts22, but we've also seen this without ts patch.

`ldattach 18 /dev/ttyS0` correctly starts ppsapi and shows asserts and
clear, until ntpd starts.
if we kill ldattach, stop ntpd and have ldattach started just before
ntpd I saw this:

[root at epia redhat]# cat /sys/devices/virtual/pps/pps0/{assert,clear}
1294479388.975886131#4
0.000000000#0
[root at epia redhat]# cat /sys/devices/virtual/pps/pps0/{assert,clear}
1294479389.975806479#5
0.000000000#0
[root at epia redhat]# cat /sys/devices/virtual/pps/pps0/{assert,clear}
1294479390.975728222#6
0.000000000#0

the clear timestamp is 0.000.
This appears reproducible.

How come?

If we have the ntpd startup script sleep 2 seconds between ldattach and
ntpd we see:

[root at epia redhat]# service ntpd start
Starting ntpd:                                             [  OK  ]
[root at epia redhat]# cat /sys/devices/virtual/pps/pps0/{assert,clear}
1294479590.959962359#5
1294479588.160184502#3
[root at epia redhat]# cat /sys/devices/virtual/pps/pps0/{assert,clear}
1294479590.959962359#5
1294479588.160184502#3
[root at epia redhat]# cat /sys/devices/virtual/pps/pps0/{assert,clear}
1294479591.959882713#6
1294479588.160184502#3
[root at epia redhat]# cat /sys/devices/virtual/pps/pps0/{assert,clear}
1294479591.959882713#6
1294479588.160184502#3
[root at epia redhat]# cat /sys/devices/virtual/pps/pps0/{assert,clear}
1294479592.959803920#7
1294479588.160184502#3

So we do have a time-related race issue.
Also the clear edge is stopped by ntpd, still.
How to work around this?

Udo





More information about the LinuxPPS mailing list