From owner-freebsd-usb@freebsd.org Wed Sep 28 09:36:40 2016 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BBB4C00DB2 for ; Wed, 28 Sep 2016 09:36:40 +0000 (UTC) (envelope-from me@janh.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B83FCB51 for ; Wed, 28 Sep 2016 09:36:39 +0000 (UTC) (envelope-from me@janh.de) Received: from [192.168.178.49] ([84.175.67.119]) by mrelayeu.kundenserver.de (mreue004) with ESMTPSA (Nemesis) id 0MRhLp-1bMOqA0OfR-00SwSP; Wed, 28 Sep 2016 11:31:23 +0200 Subject: Re: Status of PCIe Hotplug? To: Hans Petter Selasky References: <791ee95b-ab4e-f07e-6b8d-0e0b6c49ceb0@janh.de> <58f84457-d775-3023-5727-a326bc8df722@FreeBSD.org> <05657098-a8dd-9d0d-ea75-4c3fdc582795@selasky.org> Cc: FreeBSD-USB Mailing List From: Jan Henrik Sylvester Message-ID: <3c6ab189-aad0-2593-1d3c-f221de294174@janh.de> Date: Wed, 28 Sep 2016 11:31:14 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <05657098-a8dd-9d0d-ea75-4c3fdc582795@selasky.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:Niw0/ZamT77pn5JR28e5faCbt5Q2v+nHXWbQ8W3xpwHqj/JOWGn eijSq0G5ZeIqoZNHOaAuE43zAk4r3LVH7FIyjDz3yd8i1H1VAsq6i45bO+TBzQqiCWUd77E RJbiPChFJXp3PvSZH78PrAfAVBzoLL+IsgnYCIMzkL0cQoau5zGdpzDVOIjNOATH0ml5GaW gZqicuHsikndvDWnBE21w== X-UI-Out-Filterresults: notjunk:1;V01:K0:qbHitrNWXxc=:jK8r2zx+57Zb5qJLSMAXy+ yq+2oaUAool0FbeMQAImN+DxizUcpC4Jwc/2y00pOdzBTWeh6vFGmr1fm+XzZQ/YWqwHzKNd+ vgoVLBmVo19vUa1i66zwtN0/YJEAykdXgtxR9syttofPt/jN9HE0xaG378biJOU8rZqh2lheN TjZlxRLKvXNnflRV9yzC6ARq+MgV8bKMyjueVpG9M2IWpQQx/8fXuB59RvKLyt6o0xPYjoZzC BIHcvgDmL3kSgyy6EsLn6lxvX1r7wB/siM/xHJxr+H2HMPVgDNayhTHXRyoBVKUJ+7j0dyA80 QkD6bWlCp5Jgfl7ch6h4b3YjW6FgIzJyfLDjQqFWCntPLrtLTXRy6Z1Mi9wFJWkC/co/fArwl FRvbPp9h70fTStXodWg7NHbFwPvM2K9p2EVnLKzNW5xaz7+4z39YnwoZ1/8wCiwf7htm+j+Gx MW3GvCp1pJ54BHkxRh7+BtLtT1xdP4iIxmbreAO8S62pgkBGpqobuq3mNQ0+3hKOgMAqA6KRw 0JCt20TZ2+WLUJn1Gkz1BfNU49HtOfz1SYpvO6aGJ91KDr5blFKLzcB3wE7BPMeQ4p5P4Y/Oy WsjBM+QBGw3eTNy7W8qv7XTUdm8D6Ni0SKb6jB6abSrCJAAbQYRss+RJxUXv+AjY0ukq14SRv 2hejvDlNp/4QmVmwGAeoKduGHe/7RVUzL0nkLY/bAhLs9/5lUvSEx/Lh3XyPl0De7MOVgyQve FYe9qw/rk1VPvkp2 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 09:36:40 -0000 On 09/28/2016 10:32, Hans Petter Selasky wrote: > Can you compile your kernel with debugging enabled so that we get the > sourcelines in the dump below. Also please include some parts of the The kernel is from the yet-to-be-released 11.0-RELEASE installed by freebsd-update. Now I have extracted kernel-dbg.txz, base-dbg.txz, and lib32-dbg.txz from the 11.0-RELEAESE distribution, but the backtrace still looks similar. Do have have to do anything else to use the debug symbols or do I really have to compile a new kernel? The panic I got now is different though: fault code = supervisor read data, page not present instruction pointer = 0x20:0xffffffff80b252e7 stack pointer = 0x28:0xfffffe022f04ba10 frame pointer = 0x28:0xfffffe022f04ba50 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 14 (usbus2) trap number = 12 panic: page fault cpuid = 3 And the backtrace has something else for #4 to #6 from below: #4 0xffffffff80fa0f23 at trap_pfault+0x1e3 #5 0xffffffff80fa04cc at trap+0x26c #6 0xffffffff80f84141 at calltrap+0x8 #7 0xffffffff80b14a80 at device_dekete_child+0x120 #8 0xffffffff808f2fe4 at usb_detach_device+0x174 > preceeding dmesg. pci7: on pcib5 xhci0: mem 0xf0000000-0xf0001fff at device 0.0 on pci7 xhci0: 64 bytes context size, 64-bit DMA xhci0: Unable to map MSI-X table usbus2 on xhci0 usbus2: 5.0Gbps Super Speed USB v3.0 ugen2.1: <0x1912> at usbus2 uhub4: <0x1912 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus2 uhub4: 4 ports with 4 removable, self powered > Do you have USB compiled into the kernel or loaded as a module? It is the GENERIC 11.0-RELEASE kernel, it has uhci, ohci, ehci, xhci, and usb compiled in (with USB_DEBUG). > What does kldstat output after you plug the card? Plugging the card in does not change kldstat: Id Refs Address Size Name 1 62 0xffffffff80200000 1fa7c38 kernel 2 1 0xffffffff821a9000 237b8 geom_journal.ko 3 2 0xffffffff821cd000 9b748 linux.ko 4 3 0xffffffff82269000 de28 linux_common.ko 5 1 0xffffffff82277000 8780 acpi_video.ko 6 1 0xffffffff82280000 b570 sem.ko 7 1 0xffffffff8228c000 7d868 vboxdrv.ko 8 1 0xffffffff8230a000 b3e8 aesni.ko 9 1 0xffffffff82316000 e137c0 nvidia.ko 10 1 0xffffffff8312a000 8080 acpi_ibm.ko 11 1 0xffffffff83221000 10582 geom_eli.ko 12 1 0xffffffff83232000 3710 ums.ko 13 1 0xffffffff83236000 2a05 uhid.ko 14 1 0xffffffff83239000 677b u3g.ko 15 1 0xffffffff83240000 53df ucom.ko 16 1 0xffffffff83246000 4fac ng_ubt.ko 17 5 0xffffffff8324b000 befc netgraph.ko 18 1 0xffffffff83257000 a58f ng_hci.ko 19 3 0xffffffff83262000 107c ng_bluetooth.ko 20 1 0xffffffff83264000 d57d ng_l2cap.ko 21 1 0xffffffff83272000 1b187 ng_btsocket.ko 22 1 0xffffffff8328e000 393d ng_socket.ko 23 1 0xffffffff83292000 389f4 linux64.ko > What is the dmesg leading up to this? See above. dmesg after devctl detach xhci0 (to avoid the panic): ugen2.1: <0x1912> at usbus2 (disconnected) unknown: at usbus2, port 1, addr 1 (disconnected) usbus2: detached xhci0: detached And after the successful removal: pci7: detached kldstat does not change at any time. Cheers, Jan Henrik > The bug looks like some .ko was unloaded too early, due to refcounts > dropping incorrectly. > > --HPS > >> >> >> Fatal trap 9: general protection fault while in kernel mode >> cpuid = 1; acpic id = 01 >> instruction pointer = 0x20:0xffffffff80b1549c >> stack pointer = 0x28:0xfffffe022f62ca00 >> frame pointer = 0x28:0xfffffe022f62ca70 >> code segment = base 0x0, limit 0xfffff, type 0x1b >> = DPL 0, pres 1, long 1, def32 0, gran 1 >> processor eflags = interrupt enabled, resume, IOPL = 0 >> current process = 14 (usbus1) >> trap number = 9 >> panic: general protection fault >> cpuid = 1 >> KDB: stack backtrace: >> #0 0xffffffff80b24077 at kdb_backtrace+0x67 >> #1 0xffffffff80ad93e2 at vpanic+0x182 >> #2 0xffffffff80ad9253 at panic+0x43 >> #3 0xffffffff80fa0d31 at trap_fatal+0x351 >> #4 0xffffffff80fa09c8 at trap+0x768 >> #5 0xffffffff80f84141 at calltrap+0x8 >> #6 0xffffffff808f2f63 at usb_detach_device+0xf3 >> #7 0xffffffff808f1d5b at usb_unconfigure+0x2b >> #8 0xffffffff808f5623 at usb_free_device+0x103 >> #9 0xffffffff808f58b1 at usb_bus_detach+0x161 >> #10 0xffffffff80903e95 at usb_process+0x125 >> #11 0xffffffff80a90055 at fork_exit+0x85 >> #12 0xffffffff80f8467e at fork_trampoline+0xe >> Uptime: 18m27s >> Automatic reboot in 15 seconds - press a key on the console to abort