From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D0Qs0-0004kV-GR for qemu-devel@nongnu.org; Sun, 13 Feb 2005 16:01:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D0Qkp-0003VD-Ge for qemu-devel@nongnu.org; Sun, 13 Feb 2005 15:54:16 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D0Qkl-0003Pk-Oi for qemu-devel@nongnu.org; Sun, 13 Feb 2005 15:54:03 -0500 Received: from [65.19.178.186] (helo=pythonhacker.is-a-geek.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D0QDb-0006L6-29 for qemu-devel@nongnu.org; Sun, 13 Feb 2005 15:19:47 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by pythonhacker.is-a-geek.net (Postfix) with ESMTP id BC118403D4 for ; Sun, 13 Feb 2005 15:19:45 -0500 (EST) Received: from pythonhacker.is-a-geek.net ([127.0.0.1]) by localhost (pythonhacker.is-a-geek.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 03360-06 for ; Sun, 13 Feb 2005 15:19:23 -0500 (EST) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by pythonhacker.is-a-geek.net (Postfix) with ESMTP id 12E33403CF for ; Sun, 13 Feb 2005 15:19:21 -0500 (EST) From: Darryl Dixon In-Reply-To: References: <1108086522.5629.11.camel@localhost.localdomain> <1108287757.7619.7.camel@localhost.localdomain> <5538008c78eb9d182d41f6d73c7dbbc3@elis.ugent.be> <200502131410.22636.jseward@acm.org> Content-Type: multipart/alternative; boundary="=-Hr0b9J71OlBnK34QBjrz" Date: Mon, 14 Feb 2005 09:19:19 +1300 Message-Id: <1108325959.14612.5.camel@localhost.localdomain> Mime-Version: 1.0 Subject: [Qemu-devel] Bus errors and /dev/shm -- was: KQEMU bus errors Reply-To: esrever_otua@pythonhacker.is-a-geek.net, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --=-Hr0b9J71OlBnK34QBjrz Content-Type: text/plain Content-Transfer-Encoding: 7bit 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 --=-Hr0b9J71OlBnK34QBjrz Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit 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>
--=-Hr0b9J71OlBnK34QBjrz--