From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id E01971559 for ; Wed, 12 Sep 2018 05:47:27 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1D11E40216EB; Wed, 12 Sep 2018 03:47:27 +0000 (UTC) Received: from [10.72.12.130] (ovpn-12-130.pek2.redhat.com [10.72.12.130]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7263242200; Wed, 12 Sep 2018 03:47:23 +0000 (UTC) To: dev@dpdk.org Cc: Tiwei Bie , Maxime Coquelin From: Jason Wang Message-ID: <00d05c3f-ae58-7731-5473-8c1657e53100@redhat.com> Date: Wed, 12 Sep 2018 11:47:20 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 12 Sep 2018 03:47:27 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 12 Sep 2018 03:47:27 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jasowang@redhat.com' RCPT:'' Subject: [dpdk-dev] Deadlock when start virtio_user + vhost_kernel X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2018 03:47:28 -0000 Hi: Try to launch virtio_user + vhost_kernel with: testpmd --vdev=virtio_user0,path=/dev/vhost-net -- -i It seems we get a deadlock on rte_rwlock_read_lock(&mcfg->memory_hotplug_lock) calltrace: Thread 1 "testpmd" received signal SIGINT, Interrupt. rte_memseg_contig_walk (func=func@entry=0x555555a5e630 , arg=arg@entry=0x7fffffffcec0)     at /home/devel/git/dpdk/lib/librte_eal/common/eal_common_memory.c:469 469 rte_rwlock_read_lock(&mcfg->memory_hotplug_lock); (gdb) bt #0  rte_memseg_contig_walk (func=func@entry=0x555555a5e630 , arg=arg@entry=0x7fffffffcec0)     at /home/devel/git/dpdk/lib/librte_eal/common/eal_common_memory.c:469 #1  0x0000555555a5e9b1 in prepare_vhost_memory_kernel () at /home/devel/git/dpdk/drivers/net/virtio/virtio_user/vhost_kernel.c:118 #2  vhost_kernel_ioctl (dev=0x7ffbf5fb3300, req=, arg=)     at /home/devel/git/dpdk/drivers/net/virtio/virtio_user/vhost_kernel.c:190 #3  0x0000555555a5f211 in virtio_user_mem_event_cb (type=, addr=, len=, arg=0x7ffbf5fb3300)     at /home/devel/git/dpdk/drivers/net/virtio/virtio_user/virtio_user_dev.c:297 #4  0x000055555574814b in eal_memalloc_mem_event_notify (event=event@entry=RTE_MEM_EVENT_ALLOC, start=start@entry=0x7ffbf6000000,     len=len@entry=94371840) at /home/devel/git/dpdk/lib/librte_eal/common/eal_common_memalloc.c:248 #5  0x00005555557563f6 in try_expand_heap_primary (contig=false, bound=0, align=64, flags=0, socket=0, elt_size=0, pg_sz=,     heap=0x7ffff7ff667c) at /home/devel/git/dpdk/lib/librte_eal/common/malloc_heap.c:344 #6  try_expand_heap (heap=heap@entry=0x7ffff7ff667c, pg_sz=, elt_size=elt_size@entry=92403968, socket=socket@entry=0,     flags=flags@entry=0, align=align@entry=64, bound=0, contig=false) at /home/devel/git/dpdk/lib/librte_eal/common/malloc_heap.c:426 #7  0x0000555555756928 in alloc_more_mem_on_socket (heap=heap@entry=0x7ffff7ff667c, size=size@entry=92403968, socket=socket@entry=0,     flags=flags@entry=0, align=align@entry=64, bound=bound@entry=0, contig=false) at /home/devel/git/dpdk/lib/librte_eal/common/malloc_heap.c:554 #8  0x0000555555756e37 in heap_alloc_on_socket (contig=false, bound=0, align=64, flags=0, socket=0, size=92403968, type=)     at /home/devel/git/dpdk/lib/librte_eal/common/malloc_heap.c:590 #9  malloc_heap_alloc (type=, size=92403968, socket_arg=, flags=0, align=, bound=0, contig=false)     at /home/devel/git/dpdk/lib/librte_eal/common/malloc_heap.c:626 #10 0x0000555555753fc1 in rte_zmalloc () at /home/devel/git/dpdk/lib/librte_eal/common/rte_malloc.c:74 #11 0x00005555556192f9 in init_port () at /home/devel/git/dpdk/app/test-pmd/testpmd.c:2645 #12 main (argc=4, argv=0x7fffffffdb18) at /home/devel/git/dpdk/app/test-pmd/testpmd.c:2734 And I also get this warning: vhost_kernel_ioctl(): VHOST_SET_OWNER failed: Device or resource busy Both looks like a bug that needs to be fixed. Thanks