From owner-freebsd-emulation@FreeBSD.ORG Thu Mar 20 20:34:45 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0D791065674 for ; Thu, 20 Mar 2008 20:34:45 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from services.ipt.ru (services.ipt.ru [194.62.233.110]) by mx1.freebsd.org (Postfix) with ESMTP id AA5508FC14 for ; Thu, 20 Mar 2008 20:34:45 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from [85.173.17.72] (helo=localhost.my.domain) by services.ipt.ru with esmtpa (Exim 4.54 (FreeBSD)) id 1JcRTI-000GhA-6P; Thu, 20 Mar 2008 23:34:44 +0300 To: Juergen Lock References: <200803202015.m2KKFTBX080186@saturn.kn-bremen.de> From: Boris Samorodov Date: Thu, 20 Mar 2008 23:34:14 +0300 In-Reply-To: <200803202015.m2KKFTBX080186@saturn.kn-bremen.de> (Juergen Lock's message of "Thu\, 20 Mar 2008 21\:15\:29 +0100 \(CET\)") Message-ID: <15971785@ipt.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-emulation@freebsd.org, olli@lurza.secnetix.de Subject: Re: qemu coredumps on RELENG_7 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Mar 2008 20:34:46 -0000 On Thu, 20 Mar 2008 21:15:29 +0100 (CET) Juergen Lock wrote: > In article <200803181152.m2IBq0Ih012824@lurza.secnetix.de> you write: > >D Hill wrote: > > > Rick C. Petty wrote: > > > > Oliver Fromme wrote: > > > > > Kostik Belousov wrote: > > > > > > > > > > > > Definitely, > > > > > > kldload aio > > > > > > before running qemu. > > > > > > > > > > Thank you, that seems to solve the problem indeed. > > > > > Is that documented somewhere? It's not in the manpage. > > > > > I think it should be in the manpage ... would have > > > > > saved me quite some time. > > > > > Actually it is also documented in the pkg-message of the port(s), but > apparently nobody reads that... (OK I could patch a pointer to that > into the manpage, do other ports do that?) > > > > Nope. It should be, or at least qemu should fail to start or at least > > > > print a message instead of just randomly failing. > > > >Definitely. > > > > > > I ran into the same problem and only after spending hours trying to get it > > > > to work did I remember to kldload aio. > > > > > > I don't know if this applies. However, I found this in > > > /usr/ports/UPDATING: > > > > > > 20070206: > > > >It applies, but I think someone who installs qemu now > >isn't supposed to read UPDATING all the way back to > >February 2007. In fact, for fresh installs you should > >not have to read UPDATING _at_ _all_. > > > >Important information like this should be in the manual > >page, and -- as Rick pointed out -- the failure mode is > >pathetic. It should print a useful error message right > >at the start instead of randomly failing later. > Anyway, this was easier than I thought: (it didn't occur to me that > modfind(2) also finds modules that are statically linked into the kernel...) > Index: qemu/vl.c > @@ -8423,6 +8423,12 @@ > nb_nics = 0; > /* default mac address of the first network interface */ > > +#ifdef __FreeBSD__ > + loadmodules(0, "aio", NULL); > + if (modfind("aio") == -1) > + fprintf(stderr, "warning: aio not (kld)loaded, may cause `Invalid system call' traps on disk IO\n"); > +#endif > + > optind = 1; > for(;;) { > if (optind >= argc) > Would everybody be satisfied with this now? :) Doh! Can't say about all but sure "yes" and thanks from me! WBR -- bsam, been beaten quiet a few times with unloaded aio and strange log