From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCVtU-00078O-UM for qemu-devel@nongnu.org; Mon, 13 Jun 2016 13:43:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCVtN-0004Y8-Ha for qemu-devel@nongnu.org; Mon, 13 Jun 2016 13:43:24 -0400 Received: from 4.mo173.mail-out.ovh.net ([46.105.34.219]:34689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCVtN-0004W2-8K for qemu-devel@nongnu.org; Mon, 13 Jun 2016 13:43:17 -0400 Received: from player711.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo173.mail-out.ovh.net (Postfix) with ESMTP id 24D59FF9475 for ; Mon, 13 Jun 2016 19:43:15 +0200 (CEST) References: <1464694565-16784-1-git-send-email-clg@kaod.org> <574D9F0F.7060904@redhat.com> <574D9FBB.60100@kaod.org> <574DA17D.5070505@redhat.com> <575EDE86.6080201@kaod.org> <575EE3B7.5080209@redhat.com> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: <575EF0AC.20305@kaod.org> Date: Mon, 13 Jun 2016 19:43:08 +0200 MIME-Version: 1.0 In-Reply-To: <575EE3B7.5080209@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] m25p80: fix test on blk_pread() return value List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Peter Crosthwaite , Kevin Wolf , Max Reitz , qemu-block@nongnu.org, qemu-devel@nongnu.org On 06/13/2016 06:47 PM, Eric Blake wrote: > On 06/13/2016 10:25 AM, C=C3=A9dric Le Goater wrote: >=20 >> >> It seems that commit 243e6f69c129 ("m25p80: Switch to byte-based block= access")=20 >> is bringing another issue : >> >> qemu-system-arm: /home/legoater/work/qemu/qemu-ast2400-mainline.git/bl= ock/io.c:1252: bdrv_aligned_pwritev: Assertion `!qiov || bytes =3D=3D qio= v->size' failed. >> Aborted (core dumped) >=20 > Can you provide a more complete stack dump,=20 yes, see below.=20 > and/or a recipe on how to repeat the assertion? That's more difficult right now. The patchset I am working on is not=20 mainline. It adds the SPI controller to the ast2400 soc and it uses=20 m25p80 flash modules with -mtdblock.=20 I am trying to rebase on qemu's head to send it and I am hitting this=20 issue. So I need to find a simpler way to reproduce, with code only in mainline of course. Until then, here is a gdb backtrace. Sorry about that. Thanks, C. $ gdb /home/legoater/work/qemu/qemu-ast2400-mainline.git/install/bin/qemu= -system-arm core GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying= " and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /home/legoater/work/qemu/qemu-ast2400-mainline.git/i= nstall/bin/qemu-system-arm...done. [New LWP 662] [New LWP 1120] [New LWP 674] [New LWP 663] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1"= . Core was generated by `/home/legoater/work/qemu/qemu-ast2400-mainline.git= /install/bin/qemu-system-arm'. Program terminated with signal SIGABRT, Aborted. #0 0x00007fa818e98067 in __GI_raise (sig=3Dsig@entry=3D6) at ../nptl/sys= deps/unix/sysv/linux/raise.c:56 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007fa818e98067 in __GI_raise (sig=3Dsig@entry=3D6) at ../nptl/sys= deps/unix/sysv/linux/raise.c:56 #1 0x00007fa818e99448 in __GI_abort () at abort.c:89 #2 0x00007fa818e91266 in __assert_fail_base (fmt=3D0x7fa818fca238 "%s%s%= s:%u: %s%sAssertion `%s' failed.\n%n",=20 assertion=3Dassertion@entry=3D0x7fa81c7bffc4 "!qiov || bytes =3D=3D q= iov->size",=20 file=3Dfile@entry=3D0x7fa81c7bfaa0 "/home/legoater/work/qemu/qemu-ast= 2400-mainline.git/block/io.c",=20 line=3Dline@entry=3D1243,=20 function=3Dfunction@entry=3D0x7fa81c7c0170 <__PRETTY_FUNCTION__.34512= > "bdrv_aligned_pwritev") at assert.c:92 #3 0x00007fa818e91312 in __GI___assert_fail ( assertion=3Dassertion@entry=3D0x7fa81c7bffc4 "!qiov || bytes =3D=3D q= iov->size",=20 file=3Dfile@entry=3D0x7fa81c7bfaa0 "/home/legoater/work/qemu/qemu-ast= 2400-mainline.git/block/io.c",=20 line=3Dline@entry=3D1243,=20 function=3Dfunction@entry=3D0x7fa81c7c0170 <__PRETTY_FUNCTION__.34512= > "bdrv_aligned_pwritev") at assert.c:101 #4 0x00007fa81c6694ac in bdrv_aligned_pwritev (bs=3D0x7fa81d4dd050, req=3D= , offset=3D30878208,=20 bytes=3D512, qiov=3D0x7fa7f47fee60, flags=3D0) at /home/legoater/work/qemu/qemu-ast2400-mainline.git/block/io.c:1243 #5 0x00007fa81c669ecb in bdrv_co_pwritev (bs=3D0x7fa81d4dd050, offset=3D= 8, bytes=3D512, qiov=3D0x7fa80d5191c0,=20 flags=3D(BDRV_REQ_COPY_ON_READ | BDRV_REQ_ZERO_WRITE | BDRV_REQ_MAY_U= NMAP | BDRV_REQ_NO_SERIALISING | BDRV_REQ_FUA | unknown: 4278124256), fla= gs@entry=3D(unknown: 0)) at /home/legoater/work/qemu/qemu-ast2400-mainline.git/block/io.c:1492 #6 0x00007fa81c65e367 in blk_co_pwritev (blk=3D0x7fa81d4c5b60, offset=3D= 30878208, bytes=3D256, qiov=3D0x7fa80d5191c0,=20 flags=3D(unknown: 0)) at /home/legoater/work/qemu/qemu-ast2400-mainli= ne.git/block/block-backend.c:788 #7 0x00007fa81c65e49b in blk_aio_write_entry (opaque=3D0x7fa7e849aca0) at /home/legoater/work/qemu/qemu-ast2400-mainline.git/block/block-bac= kend.c:977 #8 0x00007fa81c6c823a in coroutine_trampoline (i0=3D, i1=3D= ) at /home/legoater/work/qemu/qemu-ast2400-mainline.git/util/coroutine-= ucontext.c:78 #9 0x00007fa818ea8f00 in ?? () from /lib/x86_64-linux-gnu/libc.so.6 #10 0x00007fa80d5189d0 in ?? () #11 0x0000000000000000 in ?? () (gdb) up 4 #4 0x00007fa81c6694ac in bdrv_aligned_pwritev (bs=3D0x7fa81d4dd050, req=3D= , offset=3D30878208,=20 bytes=3D512, qiov=3D0x7fa7f47fee60, flags=3D0) at /home/legoater/work/qemu/qemu-ast2400-mainline.git/block/io.c:1243 1243 assert(!qiov || bytes =3D=3D qiov->size); (gdb) p *qiov=20 $1 =3D {iov =3D 0x7fa81da671d0, niov =3D 1, nalloc =3D 1, size =3D 256}