guest hang due to missing clock interrupt
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I noticed on 2 different systems that after upgrade from precise to latest trusty VMs are crashing:
- in case of Windows VMs I'm getting BSOD with error message: "A clock interrupt was not received on a secondary processor within the allocated time interval."
- On linux VMs I'm noticing "hrtimer: interrupt took 2992229 ns" messages
- On some proprietary virtual appliances I'm noticing crashes an due to missing timer interrupts
QEMU version is:
QEMU emulator version 1.7.91 (Debian 2.0.0~rc1+
Full command line:
qemu-system-x86_64 -enable-kvm -name win7eval -S -machine pc-i440fx-
Changed in qemu (Ubuntu): | |
importance: | Undecided → High |
Changed in linux (Ubuntu): | |
status: | Incomplete → Confirmed |
no longer affects: | qemu |
tags: | added: ksm-numa-guest-freeze |
I left over night following simple app which runs inside linux VM (pinned to CPU1). and displays how much ticks happened during the 1 second sleep. I found several occasions where sleep was taking much longer.
code:
#include< sys/time. h>
#include<time.h>
#include<stdio.h>
#include<stdint.h>
#define CPUSPEED 2533422000
static __inline__ uint64_t getticks(void)
{
unsigned a, d;
asm("cpuid");
asm volatile("rdtsc" : "=a" (a), "=d" (d));
return (((uint64_t)a) | (((uint64_t)d) << 32));
}
int main()
{
uint64_t t0,t1;
while (1) {
t0 = getticks();
sleep(1);
t1 = getticks();
printf("Ticks: %lu delta:%lu\n",t1-t0, t1-t0-CPUSPEED);
}
return 0;
}
Sample1:
Ticks: 2533748354 delta:326354
Ticks: 2533785458 delta:363458
Ticks: 2533889852 delta:467852
Ticks: 13309910165 delta:10776488165
Ticks: 2533823762 delta:401762
Ticks: 2533817164 delta:395164
Ticks: 2533894302 delta:472302
Sample2:
Ticks: 2533896753 delta:474753
Ticks: 2533876689 delta:454689
Ticks: 2533783931 delta:361931
Ticks: 20528401242 delta:17994979242
Ticks: 2533904102 delta:482102
Ticks: 2533740733 delta:318733
Ticks: 2533856266 delta:434266
Sample3:
Ticks: 2533761095 delta:339095
Ticks: 2533652242 delta:230242
Ticks: 2533855141 delta:433141
Ticks: 18943955180 delta:16410533180
Ticks: 2533780954 delta:358954
Ticks: 2533923283 delta:501283
Ticks: 2533909033 delta:487033