KQEMU bus errors
Hi Fabrice,
WinXP SP2 guest generates random bus errors during the login process
with kqemu module:
[dixond@localhost machine]$ sudo /opt/src/machine/winxp_boot.sh Connected to host network interface: tun0
QEMU 0.6.2 monitor - type 'help' for more information
(qemu) /opt/src/machine/winxp_boot.sh: line 2: 6633 Bus error qemu -hda winxp_hda.img -boot c -enable-audio -nics 1 -m 368 -n qemu- ifup -monitor stdio -localtime
Let me know if there is anything I can do to help debug this.
Cheers,
Signature · 1 line
Darryl Dixon <[email protected]>
I have the same experience running WinXP, SP2 image over latest CVS build of KQemu, however testing with both kernel support enabled and disabled seems to produce the same error regardless. Anyone else experiencing this with XP images?
- Julian
Quoted 24 lines · Darryl Dixon
Hi Fabrice,
WinXP SP2 guest generates random bus errors during the login
process with kqemu module:
[dixond@localhost machine]$ sudo/opt/src/machine/winxp_boot.shConnected to host network interface: tun0
QEMU 0.6.2 monitor - type 'help' for more information
(qemu)*/opt/src/machine/winxp_boot.sh: line 2: 6633 Bus error qemu -hda winxp_hda.img -boot c -enable-audio
-nics 1 -m 368 -n qemu-ifup -monitor stdio -localtime*Let me know if there is anything I can do to help debug this.
Cheers,
Signature · 8 lines
Darryl Dixon <[email protected] <mailto:[email protected]>> ------------------------------------------------------------------------ _______________________________________________ Qemu-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/qemu-devel
Yes, after further testing I too realised that it was both with and without kqemu support compiled in on latest CVS.
Cheers,
D
Quoted 43 lines · Julian Chesterfield
I have the same experience running WinXP, SP2 image over latest CVS build of KQemu, however testing with both kernel support enabled and disabled seems to produce the same error regardless. Anyone else experiencing this with XP images?
- Julian
Quoted 11 lines · Darryl Dixon
Hi Fabrice,
WinXP SP2 guest generates random bus errors during the login
process with kqemu module:
[dixond@localhost machine]$ sudo/opt/src/machine/winxp_boot.shConnected to host network interface: tun0
QEMU 0.6.2 monitor - type 'help' for more information (qemu)*/opt/src/machine/winxp_boot.sh: line 2: 6633 Bus
error qemu -hda winxp_hda.img -boot c -enable-audio
-nics 1 -m 368 -n qemu-ifup -monitor stdio -localtime*Quoted 15 lines
Let me know if there is anything I can do to help debug this.
Cheers,
Signature · 9 lines
Darryl Dixon <[email protected] <mailto:[email protected]>> ------------------------------------------------------------------------ _______________________________________________ Qemu-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/qemu-devel_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
Signature · 1 line
Darryl Dixon <[email protected]>
Yes, found the reason...
Test with different ram size - you'll be surprised...
Thanks,
Hetz
Quoted 42 lines · Julian Chesterfield
I have the same experience running WinXP, SP2 image over latest CVS build of KQemu, however testing with both kernel support enabled and disabled seems to produce the same error regardless. Anyone else experiencing this with XP images?
- Julian
Quoted 18 lines · Darryl Dixon
Hi Fabrice,
WinXP SP2 guest generates random bus errors during the login
process with kqemu module:
[dixond@localhost machine]$ sudo/opt/src/machine/winxp_boot.shConnected to host network interface: tun0
QEMU 0.6.2 monitor - type 'help' for more information (qemu)*/opt/src/machine/winxp_boot.sh: line 2: 6633 Bus
error qemu -hda winxp_hda.img -boot c -enable-audio
-nics 1 -m 368 -n qemu-ifup -monitor stdio -localtime*Let me know if there is anything I can do to help debug this.
Cheers,
--
Darryl Dixon <[email protected] <mailto:[email protected]>>Quoted 8 lines
------------------------------------------------------------------------
_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
Quoted 4 lines · Hetz Ben Hamo
Yes, found the reason...
Test with different ram size - you'll be surprised...
I second this one.
I found I had to make sure my tmpfs "partition" was larger than my requested ram size. Problem went away.
Brad
Signature · 3 lines
"Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so." -- Douglas Adams
Hi,
I'm not convinced that this is actually the case. I have tested
this on several machines now with several guest OSes and get the same result on all of them (which all previously worked). With the snapshot from 2005-02-09 all works correctly. With CVS from 2005-02-11 onwards I get the error ('Bus error' on host for WinXP guest and 'Protection Fault' inside guest for Win98 guest). I think that perhaps with smaller guest RAM size you are simply hiding the bug. On one machine at least I have 756MB physical RAM and 3GB swap allocated and get the same problem. Most of the references that I can find for a Linux 'Bus error' talk about unaligned memory accesses. I did a diff of the 2005-02-09 tree and the 2005-02-11 tree and noted that most of the *changes* (rather than additions and new things) were relating to the way that memory is handled and marked inside qemu. I think that there is a chance that one of these has introduced the problem.
Regards,
D
Quoted 10 lines · Brad Campbell
Quoted 4 lines · Hetz Ben Hamo
Yes, found the reason...
Test with different ram size - you'll be surprised...
I second this one.
I found I had to make sure my tmpfs "partition" was larger than my requested ram size. Problem went away.Brad
Signature · 1 line
Darryl Dixon <[email protected]>
Quoted 1 line · Darryl Dixon
Most of the references that I can find for a Linux 'Bus error' talk about unaligned memory accesses.
Indeed. The only way I know of to get a bus error under Linux/x86 from a user space program, is to turn on the alignment check flag in the eflags register, followed by an unaligned memory access.
Usually, this is the result from a corrupted stack, causing an invalid value to be restored to the eflags register (which coincidentally has the bit corresponding to the alignment check flag set to 1).
Jonas
Quoted 7 lines · Jonas Maebe
Quoted 2 lines · Darryl Dixon
Most of the references that I can find for a Linux 'Bus error' talk about unaligned memory accesses.
Indeed. The only way I know of to get a bus error under Linux/x86 from a user space program, is to turn on the alignment check flag in the eflags register, followed by an unaligned memory access.
I have a very vague and possibly wrong memory that the another way to get a bus error is to mmap a file into an area which is too big for the file, then read/write the area beyond the end of the file. Or perhaps that was on Solaris. In any case, it might be worth checking this isn't somehow related to mmap or use of mmap.
J
Quoted 9 lines · Julian Seward
Quoted 7 lines · Jonas Maebe
Quoted 2 lines · Darryl Dixon
Most of the references that I can find for a Linux 'Bus error' talk about unaligned memory accesses.
Indeed. The only way I know of to get a bus error under Linux/x86 from a user space program, is to turn on the alignment check flag in the eflags register, followed by an unaligned memory access.
Quoted 7 lines
I have a very vague and possibly wrong memory that the another way to get a bus error is to mmap a file into an area which is too big for the file, then read/write the area beyond the end of the file. Or perhaps that was on Solaris. In any case, it might be worth checking this isn't somehow related to mmap or use of mmap.
From man mmap(2):
"SIGBUS Attempted access to a portion of the buffer that does not correspond to the file (for example,
beyond the end of the file, including the case where
another process has truncated the file)."
So this is very probable that the errors are caused by too small limit of tmpfs mounted on /dev/shm.
Grzegorz Kulewski
[Qemu-devel] Bus errors and /dev/shm -- was: KQEMU bus errors
I'm not quite clear on why /dev/shm should affect the 2005-02-11 version and not the 2005-02-09 version of the code, but I took you at your word and tried first with qemu guest mem == size of /dev/shm, and once again received 'Bus error'. I then set qemu guest mem == 3/4 of /dev/shm and it seems to be working OK.
So, can anyone explain why the apparent regression, and why /dev/shm is used at all? I would be happier if I understood :)
Incidentally, the 'Protection Error' received by Win9x guest appears to be orthogonal to this problem and isn't fixed by the above like WinXP is.
Cheers,
D
Quoted 36 lines · Grzegorz Kulewski
Quoted 9 lines · Julian Seward
Quoted 7 lines · Jonas Maebe
Quoted 2 lines · Darryl Dixon
Most of the references that I can find for a Linux 'Bus error' talk about unaligned memory accesses.
Indeed. The only way I know of to get a bus error under Linux/x86 from a user space program, is to turn on the alignment check flag in the eflags register, followed by an unaligned memory access.
Quoted 7 lines
I have a very vague and possibly wrong memory that the another way to get a bus error is to mmap a file into an area which is too big for the file, then read/write the area beyond the end of the file. Or perhaps that was on Solaris. In any case, it might be worth checking this isn't somehow related to mmap or use of mmap.
From man mmap(2):
"SIGBUS Attempted access to a portion of the buffer that does not correspond to the file (for example,
beyond the end of the file, including the case where
another process has truncated the file)."So this is very probable that the errors are caused by too small limit of tmpfs mounted on
/dev/shm.Grzegorz Kulewski
_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
Signature · 1 line
Darryl Dixon <[email protected]>
Re: [Qemu-devel] Bus errors and /dev/shm -- was: KQEMU bus errors
Quoted 1 line · Darryl Dixon
So, can anyone explain why the apparent regression, and why
/dev/shmis used at all? I would be happier if I understood :)
The memory allocation of KQEMU-enabled QEMU binaries has changed. A temporary file representing the guest virtual memory is created in the QEMU_TMPDIR directory (defaults to "/dev/shm" if not set) and is mmaped in the QEMU process.
- Filip
Hi,
Here I experience just the opposite: with the 2005-02-12 version of QEMU + KQEMU, it is the first time I have successfully installed WinXP guest (Professional Corporate Edition, no Service Pack), and it works flawlessly.
-- Ph.
Hi,
Maybe try:
su -
ulimit -c 1024
<make it crash here - it should dump core>
gdb <path-to-qemu> core
bt
quit
and send the output.
Remember to compile qemu with -g flag if it is not compiled with it by default.
I do not know if it will bring some interesting info but I can not try it myself at the moment because I am too busy.
Grzegorz Kulewski
Quoted 39 lines · Julian Chesterfield
I have the same experience running WinXP, SP2 image over latest CVS build of KQemu, however testing with both kernel support enabled and disabled seems to produce the same error regardless. Anyone else experiencing this with XP images?
- Julian
Quoted 10 lines · Darryl Dixon
Hi Fabrice,
WinXP SP2 guest generates random bus errors during the login process
with kqemu module:
[dixond@localhost machine]$ sudo/opt/src/machine/winxp_boot.sh
Connected to host network interface: tun0
QEMU 0.6.2 monitor - type 'help' for more information
(qemu)*/opt/src/machine/winxp_boot.sh: line 2: 6633 Bus error qemu -hda winxp_hda.img -boot c -enable-audio -nics 1 -m 368 -n qemu-ifup -monitor stdio -localtime*Quoted 14 lines
Let me know if there is anything I can do to help debug this.
Cheers,
Signature · 8 lines
Darryl Dixon <[email protected] <mailto:[email protected]>> ------------------------------------------------------------------------ _______________________________________________ Qemu-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/qemu-devel_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
Quoted 7 lines
I have the same experience running WinXP, SP2 image over latest CVS build of KQemu, however testing with both kernel support enabled and disabled seems to produce the same error regardless. Anyone else experiencing this with XP images?
- Julian
Yes. Just for kicks I tried the XP SP2 installer CD too(XP SP1 CD slipstreamed to SP2+February 2005 patches, ISO not real CD). It crashes at the "formatting disk" step with all disk image types until I make ram less then /dev/shm. Then it formats OK.
Quoted 4 lines
Yes. Just for kicks I tried the XP SP2 installer CD
too(XP SP1 CD slipstreamed to SP2+February 2005 patches, ISO not real CD). It crashes at the "formatting disk" step with all disk image types until I make ram less then/dev/shm. Then it formats OK.
How do I setup the /dev/shm and with what parameters?
Thanks,
Hetz
The line from your /etc/fstab should be:
none /dev/shm tmpfs defaults 0 0
Cheers,
D
Quoted 15 lines · Hetz Ben Hamo
Quoted 4 lines
Yes. Just for kicks I tried the XP SP2 installer CD
too(XP SP1 CD slipstreamed to SP2+February 2005 patches, ISO not real CD). It crashes at the "formatting disk" step with all disk image types until I make ram less then/dev/shm. Then it formats OK.How do I setup the
/dev/shmand with what parameters?Thanks,
Hetz_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
Signature · 1 line
Darryl Dixon <[email protected]>