From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpYWn-0006ZU-Tg for qemu-devel@nongnu.org; Thu, 29 Sep 2016 06:25:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpYWk-0004ME-U3 for qemu-devel@nongnu.org; Thu, 29 Sep 2016 06:25:20 -0400 Date: Thu, 29 Sep 2016 12:25:07 +0200 From: Kevin Wolf Message-ID: <20160929102507.GD5742@noname.redhat.com> References: <1474984441-28516-1-git-send-email-kwolf@redhat.com> <20160928093744.GH5236@noname.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PULL 00/18] Block layer patches List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Qemu-block , QEMU Developers , pl@kamp.de, jsnow@redhat.com Am 28.09.2016 um 21:03 hat Peter Maydell geschrieben: > On 28 September 2016 at 02:37, Kevin Wolf wrote: > > Am 27.09.2016 um 21:42 hat Peter Maydell geschrieben: > >> On 27 September 2016 at 06:53, Kevin Wolf wrote: > >> > The following changes since commit 7cfdc02dae0d2ff58c897496cfdbbafc0eda0f3f: > >> > > >> > Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2016-09-26 19:47:00 +0100) > >> > > >> > are available in the git repository at: > >> > > >> > > >> > git://repo.or.cz/qemu/kevin.git tags/for-upstream > >> > > >> > for you to fetch changes up to 3b856cebe5e93547852c156ca2119d075e62aed7: > >> > > >> > coroutine: reduce stack size to 60kB (2016-09-27 14:05:21 +0200) > >> > > >> > ---------------------------------------------------------------- > >> > Block layer patches > >> > > >> > ---------------------------------------------------------------- > >> > >> I see 'make check' failures on x86-64 host, clang Linux: > >> > >> /i386/ahci/migrate/ncq/simple: OK > >> /i386/ahci/migrate/ncq/halted: OK > >> /i386/ahci/cdrom/dma/single: OK > >> /i386/ahci/cdrom/dma/multi: OK > >> /i386/ahci/cdrom/pio/single: > >> Broken pipe > >> FAIL > >> GTester: last random seed: R02Sa8f729848b07c3b3e5ee67368f9d0350 > >> (pid=10590) > >> /i386/ahci/cdrom/pio/multi: > >> Broken pipe > >> FAIL > >> GTester: last random seed: R02Se85704e04bbd382223983c878723b811 > >> (pid=10598) > >> FAIL: tests/ahci-test > >> TEST: tests/hd-geo-test... (pid=10601) > >> /i386/hd-geo/ide/none: OK > > > > I asked on IRC, but as you don't seem to be around at the moment, I'll > > keep things on the list instead. > > I got a gdb backtrace: > > Thread 1 "qemu-system-i38" received signal SIGSEGV, Segmentation fault. > 0x00005555561dea15 in address_space_translate (as=0x55555a46bfc0, > addr=1106048, xlat=0x7ffff7e0d050, plen=0x7ffff7e0d058, > is_write=false) at /home/petmay01/linaro/qemu-for-merges/exec.c:423 > 423 { > > > Backtrace suggests we've run out of stack due to some infinite > recursion: Thanks, Peter, this is useful. The series contains a patch that reduces the coroutine stack size, so I guess it's not quite infinite, but pretty deep recursion anyway. I will drop that final patch that reduces the stack size and hope that the rest will pass your testing (I tried some more to reproduce it, but I still didn't manage to). John, can you have a look at the IDE code and check whether we can get rid of the deep recursion? It seems that the test issues a large request that is then split into many small requests. But it should be possible to do this iteratively rather than recursively. Kevin > #0 0x00005555561dea15 in address_space_translate (as=0x55555a46bfc0, > addr=1106048, xlat=0x7ffff7e0d050, plen=0x7ffff7e0d058, > is_write=false) at /home/petmay01/linaro/qemu-for-merges/exec.c:423 > #1 0x00005555561edeab in address_space_map (as=, > addr=1106048, plen=, is_write=false) > at /home/petmay01/linaro/qemu-for-merges/exec.c:2909 > #2 0x0000555556840b9b in ahci_populate_sglist (as=0x55555a46bfc0, > addr=1106048, dir=DMA_DIRECTION_TO_DEVICE, len=) > at /home/petmay01/linaro/qemu-for-merges/include/sysemu/dma.h:135 > #3 0x0000555556840b9b in ahci_populate_sglist (ad=, > sglist=, cmd=, limit=, > offset=1592) at > /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:863 > #4 0x0000555556844de4 in ahci_dma_prepare_buf (dma=0x55555a475b48, > limit=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1366 > #5 0x000055555684354c in ahci_start_transfer (dma=) at > /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1295 > #6 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #7 0x0000555556843662 in ahci_start_transfer (dma=) at > /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #8 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #9 0x0000555556843662 in ahci_start_transfer (dma=) at > /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #10 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #11 0x0000555556843662 in ahci_start_transfer (dma=) at > /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #12 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #13 0x0000555556843662 in ahci_start_transfer (dma=) at > /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #14 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #15 0x0000555556843662 in ahci_start_transfer (dma=) at > /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #16 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #17 0x0000555556843662 in ahci_start_transfer (dma=) at > /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #18 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #19 0x0000555556843662 in ahci_start_transfer (dma=) at > /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #20 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #21 0x0000555556843662 in ahci_start_transfer (dma=) at > /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #22 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #23 0x0000555556843662 in ahci_start_transfer (dma=) at > /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #24 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #25 0x0000555556843662 in ahci_start_transfer (dma=) at > /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #26 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #27 0x0000555556843662 in ahci_start_transfer (dma=) at > /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #28 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #29 0x0000555556843662 in ahci_start_transfer (dma=) at > /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #30 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #31 0x0000555556843662 in ahci_start_transfer (dma=) at > /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #32 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #33 0x0000555556843662 in ahci_start_transfer (dma=) at > /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #34 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #35 0x0000555556843662 in ahci_start_transfer (dma=) at > /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #36 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #37 0x0000555556843662 in ahci_start_transfer (dma=) at > /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #38 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #39 0x0000555556843662 in ahci_start_transfer (dma=) at > /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #40 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #41 0x0000555556843662 in ahci_start_transfer (dma=) at > /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > > [skip a lot of repeated stack frames] > > #393 0x0000555556843662 in ahci_start_transfer (dma=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #394 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #395 0x0000555556843662 in ahci_start_transfer (dma=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #396 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #397 0x0000555556843662 in ahci_start_transfer (dma=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #398 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #399 0x0000555556843662 in ahci_start_transfer (dma=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #400 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #401 0x0000555556843662 in ahci_start_transfer (dma=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #402 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #403 0x0000555556843662 in ahci_start_transfer (dma=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:1318 > #404 0x00005555568250cb in ide_atapi_cmd_reply_end (s=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/atapi.c:324 > #405 0x0000555556809cfc in ide_buffered_readv_cb > (opaque=0x5555594f57e0, ret=) > at /home/petmay01/linaro/qemu-for-merges/hw/ide/core.c:605 > #406 0x0000555556df7f73 in blk_aio_complete (acb=0x55555a4387c0) at > /home/petmay01/linaro/qemu-for-merges/block/block-backend.c:943 > #407 0x0000555556f676f1 in coroutine_trampoline (i0=, > i1=) > at /home/petmay01/linaro/qemu-for-merges/util/coroutine-ucontext.c:79 > #408 0x00007fffdca05590 in __start_context () at /lib/x86_64-linux-gnu/libc.so.6 > #409 0x00007fffffffc318 in () > #410 0x0000000000000000 in () > > > thanks > -- PMM