[DragonFlyBSD - Bug #3299] DragonFlyBSD reports utterly wrong uptime (most of the time, right after booting in)
bugtracker-admin at leaf.dragonflybsd.org
bugtracker-admin at leaf.dragonflybsd.org
Wed Aug 20 12:42:06 PDT 2025
Issue #3299 has been updated by daftaupe.
@liweitianux I'm able to reproduce on the Q35 machine.
Here's 1.
<pre>
ptoret at dragonflydev:~ % uptime
7:35PM up 42951 days, 6:12, 1 user, load averages: 0.19, 0.05, 0.02
ptoret at dragonflydev:~ % date
Wed Aug 20 19:36:49 CEST 2025
ptoret at dragonflydev:~ % uptime
7:36PM up 42951 days, 6:13, 1 user, load averages: 0.05, 0.03, 0.01
ptoret at dragonflydev:~ % sysctl kern.boottime
kern.boottime: { sec = -1955277368, nsec = 0 } Thu Jan 16 11:33:13 1908
ptoret at dragonflydev:~ % sysctl kern.cputimer
kern.cputimer.intr.select: lapic
kern.cputimer.intr.freq: 500001189
kern.cputimer.intr.reglist: lapic
kern.cputimer.freq: 3579545
kern.cputimer.clock: 437797292
kern.cputimer.name: ACPI-fast24
kern.cputimer.select: ACPI-fast24 i8254_timer2 dummy
ptoret at dragonflydev:~ % sysctl -a | grep tsc
debug.indefinite_uses_rdtsc: 0
hw.tsc_frequency: 3749962814
hw.tsc_mpsync: 0
hw.tsc_invariant: 0
hw.tsc_present: 1
ptoret at dragonflydev:~ % dmesg | grep -Ei 'cputimer|TSC|i8254|HPET|APIC|clock|timer|rtc|warning'
Using cputimer i8254_timer2 for TSC calibration
Timer latency (in TSC ticks): 7294 min=7275 max=7388
TSC clock: 3749965923 Hz
Features=0x783fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE,SSE2>
Features2=0xf7f83203<SSE3,PCLMULQDQ,SSSE3,FMA,CX16,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,AVX,F16C,RDRND,VMM>
AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
Structured Extended Features=0x209c012a<TSCADJ,BMI1,AVX2,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA>
LAPIC: enter X2APIC mode
madt_lapic_probe: lapic_count=2 x2apic_count=0
lapic: divisor index 0, frequency 500000951 Hz
TSC is not invariant, no further tests will be performed
ACPI: APIC 0x000000007EB76000 000080 (v03 BOCHS BXPC 00000001 BXPC 00000001)
acpi_timer0 on acpi0
Warning: hardclock missed > 1 sec
Using cputimer i8254_timer2 for TSC calibration
Timer latency (in TSC ticks): 7429 min=7275 max=21975
TSC clock: 3749962814 Hz
Features=0x783fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE,SSE2>
Features2=0xf7f83203<SSE3,PCLMULQDQ,SSSE3,FMA,CX16,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,AVX,F16C,RDRND,VMM>
AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
Structured Extended Features=0x209c012a<TSCADJ,BMI1,AVX2,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA>
LAPIC: enter X2APIC mode
madt_lapic_probe: lapic_count=2 x2apic_count=0
lapic: divisor index 0, frequency 500001189 Hz
TSC is not invariant, no further tests will be performed
ACPI: APIC 0x000000007EB76000 000080 (v03 BOCHS BXPC 00000001 BXPC 00000001)
acpi_timer0 on acpi0
Warning: hardclock missed > 1 sec
</pre>
Here's 2.
I don't see a weird uptime after I set @hw.tsc_cputimer_force=1@, but I don't know if it's luck or not, I will have to wait to use the machine a bit more and see if I can reproduce.
----------------------------------------
Bug #3299: DragonFlyBSD reports utterly wrong uptime (most of the time, right after booting in)
http://bugs.dragonflybsd.org/issues/3299#change-14605
* Author: adrian
* Status: In Progress
* Priority: Normal
* Category: Userland
* Target version: 6.4
* Start date: 2021-10-25
----------------------------------------
System environment:
<pre>
root at dragonflybsd /home/adrian
# uname -a
DragonFly dragonflybsd.v-zone.lan.dac 6.0-RELEASE DragonFly v6.0.1-RELEASE #1: Thu Oct 14 18:25:27 CEST 2021 adrian at dragonflybsd.v-zone.lan.dac:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64
</pre>
Running DragonFlyBSD inside a Debian KVM(qemu) virtualization as a guest with hardware acceleration,
the system reports a very wrong uptime, issuing "uptime".
Gkrellm even reports a negative, very strange uptime! Check by running gkrellm from the pkg system.
After ~2 days of uptime, I see this wrong uptime:
<pre>
root at dragonflybsd /home/adrian
# uptime
6:35PM up 42954 days, 10:01, 2 users, load averages: 0,00 0,00 0,00
</pre>
The error also was present with Version 6.0.0. This is now Version 6.0.1 and the bug is still there.
Happens about three of four times, the bug is present right after booting into the system.
Thank you for taking the time reading this.
Sincerely,
Adrian Kieß
--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
More information about the Bugs
mailing list