From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by dpdk.org (Postfix) with ESMTP id 800285A53 for ; Wed, 8 Apr 2015 17:53:18 +0200 (CEST) Received: by wizk4 with SMTP id k4so60417637wiz.1 for ; Wed, 08 Apr 2015 08:53:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :content-type:thread-index:content-language; bh=/69/+rGeIn2HVKzkD6Y8kUZ78v/A9Tj5rB8Iv4x+AKY=; b=kb2NGJJDa+P7I4uMw8BwfboxCCzgRRe+al22TMjiHvzCh1/xEayJZ3Kdspa5CqzU3Q WvR3ikRH8DNGyPrW6Ue2V08UxUshk1a6qC1TZT5J6whbgBjGcHTQrjrybTNeoLa/A2Xx zLPwyhOY3L4YuyFFzOvzD59qc7PKWAXhClCPWm0nlud9mWlZxz0L3mTeHtwTcqEq82rH FnZeaU76HhAWygFwwjmOsqD42MnNxyaSi+m7FGj2WCC6yVQ4G5mq5ruKg1n8Ee6Y5pzL WOYhagZZ7Fcnt0Yhb8z0s39KywJ9WPJLKerT+df+QlR4TxGuaK7g5/1M+F95pYN6F7F0 K7mA== X-Received: by 10.194.83.66 with SMTP id o2mr52310016wjy.55.1428508397917; Wed, 08 Apr 2015 08:53:17 -0700 (PDT) Received: from laptop1 (84.95.210.61.forward.012.net.il. [84.95.210.61]) by mx.google.com with ESMTPSA id e2sm16165041wjy.46.2015.04.08.08.53.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Apr 2015 08:53:17 -0700 (PDT) From: "Raz Amir" To: , "'Thomas Monjalon'" , References: <13b901d07149$4e20d430$ea627c90$@gmail.com> In-Reply-To: <13b901d07149$4e20d430$ea627c90$@gmail.com> Date: Wed, 8 Apr 2015 18:53:13 +0300 Message-ID: <145601d07214$20aa04b0$61fe0e10$@gmail.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQFeDtWPKMkm/xbDhwlnPNSnZltoBp4oBgkQ Content-Language: en-gb Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] Crash related to virtio NICs in DPDK 2.0.0 on Freebsd 10.1 VM X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 15:53:18 -0000 I found the source of the problem. The issues happens also in dpdk 1.8.0, and related to patch http://dpdk.org/dev/patchwork/patch/239/ Adding Thomas and David to the thread and I will appreciate your input. The patch comes to solve a file descriptor leak in the bsdapp version of rte_eal_iopl_init after opening the /dev/io device. Seems like this isn't a file descriptor leak, and it should remain open - as I wrote below, I am using virtio. After removing it and testing the crash was resolved. Any objection for removing the close(fd) that was added at dpdk 1.8.0? Are there scenarios that might be impacted by removing it? From: Raz Amir [mailto:razamir22@gmail.com] Sent: 07 April 2015 18:41 To: dev@dpdk.org Subject: Crash related to virtio NICs in DPDK 2.0.0 on Freebsd 10.1 VM I am moving from dpdk 1.7.1 to 2.0.0 and I am experiencing a crash in any dpdk application, when rte_eal_init initializes the virtio NICs. I have Ubuntu 14.04.02, running a Freebsd 10.1 VM with 3 virtio NICs over qemu with kvm. I run testpmd (for example) inside the Freebsd VM and it crashes (more info below). On the same setup, testpmd from dpdk 1.7.1 works without an issue. Can you tell if you know that a Freebsd VM with virtio NICs is working for dpdk 2.0.0? Additional information from gdb: user@:/dpdk/dpdk-2.0.0 # gdb testpmd GNU gdb (GDB) 7.8.1 [GDB v7.8.1 for FreeBSD] 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-portbld-freebsd10.1". 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 testpmd...done. (gdb) r -c 3 -n 2 Starting program: /root/testpmd -c 3 -n 2 EAL: Sysctl reports 2 cpus EAL: Detected lcore 0 EAL: Detected lcore 1 EAL: Support maximum 128 logical core(s) by configuration. EAL: Detected 2 lcore(s) EAL: Contigmem driver has 2 buffers, each of size 64MB EAL: Setting up physically contiguous memory... EAL: Mapped memory segment 1 @ 0x802800000: physaddr:0x10000000, len 67108864 EAL: Mapped memory segment 2 @ 0x806800000: physaddr:0x14000000, len 67108864 EAL: TSC is not safe to use in SMP mode EAL: TSC is not invariant EAL: TSC frequency is ~2933513 KHz EAL: PCI scan found 8 devices EAL: Master lcore 0 is ready (tid=0x802406400;cpuset=[0]) PMD: ENICPMD trace: rte_enic_pmd_init EAL: lcore 1 is ready (tid=0x802406800;cpuset=[1]) EAL: PCI device 0000:00:03.0 on NUMA socket 0 EAL: probe driver: 1af4:1000 rte_virtio_pmd [New Thread 802406400 (LWP 100111)] Program received signal SIGBUS, Bus error. [Switching to Thread 802406400 (LWP 100111)] 0x0000000000492f2c in outb (port=49170, data=0 '\000') at /usr/include/machine/cpufunc.h:244 244 /usr/include/machine/cpufunc.h: No such file or directory. (gdb) bt #0 0x0000000000492f2c in outb (port=49170, data=0 '\000') at /usr/include/machine/cpufunc.h:244 #1 0x0000000000492f7a in outb_p (data=0 '\000', port=49170) at /dpdk/dpdk-2.0.0/lib/librte_pmd_virtio/virtio_pci.h:211 #2 0x000000000049328d in vtpci_set_status (hw=0x80331f380, status=0 '\000') at /dpdk/dpdk-2.0.0/lib/librte_pmd_virtio/virtio_pci.c:130 #3 0x00000000004931fe in vtpci_reset (hw=0x80331f380) at /dpdk/dpdk-2.0.0/lib/librte_pmd_virtio/virtio_pci.c:108 #4 0x00000000004a175e in eth_virtio_dev_init (eth_dev=0x831b80 ) at /dpdk/dpdk-2.0.0/lib/librte_pmd_virtio/virtio_ethdev.c:1150 #5 0x0000000000462c09 in rte_eth_dev_init (pci_drv=0x79d1a0 , pci_dev=0x802417560) at /dpdk/dpdk-2.0.0/lib/librte_ether/rte_ethdev.c:326 #6 0x000000000046f03f in rte_eal_pci_probe_one_driver (dr=0x79d1a0 , dev=0x802417560) at /dpdk/dpdk-2.0.0/lib/librte_eal/bsdapp/eal/eal_pci.c:487 #7 0x0000000000475b06 in pci_probe_all_drivers (dev=0x802417560) at /dpdk/dpdk-2.0.0/lib/librte_eal/common/eal_common_pci.c:116 #8 0x0000000000475bb9 in rte_eal_pci_probe () at /dpdk/dpdk-2.0.0/lib/librte_eal/common/eal_common_pci.c:246 #9 0x000000000046cd63 in rte_eal_init (argc=5, argv=0x7fffffffeaf0) at /dpdk/dpdk-2.0.0/lib/librte_eal/bsdapp/eal/eal.c:554 #10 0x0000000000404544 in main () (gdb) disassemble inb Dump of assembler code for function inb: 0x0000000000492ed6 <+0>: push %rbp 0x0000000000492ed7 <+1>: mov %rsp,%rbp 0x0000000000492eda <+4>: mov %edi,-0x14(%rbp) 0x0000000000492edd <+7>: mov -0x14(%rbp),%eax 0x0000000000492ee0 <+10>: mov %eax,%edx 0x0000000000492ee2 <+12>: in (%dx),%al 0x0000000000492ee3 <+13>: mov %al,-0x1(%rbp) 0x0000000000492ee6 <+16>: movzbl -0x1(%rbp),%eax 0x0000000000492eea <+20>: pop %rbp 0x0000000000492eeb <+21>: retq End of assembler dump. (gdb) p $dx $1 = -16366 (gdb) info registers rax 0x0 0 rbx 0x802800000 34401681408 rcx 0x0 0 rdx 0xc012 49170 rsi 0x0 0 rdi 0xc012 49170 rbp 0x7fffffffe708 0x7fffffffe708 rsp 0x7fffffffe708 0x7fffffffe708 r8 0x80082b63c 34368304700 r9 0x80082b61c 34368304668 r10 0x1 1 r11 0x80331f300 34413343488 r12 0x7fffffffeaf0 140737488349936 r13 0x7fffffffeb20 140737488349984 r14 0x7fffffffeaf0 140737488349936 r15 0x5 5 rip 0x492f2c 0x492f2c eflags 0x10216 [ PF AF IF RF ] cs 0x43 67 ss 0x3b 59 ds es fs gs (gdb)