2009-01-20 03:53:42

by Shane Hathaway

[permalink] [raw]
Subject: [Patch] UML: spurious interrupt freezes guest

A new instance of user mode linux that I created over the past couple of
days worked pretty well except that it had a habit of freezing after a
few minutes. Every time it froze, the last message on the console was
either:

spurious interrupt in ubd_handler, err = 4

or:

spurious interrupt in ubd_handler, err = 0

This message is generated by arch/um/drivers/ubd_kern.c. I did not work
out the cause of the spurious interrupts, but I did come up with a patch
that makes the guest recover from spurious interrupts without freezing.
It appears that the interrupt handler needs to be reactivated before
every exit of ubd_handler(). The patch is below.

Shane


--- linux-2.6.27.12-orig/arch/um/drivers/ubd_kern.c
+++ linux-2.6.27.12/arch/um/drivers/ubd_kern.c
@@ -489,6 +489,7 @@
break;
printk(KERN_ERR "spurious interrupt in
ubd_handler, "
"err = %d\n", -n);
+ reactivate_fd(thread_fd, UBD_IRQ);
return;
}



2009-01-20 05:00:24

by Jeff Dike

[permalink] [raw]
Subject: Re: [Patch] UML: spurious interrupt freezes guest

On Mon, Jan 19, 2009 at 08:53:25PM -0700, Shane Hathaway wrote:
> A new instance of user mode linux that I created over the past couple of
> days worked pretty well except that it had a habit of freezing after a
> few minutes. Every time it froze, the last message on the console was
> either:
>
> spurious interrupt in ubd_handler, err = 4

What version and what's the workload?

Jeff

2009-01-20 05:32:52

by Shane Hathaway

[permalink] [raw]
Subject: Re: [Patch] UML: spurious interrupt freezes guest

Jeff Dike wrote:
> On Mon, Jan 19, 2009 at 08:53:25PM -0700, Shane Hathaway wrote:
>> A new instance of user mode linux that I created over the past couple of
>> days worked pretty well except that it had a habit of freezing after a
>> few minutes. Every time it froze, the last message on the console was
>> either:
>>
>> spurious interrupt in ubd_handler, err = 4
>
> What version and what's the workload?

I got the spurious interrupt with both Linux 2.6.28.1 and 2.6.27.12 as
guests. The host runs 2.6.9-42.0.3.ELsmp.

I am putting OpenVPN and Asterisk inside the guest. The guest is based
on Ubuntu 8.10. The spurious interrupt happened more often when I
restricted the guest's RAM. The processes in the guest normally consume
a total of about 20-24 MB of RAM. I limited the guest's RAM to 48 MB
and gave it a 64 MB swap partition. When I gave the guest only 32 MB,
the spurious interrupt seemed to happen more often.

The best way I found to trigger the spurious interrupt was to try to
"apt-get install" many packages at once. The download would succeed,
but the guest would freeze partway through the install.

Shane