* [Qemu-devel] KQEMU bus errors @ 2005-02-11 1:48 Darryl Dixon 2005-02-13 1:49 ` Julian Chesterfield 0 siblings, 1 reply; 16+ messages in thread From: Darryl Dixon @ 2005-02-11 1:48 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 565 bytes --] 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, -- Darryl Dixon <esrever_otua@pythonhacker.is-a-geek.net> [-- Attachment #2: Type: text/html, Size: 1167 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] KQEMU bus errors 2005-02-11 1:48 [Qemu-devel] KQEMU bus errors Darryl Dixon @ 2005-02-13 1:49 ` Julian Chesterfield 2005-02-13 2:17 ` Hetz Ben Hamo ` (3 more replies) 0 siblings, 4 replies; 16+ messages in thread From: Julian Chesterfield @ 2005-02-13 1:49 UTC (permalink / raw) To: qemu-devel 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 Darryl Dixon wrote: > 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, > -- > Darryl Dixon <esrever_otua@pythonhacker.is-a-geek.net > <mailto:esrever_otua@pythonhacker.is-a-geek.net>> > >------------------------------------------------------------------------ > >_______________________________________________ >Qemu-devel mailing list >Qemu-devel@nongnu.org >http://lists.nongnu.org/mailman/listinfo/qemu-devel > > ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] KQEMU bus errors 2005-02-13 1:49 ` Julian Chesterfield @ 2005-02-13 2:17 ` Hetz Ben Hamo 2005-02-13 5:14 ` Brad Campbell 2005-02-13 2:37 ` Darryl Dixon ` (2 subsequent siblings) 3 siblings, 1 reply; 16+ messages in thread From: Hetz Ben Hamo @ 2005-02-13 2:17 UTC (permalink / raw) To: qemu-devel Yes, found the reason... Test with different ram size - you'll be surprised... Thanks, Hetz On Sun, 13 Feb 2005 01:49:26 +0000, Julian Chesterfield <julian@thechesterfields.org> wrote: > 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 > > > Darryl Dixon wrote: > > > 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, > > -- > > Darryl Dixon <esrever_otua@pythonhacker.is-a-geek.net > > <mailto:esrever_otua@pythonhacker.is-a-geek.net>> > > > >------------------------------------------------------------------------ > > > >_______________________________________________ > >Qemu-devel mailing list > >Qemu-devel@nongnu.org > >http://lists.nongnu.org/mailman/listinfo/qemu-devel > > > > > > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://lists.nongnu.org/mailman/listinfo/qemu-devel > ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] KQEMU bus errors 2005-02-13 2:17 ` Hetz Ben Hamo @ 2005-02-13 5:14 ` Brad Campbell 2005-02-13 9:42 ` Darryl Dixon 0 siblings, 1 reply; 16+ messages in thread From: Brad Campbell @ 2005-02-13 5:14 UTC (permalink / raw) To: qemu-devel Hetz Ben Hamo wrote: > 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 -- "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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] KQEMU bus errors 2005-02-13 5:14 ` Brad Campbell @ 2005-02-13 9:42 ` Darryl Dixon 2005-02-13 11:13 ` Jonas Maebe 2005-02-13 12:24 ` [Qemu-devel] " Phil Krylov 0 siblings, 2 replies; 16+ messages in thread From: Darryl Dixon @ 2005-02-13 9:42 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 1355 bytes --] 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 On Sun, 2005-02-13 at 09:14 +0400, Brad Campbell wrote: > Hetz Ben Hamo wrote: > > 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 -- Darryl Dixon <esrever_otua@pythonhacker.is-a-geek.net> [-- Attachment #2: Type: text/html, Size: 2172 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] KQEMU bus errors 2005-02-13 9:42 ` Darryl Dixon @ 2005-02-13 11:13 ` Jonas Maebe 2005-02-13 14:10 ` Julian Seward 2005-02-13 12:24 ` [Qemu-devel] " Phil Krylov 1 sibling, 1 reply; 16+ messages in thread From: Jonas Maebe @ 2005-02-13 11:13 UTC (permalink / raw) To: qemu-devel On 13 feb 2005, at 10:42, Darryl Dixon wrote: > 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] KQEMU bus errors 2005-02-13 11:13 ` Jonas Maebe @ 2005-02-13 14:10 ` Julian Seward 2005-02-13 14:51 ` Grzegorz Kulewski 0 siblings, 1 reply; 16+ messages in thread From: Julian Seward @ 2005-02-13 14:10 UTC (permalink / raw) To: qemu-devel On Sunday 13 February 2005 11:13, Jonas Maebe wrote: > On 13 feb 2005, at 10:42, Darryl Dixon wrote: > > 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] KQEMU bus errors 2005-02-13 14:10 ` Julian Seward @ 2005-02-13 14:51 ` Grzegorz Kulewski 2005-02-13 20:19 ` [Qemu-devel] Bus errors and /dev/shm -- was: " Darryl Dixon 0 siblings, 1 reply; 16+ messages in thread From: Grzegorz Kulewski @ 2005-02-13 14:51 UTC (permalink / raw) To: Julian Seward; +Cc: qemu-devel On Sun, 13 Feb 2005, Julian Seward wrote: > On Sunday 13 February 2005 11:13, Jonas Maebe wrote: >> On 13 feb 2005, at 10:42, Darryl Dixon wrote: >>> 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. >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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Qemu-devel] Bus errors and /dev/shm -- was: KQEMU bus errors 2005-02-13 14:51 ` Grzegorz Kulewski @ 2005-02-13 20:19 ` Darryl Dixon 2005-02-13 22:00 ` Filip Navara 0 siblings, 1 reply; 16+ messages in thread From: Darryl Dixon @ 2005-02-13 20:19 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 2104 bytes --] 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 On Sun, 2005-02-13 at 15:51 +0100, Grzegorz Kulewski wrote: > On Sun, 13 Feb 2005, Julian Seward wrote: > > > On Sunday 13 February 2005 11:13, Jonas Maebe wrote: > >> On 13 feb 2005, at 10:42, Darryl Dixon wrote: > >>> 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. > > >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 > Qemu-devel@nongnu.org > http://lists.nongnu.org/mailman/listinfo/qemu-devel -- Darryl Dixon <esrever_otua@pythonhacker.is-a-geek.net> [-- Attachment #2: Type: text/html, Size: 3487 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] Bus errors and /dev/shm -- was: KQEMU bus errors 2005-02-13 20:19 ` [Qemu-devel] Bus errors and /dev/shm -- was: " Darryl Dixon @ 2005-02-13 22:00 ` Filip Navara 0 siblings, 0 replies; 16+ messages in thread From: Filip Navara @ 2005-02-13 22:00 UTC (permalink / raw) To: esrever_otua, qemu-devel Darryl Dixon wrote: > So, can anyone explain why the apparent regression, and why /dev/shm > is 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] KQEMU bus errors 2005-02-13 9:42 ` Darryl Dixon 2005-02-13 11:13 ` Jonas Maebe @ 2005-02-13 12:24 ` Phil Krylov 1 sibling, 0 replies; 16+ messages in thread From: Phil Krylov @ 2005-02-13 12:24 UTC (permalink / raw) To: esrever_otua, qemu-devel 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. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] KQEMU bus errors 2005-02-13 1:49 ` Julian Chesterfield 2005-02-13 2:17 ` Hetz Ben Hamo @ 2005-02-13 2:37 ` Darryl Dixon 2005-02-13 2:44 ` Grzegorz Kulewski 2005-02-21 22:24 ` [Qemu-devel] " bri3d 3 siblings, 0 replies; 16+ messages in thread From: Darryl Dixon @ 2005-02-13 2:37 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 1658 bytes --] Yes, after further testing I too realised that it was both with and without kqemu support compiled in on latest CVS. Cheers, D On Sun, 2005-02-13 at 01:49 +0000, Julian Chesterfield wrote: > 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 > > > > Darryl Dixon wrote: > > > 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, > > -- > > Darryl Dixon <esrever_otua@pythonhacker.is-a-geek.net > > <mailto:esrever_otua@pythonhacker.is-a-geek.net>> > > > >------------------------------------------------------------------------ > > > >_______________________________________________ > >Qemu-devel mailing list > >Qemu-devel@nongnu.org > >http://lists.nongnu.org/mailman/listinfo/qemu-devel > > > > > > > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://lists.nongnu.org/mailman/listinfo/qemu-devel -- Darryl Dixon <esrever_otua@pythonhacker.is-a-geek.net> [-- Attachment #2: Type: text/html, Size: 3501 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] KQEMU bus errors 2005-02-13 1:49 ` Julian Chesterfield 2005-02-13 2:17 ` Hetz Ben Hamo 2005-02-13 2:37 ` Darryl Dixon @ 2005-02-13 2:44 ` Grzegorz Kulewski 2005-02-21 22:24 ` [Qemu-devel] " bri3d 3 siblings, 0 replies; 16+ messages in thread From: Grzegorz Kulewski @ 2005-02-13 2:44 UTC (permalink / raw) To: Julian Chesterfield; +Cc: qemu-devel 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 On Sun, 13 Feb 2005, Julian Chesterfield wrote: > 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 > > > > Darryl Dixon wrote: > >> 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, >> -- >> Darryl Dixon <esrever_otua@pythonhacker.is-a-geek.net >> <mailto:esrever_otua@pythonhacker.is-a-geek.net>> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Qemu-devel mailing list >> Qemu-devel@nongnu.org >> http://lists.nongnu.org/mailman/listinfo/qemu-devel >> >> > > > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://lists.nongnu.org/mailman/listinfo/qemu-devel > ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Qemu-devel] Re: KQEMU bus errors 2005-02-13 1:49 ` Julian Chesterfield ` (2 preceding siblings ...) 2005-02-13 2:44 ` Grzegorz Kulewski @ 2005-02-21 22:24 ` bri3d 2005-02-21 23:04 ` Hetz Ben Hamo 3 siblings, 1 reply; 16+ messages in thread From: bri3d @ 2005-02-21 22:24 UTC (permalink / raw) To: qemu-devel > > 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. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] Re: KQEMU bus errors 2005-02-21 22:24 ` [Qemu-devel] " bri3d @ 2005-02-21 23:04 ` Hetz Ben Hamo 2005-02-21 23:30 ` Darryl Dixon 0 siblings, 1 reply; 16+ messages in thread From: Hetz Ben Hamo @ 2005-02-21 23:04 UTC (permalink / raw) To: qemu-devel > 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] Re: KQEMU bus errors 2005-02-21 23:04 ` Hetz Ben Hamo @ 2005-02-21 23:30 ` Darryl Dixon 0 siblings, 0 replies; 16+ messages in thread From: Darryl Dixon @ 2005-02-21 23:30 UTC (permalink / raw) To: qemu-devel, Hetz Ben Hamo [-- Attachment #1: Type: text/plain, Size: 712 bytes --] The line from your /etc/fstab should be: none /dev/shm tmpfs defaults 0 0 Cheers, D On Tue, 2005-02-22 at 01:04 +0200, Hetz Ben Hamo wrote: >> 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 > > >_______________________________________________ >Qemu-devel mailing list >Qemu-devel@nongnu.org >http://lists.nongnu.org/mailman/listinfo/qemu-devel -- Darryl Dixon <esrever_otua@pythonhacker.is-a-geek.net> [-- Attachment #2: Type: text/html, Size: 1683 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2005-02-21 23:52 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-02-11 1:48 [Qemu-devel] KQEMU bus errors Darryl Dixon 2005-02-13 1:49 ` Julian Chesterfield 2005-02-13 2:17 ` Hetz Ben Hamo 2005-02-13 5:14 ` Brad Campbell 2005-02-13 9:42 ` Darryl Dixon 2005-02-13 11:13 ` Jonas Maebe 2005-02-13 14:10 ` Julian Seward 2005-02-13 14:51 ` Grzegorz Kulewski 2005-02-13 20:19 ` [Qemu-devel] Bus errors and /dev/shm -- was: " Darryl Dixon 2005-02-13 22:00 ` Filip Navara 2005-02-13 12:24 ` [Qemu-devel] " Phil Krylov 2005-02-13 2:37 ` Darryl Dixon 2005-02-13 2:44 ` Grzegorz Kulewski 2005-02-21 22:24 ` [Qemu-devel] " bri3d 2005-02-21 23:04 ` Hetz Ben Hamo 2005-02-21 23:30 ` Darryl Dixon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).