From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= Subject: Re: Double gnttab_end_access in mini-os netfront Date: Tue, 8 Dec 2015 12:46:31 +0100 Message-ID: <20151208114631.GM960@mail-itl> References: <20151206021957.GB15506@mail-itl> <1449574429.16124.56.camel@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8530207179994389184==" Return-path: In-Reply-To: <1449574429.16124.56.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: minios-devel@lists.xenproject.org, Samuel Thibault , Martin Lucina , xen-devel List-Id: xen-devel@lists.xenproject.org --===============8530207179994389184== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="37nyS7qXrnu4wN2o" Content-Disposition: inline --37nyS7qXrnu4wN2o Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 08, 2015 at 11:33:49AM +0000, Ian Campbell wrote: > On Sun, 2015-12-06 at 03:19 +0100, Marek Marczykowski-G=C3=B3recki wrote: > > Hi, > >=20 > > When running HVM on Xen 4.6 with qemu in stubdom, I've found that > > something goes wrong with disk frontend (at least that was visible > > problem - a lot of read and write errors in stubdom log). But further > > debugging (including -DGNT_DEBUG) leads to double gnttab_end_access in > > netfront.=20 > >=20 > > The stack trace is: > > ASSERTION FAILED: !(!inuse[ref]) at gnttab.c:42. > > Do_exit called! > > 0x00000000000f3ffb: get_time_values_from_xen at xen-4.6.0/extras/mini- > > os/arch/x86/time.c:134 (discriminator 1) > > 0x00000000000d74a8: HYPERVISOR_sched_op at xen-4.6.0/extras/mini- > > os/include/x86/x86_64/hypercall-x86_64.h:180 > > 0x00000000000d6a2e: put_free_entry at xen-4.6.0/extras/mini- > > os/gnttab.c:43 > > 0x00000000000d6bff: gnttab_end_access at xen-4.6.0/extras/mini- > > os/gnttab.c:115 > > 0x00000000000d8a50: network_rx at xen-4.6.0/extras/mini-os/netfront.c:1= 34 > > 0x00000000000d9ec4: netfront_receive at xen-4.6.0/extras/mini- > > os/netfront.c:671 > > 0x00000000000dd302: get_current at xen-4.6.0/extras/mini- > > os/include/x86/arch_sched.h:16 > > 0x0000000000079f72: tap_send at xen-4.6.0/stubdom/../tools/qemu-xen- > > traditional/net.c:756 > > 0x00000000000069f9: main_loop_wait at xen-4.6.0/stubdom/../tools/qemu- > > xen-traditional/vl.c:3826 > > 0x0000000000021f27: main_loop at xen-4.6.0/stubdom/../tools/qemu-xen- > > traditional/i386-dm/helper2.c:612 (discriminator 1) > > 0x000000000000950d: quit_timers at xen-4.6.0/stubdom/../tools/qemu-xen- > > traditional/vl.c:1866 > > 0x00000000000d7f57: call_main at xen-4.6.0/extras/mini-os/main.c:163 > > 0x0000000000003423: thread_starter at :? > > 0x0000000000000000: _start at ??:? > >=20 > > It was working in Xen 4.4. The only commit touching xenfront.c (in any > > meaningful way) from that time is this one: > > http://xenbits.xen.org/gitweb/?p=3Dmini-os.git;a=3Dcommit;h=3D7c8f34839= 0652a67e > > 9356eec9cd2b0f76a9c7c72 > >=20 > > With that commit reverted, issue vanishes. > >=20 > > I guess it's because before this commit, there was "if (rx->status =3D= =3D > > NETIF_RSP_NULL) continue" before "gnttab_end_access(buf->gref)", but now > > that case is handled after gnttab_end_access (using "if (rx->status > > > NETIF_RSP_NULL)"). I think the fix would be to restore that "continue" > > line. >=20 > That sounds pretty plausible to me (FWIW). Have you tried it? I've tried moving gnttab_end_access into that if branch. And it didn't worked. > > PS What is the correct place for such reports? minios-devel? xen-devel? > > both? >=20 > Formally I suppose the former, but realistically including xen-devel as > well is likely to attract more eyes. >=20 > Ian. --=20 Best Regards, Marek Marczykowski-G=C3=B3recki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --37nyS7qXrnu4wN2o Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWZsMXAAoJENuP0xzK19cs+CUH/i0/DX1qC/th9scl//05k9Es JaNU+6A+hAvKCrT2OdJsDL3wMkEsLpwm3xitvr7eNUkKRfXiB7EI3ijxp+xpCtoa s6/IU9Y2xwdUxOeNNQ6VfudzCnhmSMGVAE5nrMcj3jQ8F4W+PmQkd4HDagWutSIo zlDVhbPx+XrBZBCaJMZBpEReh29DdwJ+C41Bww1vYeipqwxmaLlkcOrVyzIR3fYQ ytJFwDBSPIX/h0Tg6YGzRDzWQRixYqWHP1szhPyyGImNmL1xiBPsOE5IP8daYzCl XwI5tf4Oi13+SBQwXPaZ2fQ0wvXugpblVf5OKxiaRsTMagJ/kWuOSP9vQWAqJ/c= =YBH6 -----END PGP SIGNATURE----- --37nyS7qXrnu4wN2o-- --===============8530207179994389184== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============8530207179994389184==--