From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [119.145.14.64]) by dpdk.org (Postfix) with ESMTP id CBAEC7E78 for ; Wed, 15 Oct 2014 11:36:04 +0200 (CEST) Received: from 172.24.2.119 (EHLO szxeml411-hub.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CCW95131; Wed, 15 Oct 2014 17:42:59 +0800 (CST) Received: from [127.0.0.1] (10.177.19.236) by szxeml411-hub.china.huawei.com (10.82.67.138) with Microsoft SMTP Server id 14.3.158.1; Wed, 15 Oct 2014 17:42:52 +0800 Message-ID: <543E419A.70509@huawei.com> Date: Wed, 15 Oct 2014 17:42:50 +0800 From: Lilijun User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: "dev@dpdk.org" , References: <20130813225821.3e23ad90@nehalam.linuxnetplumber.net> <543D0FF3.6020306@huawei.com> In-Reply-To: <543D0FF3.6020306@huawei.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.19.236] X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] kernel panic when stop my test demo 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, 15 Oct 2014 09:36:06 -0000 Hi all, After adding unmap uio resources operations in process signal handler functions, An new error was found as follows: Call Trace: [] uio_release+0x40/0x60 [uio] [] __fput+0xe9/0x270 [] ____fput+0xe/0x10 [] task_work_run+0xa7/0xe0 [] do_notify_resume+0x97/0xb0 [] int_signal+0x12/0x17 The code for unmap uio resources is shown: static void pci_dev_uio_unmap(struct rte_pci_device *pci_dev, uint8_t port_id) { int i; RTE_LOG(INFO, EAL, "begin unmap port %d uio resource! \n", port_id); if (NULL == pci_dev) { RTE_LOG(ERR, EAL, "begin unmap port %d uio resource! \n", port_id); return; } for (i = 0; i != PCI_MAX_RESOURCE; i++) { /* skip empty BAR */ if (0 == pci_dev->mem_resource[i].phys_addr) continue; if (munmap(pci_dev->mem_resource[i].addr, pci_dev->mem_resource[i].len) == -1){ RTE_LOG(ERR, EAL, "Error with munmap\n"); return; } } if (close(pci_dev->intr_handle.fd) == -1){ RTE_LOG(ERR, EAL, "Error closing interrupt handle\n"); return; } pci_dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN; RTE_LOG(INFO, EAL, "unmap port %d uio resource successfully!\n", port_id); } Does anyone has some ideas? Thanks for any help. Jerry On 2014/10/14 19:58, Lilijun wrote: > Hi Stephen and all, > > I have a same problem as this older email describes on Aug 14, 2013. > Any help will be appreciated. > > The details is shown as follows. > The key step implementation of my demo is: > 1. Firstly, call rte_eal_init() to do some initialization. > 2. Switch the driver of my Intel 82599 NIC from ixgbe.ko to igb_uio.ko > like tools/dpdk_nic_bind.py written in C source code. > 3. Configure rte_dev and start it. > 4. Do some rx/tx tests. > 5. call rte_eth_dev_stop(dpdk_port_id) to stop the hardware as your history emails. > 6. Switch the driver of the NIC from igb_uio.ko to ixgbe.ko. > 7. Kill the demo using commands: kill -9. > > Then kernel panics at random points when do something later. > One of them as follows: > general protection fault: 0000 [#1] SMP > Modules linked in: tun igb_uio(OF) uio mlx4_ib ib_sa > task: ffff881fd0d6a220 ti: ffff881fd0cf8000 task.ti: ffff881fd0cf8000 > RIP: 0010:[] [] dcbnl_rtnl_policy+0x1b111f/0x1e3f70 > RSP: 0000:ffff881fd0cf9c38 EFLAGS: 00013282 > RAX: ffffffff819770a0 RBX: ffff881fe7b49fa0 RCX: 0000000000000001 > RDX: ffffffff8183d851 RSI: ffff881fe7f20da1 RDI: ffffffff819770a0 > RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 > R10: ffff881fe7f20da0 R11: ffff881fd0da0310 R12: ffff881fe811e6c0 > R13: 0000000000000000 R14: ffff881fe6d14180 R15: ffff881fe7af4a20 > FS: 0000000000000000(0000) GS:ffff88203fc00000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b > CR2: 00007f2702d3f9e0 CR3: 00000000018ce000 CR4: 00000000000007e0 > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 > Stack: > ffffffffa0235524 ffff881fd0da0300 0000000000000008 ffff881fe7f20da0 > ffff881fd0cf9ca0 ffffffff811b1329 ffff881fe7f20da0 ffff881fd0da0310 > ffff881fd0da0200 ffffffff81c9be80 ffff881fd0d6a9f0 ffff881fd0d6a220 > Call Trace: > [] ? uio_release+0x34/0x60 [uio] > [] ? __fput+0xe9/0x270 > [] ? ____fput+0xe/0x10 > [] ? task_work_run+0xc4/0xe0 > [] ? do_exit+0x2cb/0xa60 > [] ? _raw_spin_unlock_irqrestore+0x1b/0x40 > [] ? do_group_exit+0x3f/0xa0 > [] ? get_signal_to_deliver+0x1d0/0x6e0 > [] ? tun_chr_aio_read+0xa4/0xc0 [tun] > [] ? do_signal+0x57/0x600 > [] ? kprobe_flush_task+0xd0/0x170 > [] ? finish_task_switch+0x14a/0x170 > [] ? do_notify_resume+0x69/0xb0 > [] ? retint_signal+0x48/0x8c > > > Thanks, > Jerry > > > . >