﻿id	summary	reporter	owner	description	type	status	component	version	resolution	keywords	cc	guest	host
12076	QueryPerformanceCounter() Anomalies => Fixed in SVN	asdel		"Host: Ubuntu 10.10[[BR]]
Guest: Windows XP Pro, v5.1 SP3

Anomalies are observed with 64-bit counter value provided via QueryPerformanceCounter().  These anomalies being to appear after the VirtualBox is running continuously for ~4 days.  The counter frequency is 3,579,545 Hz; host/guest time synchronization is disabled (GetHostTimeDisabled = '1')

The guest calls QueryPerformanceCounter() every 50mS (0x2BB21 counts), logging the previous and current counter values when:
  (a) the previous count > current count, or[[BR]]
  (b) the current count is much larger than previous count (increase of 1 second or more, i.e., > 0x370000 counts)

The following counter query results are logged:
{{{
 1. Last >  Cur Time: 0x0000011B:7FFFC526 >  0x0000011A:80001858
 2. Last >  Cur Time: 0x00000135:7FFFE61B >  0x00000134:80002C01
 3. Last >  Cur Time: 0x00000136:7FFFDB9F >  0x00000135:800021C0
 4. Last >  Cur Time: 0x0000013E:7FFFEBC2 >  0x0000013D:80003983
 5. Last >  Cur Time: 0x00000146:7FFFBCFE >  0x00000145:800003E8
 6. Last >  Cur Time: 0x00000147:7FFFF8EA >  0x00000146:80003EDA
 7. Last << Cur Time: 0x00000183:FFFFC9DC << 0x00000185:00005E92
 8. Last >  Cur Time: 0x00000185:7FFFD751 >  0x00000184:8000402C
 9. Last >  Cur Time: 0x00000189:7FFFD519 >  0x00000188:80006D8F
10. Last << Cur Time: 0x00000188:FFFFC076 << 0x0000018A:0000071D
}}}
At 3.579 MHz, the event of d31..d0 going from 0x7FFF:FFFF to 0x8000:0000 occurs every 1200 seconds (20 minutes).

Note the third and fifth cases, where the bits d35..d32 went from 0x6 (b0110) to 0x5 (b0101) -- this is a subtraction, not just a clearing of bit d32.

Log entries 7 and 10 appear to show bit d32 double-incrementing on the roll-over of d31..d0 from 0xFFFFFFFF to 0x1:00000000

The effect is, to the guest, time appears to jump forward or backward by 20 minutes.

-- end of description"	defect	closed	other	VirtualBox 4.1.18	fixed	QueryPerformanceCounter counter timer		Windows	Linux
