All of lore.kernel.org
 help / color / mirror / Atom feed
* Windows Bug Check 0x101 issue
@ 2008-03-24  9:53 Kouya Shimura
  2008-03-24 11:01 ` Samuel Thibault
  2008-03-24 11:05 ` Keir Fraser
  0 siblings, 2 replies; 22+ messages in thread
From: Kouya Shimura @ 2008-03-24  9:53 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: message body text --]
[-- Type: text/plain, Size: 978 bytes --]

Hi,

Qemu-dm might be blocked with fsync system call over 3 seconds
when the dom0 is overloaded.

It causes SMP Windows 2008 crashes with Bug Check 0x101.
0x101 indicates that an expected clock interrupt on a secondary
processor, in a multi-processor system, was not received within
the allocated interval.

It can be easily reproduced with the following modification:

diff -r 76c9cf11ce23 tools/ioemu/block-raw.c
--- a/tools/ioemu/block-raw.c	Fri Mar 21 09:45:34 2008 +0000
+++ b/tools/ioemu/block-raw.c	Mon Mar 24 16:28:16 2008 +0900
@@ -603,6 +603,11 @@ static void raw_flush(BlockDriverState *
 static void raw_flush(BlockDriverState *bs)
 {
     BDRVRawState *s = bs->opaque;
+#if 1 /* reproduce Windows Bug Check 0x101 */
+    extern int send_vcpu;
+    if (send_vcpu != 0)
+	sleep(4);
+#endif
     fsync(s->fd);
 }
 
An attached patch fixes it. However I think the root cause is
that a timer event can't interrupt an i/o emulation.
How should we fix it?

Thanks,
Kouya


[-- Attachment #2: sample_fix.patch --]
[-- Type: text/plain, Size: 825 bytes --]

diff -r 76c9cf11ce23 tools/ioemu/block-raw.c
--- a/tools/ioemu/block-raw.c	Fri Mar 21 09:45:34 2008 +0000
+++ b/tools/ioemu/block-raw.c	Mon Mar 24 17:56:19 2008 +0900
@@ -496,6 +496,10 @@ static void raw_aio_cancel(BlockDriverAI
         pacb = &acb->next;
     }
 }
+
+static void aio_fsync_cb(void *opague, int ret)
+{
+}
 #endif
 
 static void raw_close(BlockDriverState *bs)
@@ -602,8 +606,20 @@ static int raw_create(const char *filena
 
 static void raw_flush(BlockDriverState *bs)
 {
+#ifdef NO_AIO
     BDRVRawState *s = bs->opaque;
     fsync(s->fd);
+#else
+    RawAIOCB *acb;
+
+    acb = raw_aio_setup(bs, 0, NULL, 0, aio_fsync_cb, NULL);
+    if (!acb)
+        return;
+    if (aio_fsync(O_SYNC, &acb->aiocb) < 0) {
+        qemu_aio_release(acb);
+        return;
+    }
+#endif
 }
 
 BlockDriver bdrv_raw = {

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2008-03-28  9:32 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-24  9:53 Windows Bug Check 0x101 issue Kouya Shimura
2008-03-24 11:01 ` Samuel Thibault
2008-03-24 11:05 ` Keir Fraser
2008-03-25 10:54   ` Kouya Shimura
2008-03-25 10:59     ` Keir Fraser
2008-03-25 11:28     ` Ian Jackson
2008-03-25 17:57       ` Samuel Thibault
2008-03-26  7:07         ` Kouya Shimura
2008-03-26 10:13           ` Samuel Thibault
2008-03-26 10:29           ` Ian Jackson
2008-03-26 10:27             ` Alan Cox
2008-03-26 10:51               ` Ian Jackson
2008-03-26 12:34                 ` Alan Cox
2008-03-26 14:18                   ` Ian Jackson
2008-03-26 10:39             ` Ian Jackson
2008-03-27  5:20             ` Kouya Shimura
2008-03-27  9:08               ` Alan Cox
2008-03-27 16:34                 ` Ian Jackson
2008-03-27 16:30                   ` Alan Cox
2008-03-27 17:39               ` Ian Jackson
2008-03-28  3:09                 ` Kouya Shimura
     [not found]                 ` <87k5jnl7qt.fsf@basil.nowhere.org>
2008-03-28  9:32                   ` Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.