Hi all, After adding unmap uio resources operations in process signal handler functions, An new error was found as follows: Call Trace: [<ffffffffa01cd530>] uio_release+0x40/0x60 [uio] [<ffffffff811b1329>] __fput+0xe9/0x270 [<ffffffff811b15fe>] ____fput+0xe/0x10 [<ffffffff810823c7>] task_work_run+0xa7/0xe0 [<ffffffff81012a77>] do_notify_resume+0x97/0xb0 [<ffffffff815f2a92>] 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:[<ffffffff8183d85f>] [<ffffffff8183d85f>] > 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: > [<ffffffffa0235524>] ? uio_release+0x34/0x60 [uio] > [<ffffffff811b1329>] ? __fput+0xe9/0x270 > [<ffffffff811b15fe>] ? ____fput+0xe/0x10 > [<ffffffff810823e4>] ? task_work_run+0xc4/0xe0 > [<ffffffff81063deb>] ? do_exit+0x2cb/0xa60 > [<ffffffff815e965b>] ? _raw_spin_unlock_irqrestore+0x1b/0x40 > [<ffffffff810645ff>] ? do_group_exit+0x3f/0xa0 > [<ffffffff81074010>] ? get_signal_to_deliver+0x1d0/0x6e0 > [<ffffffffa0289224>] ? tun_chr_aio_read+0xa4/0xc0 [tun] > [<ffffffff81012437>] ? do_signal+0x57/0x600 > [<ffffffff815f0ae0>] ? kprobe_flush_task+0xd0/0x170 > [<ffffffff81092e3a>] ? finish_task_switch+0x14a/0x170 > [<ffffffff81012a49>] ? do_notify_resume+0x69/0xb0 > [<ffffffff815e9c7c>] ? retint_signal+0x48/0x8c > > > Thanks, > Jerry > > > . >