From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 5918A2BD7 for ; Mon, 18 Jul 2016 18:07:03 +0200 (CEST) Received: from alille-653-1-293-182.w90-1.abo.wanadoo.fr ([90.1.53.182] helo=[192.168.1.13]) by mail.droids-corp.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1bPB6t-0003E5-C5; Mon, 18 Jul 2016 18:09:35 +0200 To: "huawie.xie@intel.com" , "yuanhan.liu@linux.intel.com" , "dev@dpdk.org" From: Olivier Matz Message-ID: <95aa6068-2444-304e-2dc1-ff1975f6132a@6wind.com> Date: Mon, 18 Jul 2016 18:06:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] crash in virtio pmd 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: Mon, 18 Jul 2016 16:07:03 -0000 Hi, On 16.07-rc3, when I start testpmd with a virtio driver in a VM, requesting options that are not implemented (rx checksum), it crashes: ./build/app/testpmd -l 0,1 --log-level 8 -- --total-num-mbufs=16384 -i --port-topology=chained --disable-hw-vlan-filter --disable-hw-vlan-strip --enable-rx-cksum --crc-strip --txqflags=0 EAL: Detected 3 lcore(s) EAL: Probing VFIO support... EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles ! PMD: bnxt_rte_pmd_init() called for (null) EAL: PCI device 0000:00:02.0 on NUMA socket -1 EAL: probe driver: 8086:10fb rte_ixgbe_pmd EAL: PCI device 0000:00:04.0 on NUMA socket -1 EAL: probe driver: 8086:10fb rte_ixgbe_pmd EAL: PCI device 0000:00:05.0 on NUMA socket -1 EAL: probe driver: 1af4:1000 rte_virtio_pmd PMD: virtio_read_caps(): no modern virtio pci device found. PMD: vtpci_init(): trying with legacy virtio pci. Interactive-mode selected USER1: create a new mbuf pool : n=16384, size=2176, socket=0 Configuring Port 0 (socket 0) Port 0: 00:1B:21:AB:8F:10 Configuring Port 1 (socket 0) Segmentation fault The crash occurs here (rxvq is NULL): void virtio_dev_rx_queue_release(void *rxq) { struct virtnet_rx *rxvq = rxq; => struct virtqueue *vq = rxvq->vq; /* rxvq is freed when vq is freed, and as mz should be freed after the * del_queue, so we reserve the mz pointer first. */ const struct rte_memzone *mz = rxvq->mz; Here is the backtrace: #0 0x0000000000b01744 in virtio_dev_rx_queue_release (rxq=0x0) at /root/dpdk.org/drivers/net/virtio/virtio_rxtx.\ c:470 #1 0x0000000000583783 in rte_eth_dev_rx_queue_config (dev=0x10ac700 , nb_queues=0) at /ro\ ot/dpdk.org/lib/librte_ether/rte_ethdev.c:713 #2 0x00000000005840e1 in rte_eth_dev_configure (port_id=1 '\001', nb_rx_q=1, nb_tx_q=1, dev_conf=0x7fffd41a3838)\ at /root/dpdk.org/lib/librte_ether/rte_ethdev.c:1027 #3 0x0000000000440037 in start_port (pid=255 '\377') at /root/dpdk.org/app/test-pmd/testpmd.c:1338 #4 0x00000000004419d9 in main (argc=9, argv=0x7fffffffe630) at /root/dpdk.org/app/test-pmd/testpmd.c:2114 Actually, virtio_dev_configure() returns an error here: if (rxmode->hw_ip_checksum) { PMD_DRV_LOG(ERR, "HW IP checksum not supported"); => return -EINVAL; } Then, rte_eth_dev_configure() tries to do some cleanup and crashes here: diag = (*dev->dev_ops->dev_configure)(dev); if (diag != 0) { RTE_PMD_DEBUG_TRACE("port%d dev_configure = %d\n", port_id, diag); => rte_eth_dev_rx_queue_config(dev, 0); rte_eth_dev_tx_queue_config(dev, 0); return diag; } I suppose it is related to this commit: http://dpdk.org/browse/dpdk/commit/?id=01ad44fd374fb8ecb9ecc80b9bfd1f45dbaa4a1f Sorry, I have not a lot of time to investigate further, hope you can find the appropriate fix with the info above. Regards, Olivier