From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by dpdk.org (Postfix, from userid 33) id 4CA211B4BC; Fri, 23 Nov 2018 08:48:22 +0100 (CET) From: bugzilla@dpdk.org To: dev@dpdk.org Date: Fri, 23 Nov 2018 07:48:22 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: testpmd X-Bugzilla-Version: 18.11 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: xueqin.lin@intel.com X-Bugzilla-Status: CONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 Subject: [dpdk-dev] [Bug 110] system hang when device deleted for hotplug function(igb uio) 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: Fri, 23 Nov 2018 07:48:22 -0000 https://bugs.dpdk.org/show_bug.cgi?id=3D110 Bug ID: 110 Summary: system hang when device deleted for hotplug function(igb uio) Product: DPDK Version: 18.11 Hardware: x86 OS: Linux Status: CONFIRMED Severity: major Priority: Normal Component: testpmd Assignee: dev@dpdk.org Reporter: xueqin.lin@intel.com Target Milestone: --- The system env: Host kernel: 4.17.0-041700rc1-generic Vm kernel: Linux ubuntu 4.10.0-28-generic #32~16.04.2-Ubuntu. QEMU emulator version: 2.5.0 DPDK: version: 18.11-rc4 NIC: ixgbe or i40e nic or other(igb_uio pci nic) Reproduce step: Host environment 1. Host: Bind port 0 to vfio-pci modprobe vfio_pci ./usertools/dpdk-devbind.py -b vfio-pci 81:10.0 2. start qemu scripts taskset -c 12-21 qemu-system-x86_64 \ -enable-kvm -m 8192 -smp cores=3D10,sockets=3D1 -cpu host -name dpdk1-vm1 \ -monitor stdio \ -drive file=3D/home/vm/ubuntu-16.04.img \ -device vfio-pci,host=3D0000:81:10.0,id=3Ddev1 \ -netdev tap,id=3Dipvm1,ifname=3Dtap5,script=3D/etc/qemu-ifup -device=20 rtl8139,netdev=3Dipvm1,id=3Dnet0,mac=3D00:00:00:00:00:01 \ -localtime -vnc :2 VM environment 1. Bind port 0 to igb_uio ./usertools/dpdk-devbind.py --st ./usertools/dpdk-devbind.py -b igb_uio 00:03.0 2. Start testpmd and enable hotplug feature ./x86_64-native-linuxapp-gcc/app/testpmd -c f -n 4 -- -i --hot-plug 3. testpmd>set fwd txonly 4. testpmd>start 5. Qemu: remove device for unplug: (qemu) device_del dev1 6.Qemu : add device for plug: (qemu) device_add vfio-pci,host=3D0000:81:10.0,id=3Ddev1 7. Bind port 0 to igb_uio=EF=BC=9A ./usertools/dpdk-devbind.py -b igb_uio 00:03.0 8. testpmd>stop 9. testpmd>port attach 0000: 00:03.0 10. testpmd>port start all 11. testpmd>start 12. Repeat 5 -- 12 until the kernel crash occur. ############ [ 1052.262696] igb_uio 0000:00:03.0: mapping 1K dma=3D0x61cea000=20 host=3Dffff8e94e1cea000 [ 1052.262699] igb_uio 0000:00:03.0: unmapping 1K dma=3D0x61cea000=20 host=3Dffff8e94e1cea000 [ 1065.140839] igb_uio 0000:00:03.0: uio device registered with irq 24 [ 1078.006619] BUG: unable to handle kernel NULL pointer dereference at=20 00000000000001d0 [ 1078.006657] IP: uio_write+0x2e/0xc0 [uio] [ 1078.006659] PGD 70837067 [ 1078.006659] PUD 3440c067 [ 1078.006660] PMD 0 [ 1078.006667] Oops: 0000 [#1] SMP [ 1078.006677] Modules linked in: igb_uio(OE) uio sb_edac edac_core=20 kvm_intel kvm irqbypass crct10dif_pclmul joydev input_leds mac_hid=20 i2c_piix4 crc32_pclmul ghash_clmulni_intel pcbc aesni_intel aes_x86_64=20 crypto_simd glue_helper cryptd serio_raw parport_pc ppdev lp parport=20 autofs4 8139too psmouse 8139cp ixgbevf mii pata_acpi floppy [ 1078.006703] CPU: 3 PID: 14043 Comm: eal-intr-thread Tainted:=20 G OE 4.10.0-28-generic #32~16.04.2-Ubuntu [ 1078.006705] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),=20 BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 [ 1078.006706] task: ffff8e94f3904380 task.stack: ffffa97b810dc000 [ 1078.006709] RIP: 0010:uio_write+0x2e/0xc0 [uio] [ 1078.006712] RSP: 0018:ffffa97b810dfe90 EFLAGS: 00010246 [ 1078.006714] RAX: 0000000000000000 RBX: 0000000000000004 RCX:=20 ffffa97b810dff18 [ 1078.006715] RDX: 0000000000000004 RSI: 00007f75a0c45294 RDI:=20 ffff8e94f3ff8d00 [ 1078.006716] RBP: ffffa97b810dfeb0 R08: ffffffffc01b6320 R09:=20 ffff8e94e1de9370 [ 1078.006717] R10: ffff8e94f3ff8d38 R11: ffff8e94f382f9c0 R12:=20 ffff8e94f2f94218 [ 1078.006718] R13: 00007f75a0c45294 R14: ffff8e94f3ff8d00 R15:=20 0000000000000000 [ 1078.006719] FS: 00007f75a0c47700(0000) GS:ffff8e95bfcc0000(0000)=20 knlGS:0000000000000000 [ 1078.006720] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1078.006721] CR2: 00000000000001d0 CR3: 0000000073abc000 CR4:=20 00000000001406e0 [ 1078.006727] Call Trace: [ 1078.006765] __vfs_write+0x18/0x40 [ 1078.006768] vfs_write+0xb8/0x1b0 [ 1078.006770] SyS_write+0x55/0xc0 [ 1078.006791] entry_SYSCALL_64_fastpath+0x1e/0xad [ 1078.006793] RIP: 0033:0x7f75a10224bd [ 1078.006796] RSP: 002b:00007f75a0c45270 EFLAGS: 00003293 ORIG_RAX:=20 0000000000000001 [ 1078.006800] RAX: ffffffffffffffda RBX: 000000000000010c RCX:=20 00007f75a10224bd [ 1078.006801] RDX: 0000000000000004 RSI: 00007f75a0c45294 RDI:=20 0000000000000010 [ 1078.006802] RBP: 00007f75a0c45250 R08: 00000000000010ed R09:=20 00000000010922e7 [ 1078.006803] R10: 0000000001777781 R11: 0000000000003293 R12:=20 00007f75a0c45680 [ 1078.006804] R13: 00007fff9036bb4f R14: 00007f75a0c479c0 R15:=20 0000000000000000 [ 1078.006805] Code: 00 00 55 48 89 e5 41 54 53 48 83 ec 10 65 48 8b 04=20 25 28 00 00 00 48 89 45 e8 31 c0 48 8b 87 c8 00 00 00 4c 8b 20 49 8b 44=20 24 38 <48> 83 b8 d0 01 00 00 00 74 6a 48 89 d3 48 c7 c2 ea ff ff ff 48 [ 1078.006832] RIP: uio_write+0x2e/0xc0 [uio] RSP: ffffa97b810dfe90 [ 1078.006832] CR2: 00000000000001d0 [ 1078.006837] ---[ end trace 88c298c83fcf2c2d ]--- ####### --=20 You are receiving this mail because: You are the assignee for the bug.=