On Wed, Dec 09, 2020 at 04:55:09PM -0300, K R wrote:
> pflog0 logs incorrect timestamp on i386.  The machine in question is
> running under QEMU:

Works for me on a i386 xeon machine.

> hw.vendor=QEMU

hw.machine=i386
hw.model=Intel(R) Xeon(TM) CPU 3.06GHz ("GenuineIntel" 686-class)
hw.ncpu=4
hw.vendor=Supermicro                                        .
hw.product=X5DL8

> # tcpdump -c 1 -nl -tt -q -i pflog0
> tcpdump: WARNING: snaplen raised from 116 to 160
> tcpdump: listening on pflog0, link-type PFLOG
> 2114522159.012334 51.195.88.92.62841 > xxx.xxx.xxx.xxx.5060: udp 331

root@ot2:.../~# date                             
Thu Dec 10 13:48:10 CET 2020
root@ot2:.../~# tcpdump -c 1 -nl -tt -q -i pflog0
tcpdump: WARNING: snaplen raised from 116 to 160
tcpdump: listening on pflog0, link-type PFLOG
1607604494.828901 10.188.81.21 > 10.188.81.22: icmp: 8 0
root@ot2:.../~# date -r 1607604494               
Thu Dec 10 13:48:14 CET 2020
root@ot2:.../~# date
Thu Dec 10 13:48:22 CET 2020

So what is the difference between your and my setup?
I would guess it is a OpenBSD on QEMU timekeeping bug.

Could you run this?

root@ot2:.../~# while sleep 1; do date; done
Thu Dec 10 13:56:47 CET 2020
Thu Dec 10 13:56:48 CET 2020
Thu Dec 10 13:56:49 CET 2020
Thu Dec 10 13:56:50 CET 2020

Does it print one line per second?  Does the date output increment
by one second?  Use an independent clock to watch it.  Then we see
if timeouts, clock and real world are in sync.

What does sysctl kern.timecounter say?

bluhm

Reply via email to