From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29FE7C433E7 for ; Fri, 16 Oct 2020 18:06:14 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3DA8A208E4 for ; Fri, 16 Oct 2020 18:06:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VBi/XqYx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3DA8A208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49870 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTU7H-00006Y-Ox for qemu-devel@archiver.kernel.org; Fri, 16 Oct 2020 14:06:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47024) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTU5Z-000857-Ee for qemu-devel@nongnu.org; Fri, 16 Oct 2020 14:04:25 -0400 Received: from mail-vk1-xa2c.google.com ([2607:f8b0:4864:20::a2c]:33981) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kTU5X-0005e3-EE for qemu-devel@nongnu.org; Fri, 16 Oct 2020 14:04:25 -0400 Received: by mail-vk1-xa2c.google.com with SMTP id l23so849122vkm.1 for ; Fri, 16 Oct 2020 11:04:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=TKNMkNQYD5YnUlHeNOn6D71oHuVuWz5gNV4wr6TlkcQ=; b=VBi/XqYx4yBAT9GGZAzS4ZLyMEaYoLP4IuffC16cW9+Xo8HXbKfN/4jfoegc2qGZnx CzM9sA8r4Uu4E+iRbXSSg07ReCKwgKl8wo2DZnPK/SKxvcpQDAvx7KprdOcDqxq0/yED Mnb6Fy7OwNEdTDwWvWp8eT3FpBYSc+haejI0XS/l/ZIxKnfA++c8MDLNWojdZ24gEVK5 I9OVlFPX5ZbC5O+gdM5XsJy5yS7cDkQL296I5yjiMw7QgGUa7PpsQvslmPLHiApWFzIL Vk7ISgk7mgUeZGQv98VNJE/n2/D7hYfZBmTOTzltQvVFYNdCYFPhIQVv3G2j60QhPupI 5foQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=TKNMkNQYD5YnUlHeNOn6D71oHuVuWz5gNV4wr6TlkcQ=; b=owmxh0wTHaNXkCO67xeeIYalCoGkvm1G9OqbI3Gk7fvtRM7H4650aYUIbj51Rk63xO dZIN4eJ2A/haEAI43w0g8LBFfxA4IWLkFnUIljd5tttkcY9IWmAkrOz8P+DYk9JctcB3 KGWNrvpOlQaHvT/6C5BEYbOiof/ZZO0QfXMHWdREc/Be4aljQsSO0l5V2YZfaXO3HfOs X0pi9WHBPjxXi8LTeZrsAOY27P3mcm2sBrcMPx7P+zY3ThwQ66sRzZ4asuqUHhnHYE1T wI7AOK4bGvF0gE+FaJwthixqCtZ90oQFHWxAyXSbokeezMf/nhOZq1NY7R6628Od0cjI jCFQ== X-Gm-Message-State: AOAM5335sRjFoth1tJpq8HibKoibEf93dws2FZbncFUWSnqFEZ31sB6A s4qiLM7L9uknGiVAwtqOO8RqMNfbxZWRX903/4M= X-Google-Smtp-Source: ABdhPJyxmfc10Jf/mWmIWMCOjaf1rTqrOLpefJM2BAVradxnD/By32suMTNaCkHEO5n8QBalC2yBVfkPqmfiFpQ2F2g= X-Received: by 2002:a1f:2389:: with SMTP id j131mr3493742vkj.18.1602871461704; Fri, 16 Oct 2020 11:04:21 -0700 (PDT) MIME-Version: 1.0 References: <20201001085900.ms5ix2zyoid7v3ra@steredhat> <20201002073457.jzkmefo5c65zlka7@steredhat> In-Reply-To: <20201002073457.jzkmefo5c65zlka7@steredhat> From: Ju Hyung Park Date: Sat, 17 Oct 2020 03:04:10 +0900 Message-ID: Subject: Re: io_uring possibly the culprit for qemu hang (linux-5.4.y) To: Jens Axboe , Stefano Garzarella Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::a2c; envelope-from=qkrwngud825@gmail.com; helo=mail-vk1-xa2c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -7 X-Spam_score: -0.8 X-Spam_bar: / X-Spam_report: (-0.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HK_RANDOM_ENVFROM=0.001, HK_RANDOM_FROM=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: io-uring@vger.kernel.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" A small update: As per Stefano's suggestion, disabling io_uring support from QEMU from the configuration step did fix the problem and I'm no longer having hangs. Looks like it __is__ an io_uring issue :( Btw, I used liburing fe50048 for linking QEMU. Thanks. On Fri, Oct 2, 2020 at 4:35 PM Stefano Garzarella wro= te: > > Hi Ju, > > On Thu, Oct 01, 2020 at 11:30:14PM +0900, Ju Hyung Park wrote: > > Hi Stefano, > > > > On Thu, Oct 1, 2020 at 5:59 PM Stefano Garzarella = wrote: > > > Please, can you share the qemu command line that you are using? > > > This can be useful for the analysis. > > > > Sure. > > Thanks for sharing. > > The issue seems related to io_uring and the new io_uring fd monitoring > implementation available from QEMU 5.0. > > I'll try to reproduce. > > For now, as a workaround, you can rebuild qemu by disabling io-uring supp= ort: > > ../configure --disable-linux-io-uring ... > > > Thanks, > Stefano > > > > > QEMU: > > /usr/bin/qemu-system-x86_64 -name guest=3Dwin10,debug-threads=3Don -S > > -object secret,id=3DmasterKey0,format=3Draw,file=3D/var/lib/libvirt/qem= u/domain-1-win10/master-key.aes > > -blockdev {"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.fd","n= ode-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"= } > > -blockdev {"node-name":"libvirt-pflash0-format","read-only":true,"drive= r":"raw","file":"libvirt-pflash0-storage"} > > -blockdev {"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/win1= 0_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"dis= card":"unmap"} > > -blockdev {"node-name":"libvirt-pflash1-format","read-only":false,"driv= er":"raw","file":"libvirt-pflash1-storage"} > > -machine pc-q35-5.0,accel=3Dkvm,usb=3Doff,vmport=3Doff,dump-guest-core= =3Doff,mem-merge=3Doff,pflash0=3Dlibvirt-pflash0-format,pflash1=3Dlibvirt-p= flash1-format > > -cpu Skylake-Client-IBRS,ss=3Don,vmx=3Don,hypervisor=3Don,tsc-adjust=3D= on,clflushopt=3Don,umip=3Don,md-clear=3Don,stibp=3Don,arch-capabilities=3Do= n,ssbd=3Don,xsaves=3Don,pdpe1gb=3Don,ibpb=3Don,amd-ssbd=3Don,fma=3Doff,avx= =3Doff,f16c=3Doff,rdrand=3Doff,bmi1=3Doff,hle=3Doff,avx2=3Doff,bmi2=3Doff,r= tm=3Doff,rdseed=3Doff,adx=3Doff,hv-time,hv-relaxed,hv-vapic,hv-spinlocks=3D= 0x1fff,hv-vpindex,hv-runtime,hv-synic,hv-stimer,hv-reset > > -m 8192 -mem-prealloc -mem-path /dev/hugepages/libvirt/qemu/1-win10 > > -overcommit mem-lock=3Doff -smp 4,sockets=3D1,dies=3D1,cores=3D2,thread= s=3D2 > > -uuid 7ccc3031-1dab-4267-b72a-d60065b5ff7f -display none > > -no-user-config -nodefaults -chardev > > socket,id=3Dcharmonitor,fd=3D32,server,nowait -mon > > chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol -rtc > > base=3Dlocaltime,driftfix=3Dslew -global kvm-pit.lost_tick_policy=3Ddel= ay > > -no-hpet -no-shutdown -global ICH9-LPC.disable_s3=3D1 -global > > ICH9-LPC.disable_s4=3D1 -boot menu=3Doff,strict=3Don -device > > pcie-root-port,port=3D0x8,chassis=3D1,id=3Dpci.1,bus=3Dpcie.0,multifunc= tion=3Don,addr=3D0x1 > > -device pcie-root-port,port=3D0x9,chassis=3D2,id=3Dpci.2,bus=3Dpcie.0,a= ddr=3D0x1.0x1 > > -device pcie-root-port,port=3D0xa,chassis=3D3,id=3Dpci.3,bus=3Dpcie.0,a= ddr=3D0x1.0x2 > > -device pcie-root-port,port=3D0xb,chassis=3D4,id=3Dpci.4,bus=3Dpcie.0,a= ddr=3D0x1.0x3 > > -device pcie-pci-bridge,id=3Dpci.5,bus=3Dpci.2,addr=3D0x0 -device > > qemu-xhci,id=3Dusb,bus=3Dpci.1,addr=3D0x0 -blockdev > > {"driver":"host_device","filename":"/dev/disk/by-partuuid/05c3750b-060f= -4703-95ea-6f5e546bf6e9","node-name":"libvirt-1-storage","cache":{"direct":= false,"no-flush":true},"auto-read-only":true,"discard":"unmap"} > > -blockdev {"node-name":"libvirt-1-format","read-only":false,"discard":"= unmap","detect-zeroes":"unmap","cache":{"direct":false,"no-flush":true},"dr= iver":"raw","file":"libvirt-1-storage"} > > -device virtio-blk-pci,scsi=3Doff,bus=3Dpcie.0,addr=3D0xa,drive=3Dlibvi= rt-1-format,id=3Dvirtio-disk0,bootindex=3D1,write-cache=3Don > > -netdev tap,fd=3D34,id=3Dhostnet0 -device > > e1000,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:00:c6:bb:bc,bus=3Dpcie.0,= addr=3D0x3 > > -device ich9-intel-hda,id=3Dsound0,bus=3Dpcie.0,addr=3D0x4 -device > > hda-duplex,id=3Dsound0-codec0,bus=3Dsound0.0,cad=3D0 -device > > vfio-pci,host=3D0000:00:02.0,id=3Dhostdev0,bus=3Dpcie.0,addr=3D0x2,romb= ar=3D0 > > -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpcie.0,addr=3D0x8 -objec= t > > rng-random,id=3Dobjrng0,filename=3D/dev/urandom -device > > virtio-rng-pci,rng=3Dobjrng0,id=3Drng0,bus=3Dpcie.0,addr=3D0x9 -msg > > timestamp=3Don > > > > And I use libvirt 6.3.0 to manage the VM. Here's an xml of my VM. > > > > > > win10 > > 7ccc3031-1dab-4267-b72a-d60065b5ff7f > > > > > xmlns:libosinfo=3D"http://libosinfo.org/xmlns/libvirt/domain/1.0"> > > > > > > > > 8388608 > > 8388608 > > > > > > > > > > 4 > > > > > > > > > > > > > > > > hvm > > /usr/share/OVMF/OVMF_CODE.= fd > > /var/lib/libvirt/qemu/nvram/win10_VARS.fd > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > destroy > > restart > > destroy > > > > > > > > > > > > /usr/bin/qemu-system-x86_64 > > > > > detect_zeroes=3D"unmap"/> > > > > > >
> function=3D"0x0"/> > > > > > > > > > > > >
> function=3D"0x0" multifunction=3D"on"/> > > > > > > > > > >
> function=3D"0x1"/> > > > > > > > > > >
> function=3D"0x2"/> > > > > > > > > > >
> function=3D"0x3"/> > > > > > > > >
> function=3D"0x0"/> > > > > > >
> function=3D"0x0"/> > > > > > >
> function=3D"0x2"/> > > > > > > > > > > > >
> function=3D"0x0"/> > > > > > > > > > >
> function=3D"0x0"/> > > > > > > > >
> > > > > >
> function=3D"0x0"/> > > > > > >
> function=3D"0x0"/> > > > > > > /dev/urandom > >
> function=3D"0x0"/> > > > > > > > > >