Re: gettimeofday() jumping into the future

From: Mihai DonÈu
Date: Wed Apr 02 2008 - 00:26:40 EST


On Monday 31 March 2008, Tim Ricketts wrote:
> On Thu, 23 Aug 2007, Michael Smith wrote:
>
> > We've been seeing some strange behaviour on some of our applications
> > recently. I've tracked this down to gettimeofday() returning spurious
> > values occasionally.
> >
> > Specifically, gettimeofday() will suddenly, for a single call, return
> > a value about 4398 seconds (~1 hour 13 minutes) in the future. The
> > following call goes back to a normal value.
>
> I have also seen this.

I don't know if gettimeofday() and dmesg's logging facility use the same
time source, but I'm seeing jumps into the past:

[ 11.010300] ACPI: SSDT 3F6D3F27, 01C6 (r1 PmRef Cpu0Cst 3001 INTL 20050624)
[ 9.344283] ACPI: CPU0 (power states: C1[C1] C2[C2] C3[C3])
[ 9.344528] ACPI: Processor [CPU0] (supports 8 throttling states)
[ 9.344989] ACPI: SSDT 3F6D4374, 00C4 (r1 PmRef Cpu1Ist 3000 INTL 20050624)
[ 9.345458] ACPI: SSDT 3F6D40ED, 0085 (r1 PmRef Cpu1Cst 3000 INTL 20050624)
[ 11.013089] ACPI: CPU1 (power states: C1[C1] C2[C2] C3[C3])

and the future:

[ 11.081332] usb 1-2: new high speed USB device using ehci_hcd and address 2
[ 12.748489] usb usb4: configuration #1 chosen from 1 choice
[ 12.748653] hub 4-0:1.0: USB hub found
[ 12.748772] hub 4-0:1.0: 2 ports detected
[ 12.849090] ACPI: PCI Interrupt 0000:00:1d.3[D] -> GSI 23 (level, low) -> IRQ 23
[ 12.849338] PCI: Setting latency timer of device 0000:00:1d.3 to 64
[ 12.849341] uhci_hcd 0000:00:1d.3: UHCI Host Controller
[ 12.849505] uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 5
[ 12.849734] uhci_hcd 0000:00:1d.3: irq 23, io base 0x0000bf20
[ 12.850020] usb usb5: configuration #1 chosen from 1 choice
[ 12.850185] hub 5-0:1.0: USB hub found
[ 12.850311] hub 5-0:1.0: 2 ports detected
[ 11.194688] usb 1-2: configuration #1 chosen from 1 choice

I have a 2.6.24, 64bit, SMP kernel (Intel Core 2 Duo).

--
Mihai DonÈu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/