Re: kernel page fault on 55-release
2014-09-01 10:47 GMT+02:00 Martin Pieuchot : > On 30/08/14(Sat) 12:28, ludovic coues wrote: >> 2014-08-30 11:58 GMT+02:00 Martin Pieuchot : >> > On 30/08/14(Sat) 11:46, ludovic coues wrote: >> >> 2014-08-30 10:53 GMT+02:00 Martin Pieuchot : >> >> > Hello Ludovic, >> >> > >> >> > On 28/08/14(Thu) 20:52, ludovic coues wrote: >> >> >> Hello, >> >> >> >> >> >> Recently, I get a kernel page fault every time I try to use the >> >> >> micronucleus [1] command line tool. It 's for uploading an hex file to >> >> >> ATtiny processor, much like arduino's avrude. The crash is pretty >> >> >> consistent, occuring every time I run `micronucleus --run`. >> >> >> I've managed to use it with success in the past on this machine with >> >> >> 55-release so it might be hardware related. I added a realtek wireless >> >> >> device since last time I've get a successful run with micronucleus. >> >> >> >> >> >> I get the following message when I run it: >> >> >> uvm_fault(0x81daaf001, 0x2, 2, 0, 1) -> e >> >> >> kernel: page fault trap, code=0 >> >> >> Stopped at usbd_get_cdesc+035: movzwl 0x2 (%rax),%eax >> >> >> >> >> >> It's followed by the debugger prompt. I don't know how what to do from >> >> >> that point. I'm willing to spend time tracking the source of the >> >> >> problem but I have no idea of what I'm looking for. >> >> > >> >> > Thanks for reporting the problem. I believe this is the same issue that >> >> > has been reported by Thomas Pfaff in February [0] and fixed post 5.5 >> >> > [1]. >> >> > >> >> > Could you try a snapshot and tell me if you can still reproduce it? >> >> > >> >> > Cheers, >> >> > Martin >> >> > >> >> > [0] http://marc.info/?l=openbsd-bugs&m=139135208628637&w=2 >> >> > [1] http://marc.info/?l=openbsd-cvs&m=139194643911061&w=2 >> >> >> >> I might have failed to upgrade to snapshot but I still have the error. >> >> Right now, I got the snapshot install56.fs file, used it to run an >> >> upgrade and run sysmerge. I must have done something right as >> >> start_daemon isn't available anymore in /etc/rc.local but the error is >> >> still present. >> > >> > In this case could you send me your dmesg, the output of "usbdevs -dv" >> > and the trace when the trap occurs? >> > > Thanks Ludovic, > >> usbdevs -dv: >> [...] >> port 4 addr 3: high speed, power 100 mA, unconfigured, >> RTL8187B(0x8189), Realtek(0x0bda), rev 2.00, iSerialNumber >> 00e04c01 >> urtw0 > > The problem comes from this driver that does not set any configuration > when it attaches itself to the device. > > Could you test the diff below, it is a sync with urtwn(4), and tell me > if you can reproduce this problem with it? > Nope, I cannot reproduce :) Thank a lot for your time.
Re: kernel page fault on 55-release
On 30/08/14(Sat) 12:28, ludovic coues wrote: > 2014-08-30 11:58 GMT+02:00 Martin Pieuchot : > > On 30/08/14(Sat) 11:46, ludovic coues wrote: > >> 2014-08-30 10:53 GMT+02:00 Martin Pieuchot : > >> > Hello Ludovic, > >> > > >> > On 28/08/14(Thu) 20:52, ludovic coues wrote: > >> >> Hello, > >> >> > >> >> Recently, I get a kernel page fault every time I try to use the > >> >> micronucleus [1] command line tool. It 's for uploading an hex file to > >> >> ATtiny processor, much like arduino's avrude. The crash is pretty > >> >> consistent, occuring every time I run `micronucleus --run`. > >> >> I've managed to use it with success in the past on this machine with > >> >> 55-release so it might be hardware related. I added a realtek wireless > >> >> device since last time I've get a successful run with micronucleus. > >> >> > >> >> I get the following message when I run it: > >> >> uvm_fault(0x81daaf001, 0x2, 2, 0, 1) -> e > >> >> kernel: page fault trap, code=0 > >> >> Stopped at usbd_get_cdesc+035: movzwl 0x2 (%rax),%eax > >> >> > >> >> It's followed by the debugger prompt. I don't know how what to do from > >> >> that point. I'm willing to spend time tracking the source of the > >> >> problem but I have no idea of what I'm looking for. > >> > > >> > Thanks for reporting the problem. I believe this is the same issue that > >> > has been reported by Thomas Pfaff in February [0] and fixed post 5.5 [1]. > >> > > >> > Could you try a snapshot and tell me if you can still reproduce it? > >> > > >> > Cheers, > >> > Martin > >> > > >> > [0] http://marc.info/?l=openbsd-bugs&m=139135208628637&w=2 > >> > [1] http://marc.info/?l=openbsd-cvs&m=139194643911061&w=2 > >> > >> I might have failed to upgrade to snapshot but I still have the error. > >> Right now, I got the snapshot install56.fs file, used it to run an > >> upgrade and run sysmerge. I must have done something right as > >> start_daemon isn't available anymore in /etc/rc.local but the error is > >> still present. > > > > In this case could you send me your dmesg, the output of "usbdevs -dv" > > and the trace when the trap occurs? > Thanks Ludovic, > usbdevs -dv: > [...] > port 4 addr 3: high speed, power 100 mA, unconfigured, > RTL8187B(0x8189), Realtek(0x0bda), rev 2.00, iSerialNumber > 00e04c01 > urtw0 The problem comes from this driver that does not set any configuration when it attaches itself to the device. Could you test the diff below, it is a sync with urtwn(4), and tell me if you can reproduce this problem with it? Index: if_urtw.c === RCS file: /home/ncvs/src/sys/dev/usb/if_urtw.c,v retrieving revision 1.47 diff -u -p -r1.47 if_urtw.c --- if_urtw.c 13 Jul 2014 15:52:49 - 1.47 +++ if_urtw.c 1 Sep 2014 08:43:50 - @@ -608,6 +608,19 @@ urtw_attach(struct device *parent, struc sc->sc_udev = uaa->device; sc->sc_hwrev = urtw_lookup(uaa->vendor, uaa->product)->rev; + if (usbd_set_config_no(sc->sc_udev, 1, 0) != 0) { + printf("%s: could not set configuration no\n", + sc->sc_dev.dv_xname); + return; + } + + /* Get the first interface handle. */ + if (usbd_device2interface_handle(sc->sc_udev, 0, &sc->sc_iface) != 0) { + printf("%s: could not get interface handle\n", + sc->sc_dev.dv_xname); + return; + } + printf("%s: ", sc->sc_dev.dv_xname); if (sc->sc_hwrev & URTW_HWREV_8187) { @@ -2297,20 +2310,6 @@ urtw_init(struct ifnet *ifp) sc->sc_txtimer = 0; if (!(sc->sc_flags & URTW_INIT_ONCE)) { - error = usbd_set_config_no(sc->sc_udev, URTW_CONFIG_NO, 0); - if (error != 0) { - printf("%s: could not set configuration no\n", - sc->sc_dev.dv_xname); - goto fail; - } - /* get the first interface handle */ - error = usbd_device2interface_handle(sc->sc_udev, - URTW_IFACE_INDEX, &sc->sc_iface); - if (error != 0) { - printf("%s: could not get interface handle\n", - sc->sc_dev.dv_xname); - goto fail; - } error = urtw_open_pipes(sc); if (error != 0) goto fail; @@ -3730,20 +3729,6 @@ urtw_8187b_init(struct ifnet *ifp) sc->sc_txtimer = 0; if (!(sc->sc_flags & URTW_INIT_ONCE)) { - error = usbd_set_config_no(sc->sc_udev, URTW_CONFIG_NO, 0); - if (error != 0) { - printf("%s: could not set configuration no\n", - sc->sc_dev.dv_xname); - goto fail; - } - /* Get the first interface handle. */ - error = usbd_device2interface_handle(sc->sc_udev, -
Re: kernel page fault on 55-release
2014-08-30 11:58 GMT+02:00 Martin Pieuchot : > On 30/08/14(Sat) 11:46, ludovic coues wrote: >> 2014-08-30 10:53 GMT+02:00 Martin Pieuchot : >> > Hello Ludovic, >> > >> > On 28/08/14(Thu) 20:52, ludovic coues wrote: >> >> Hello, >> >> >> >> Recently, I get a kernel page fault every time I try to use the >> >> micronucleus [1] command line tool. It 's for uploading an hex file to >> >> ATtiny processor, much like arduino's avrude. The crash is pretty >> >> consistent, occuring every time I run `micronucleus --run`. >> >> I've managed to use it with success in the past on this machine with >> >> 55-release so it might be hardware related. I added a realtek wireless >> >> device since last time I've get a successful run with micronucleus. >> >> >> >> I get the following message when I run it: >> >> uvm_fault(0x81daaf001, 0x2, 2, 0, 1) -> e >> >> kernel: page fault trap, code=0 >> >> Stopped at usbd_get_cdesc+035: movzwl 0x2 (%rax),%eax >> >> >> >> It's followed by the debugger prompt. I don't know how what to do from >> >> that point. I'm willing to spend time tracking the source of the >> >> problem but I have no idea of what I'm looking for. >> > >> > Thanks for reporting the problem. I believe this is the same issue that >> > has been reported by Thomas Pfaff in February [0] and fixed post 5.5 [1]. >> > >> > Could you try a snapshot and tell me if you can still reproduce it? >> > >> > Cheers, >> > Martin >> > >> > [0] http://marc.info/?l=openbsd-bugs&m=139135208628637&w=2 >> > [1] http://marc.info/?l=openbsd-cvs&m=139194643911061&w=2 >> >> I might have failed to upgrade to snapshot but I still have the error. >> Right now, I got the snapshot install56.fs file, used it to run an >> upgrade and run sysmerge. I must have done something right as >> start_daemon isn't available anymore in /etc/rc.local but the error is >> still present. > > In this case could you send me your dmesg, the output of "usbdevs -dv" > and the trace when the trap occurs? dmesg: OpenBSD 5.6-current (GENERIC.MP) #355: Fri Aug 29 17:01:02 MDT 2014 t...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 4166873088 (3973MB) avail mem = 4047220736 (3859MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xeb190 (38 entries) bios0: vendor American Megatrends Inc. version "4.6.5" date 12/24/2013 bios0: Notebook W310CZ/CZ-T acpi0 at bios0: rev 2 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP APIC FPDT MCFG SSDT HPET SSDT SSDT SSDT acpi0: wakeup devices P0P1(S4) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB5(S3) USB6(S3) USB7(S3) PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) [...] acpitimer0 at acpi0: 3579545 Hz, 24 bits acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Celeron(R) CPU 1037U @ 1.80GHz, 1796.23 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS cpu0: 256KB 64b/line 8-way L2 cache cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges cpu0: apic clock running at 99MHz cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE cpu1 at mainbus0: apid 2 (application processor) cpu1: Intel(R) Celeron(R) CPU 1037U @ 1.80GHz, 1795.93 MHz cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS cpu1: 256KB 64b/line 8-way L2 cache cpu1: smt 0, core 1, package 0 ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins acpimcfg0 at acpi0 addr 0xf800, bus 0-63 acpihpet0 at acpi0: 14318179 Hz acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus -1 (P0P1) acpiprt2 at acpi0: bus 1 (RP01) acpiprt3 at acpi0: bus -1 (RP02) acpiprt4 at acpi0: bus 2 (RP03) acpiprt5 at acpi0: bus 3 (RP04) acpiec0 at acpi0 acpicpu0 at acpi0: C3, C2, C1, PSS acpicpu1 at acpi0: C3, C2, C1, PSS acpitz0 at acpi0: critical temperature is 120 degC acpibtn0 at acpi0: PWRB acpibtn1 at acpi0: SLPB acpibtn2 at acpi0: LID0 acpiac0 at acpi0: AC unit online acpibat0 at acpi0: BAT0 not present acpivideo0 at acpi0: GFX0 acpivout0 at acpivideo0: LCD0 cpu0: Enhanced SpeedStep 1796 MHz: speeds: 1800, 1700, 1600, 1500, 1400, 1300, 1200, 1100, 1000, 900, 800 MHz pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "Intel Core 3G Host" rev 0x09 vga1 at pci0 dev 2 function 0 "Intel HD Graphics 2500" rev 0x09 intagp at vga1 not configured inteldrm0 at vga1 drm0 at inteldrm0 drm: Memory usable by graphics device = 2048M inteldrm0: 1366x768 wsdisplay0 at vga1 mux 1: console (std, vt100 emulation) wsdisplay0: screen 1-5 added
Re: kernel page fault on 55-release
On 30/08/14(Sat) 11:46, ludovic coues wrote: > 2014-08-30 10:53 GMT+02:00 Martin Pieuchot : > > Hello Ludovic, > > > > On 28/08/14(Thu) 20:52, ludovic coues wrote: > >> Hello, > >> > >> Recently, I get a kernel page fault every time I try to use the > >> micronucleus [1] command line tool. It 's for uploading an hex file to > >> ATtiny processor, much like arduino's avrude. The crash is pretty > >> consistent, occuring every time I run `micronucleus --run`. > >> I've managed to use it with success in the past on this machine with > >> 55-release so it might be hardware related. I added a realtek wireless > >> device since last time I've get a successful run with micronucleus. > >> > >> I get the following message when I run it: > >> uvm_fault(0x81daaf001, 0x2, 2, 0, 1) -> e > >> kernel: page fault trap, code=0 > >> Stopped at usbd_get_cdesc+035: movzwl 0x2 (%rax),%eax > >> > >> It's followed by the debugger prompt. I don't know how what to do from > >> that point. I'm willing to spend time tracking the source of the > >> problem but I have no idea of what I'm looking for. > > > > Thanks for reporting the problem. I believe this is the same issue that > > has been reported by Thomas Pfaff in February [0] and fixed post 5.5 [1]. > > > > Could you try a snapshot and tell me if you can still reproduce it? > > > > Cheers, > > Martin > > > > [0] http://marc.info/?l=openbsd-bugs&m=139135208628637&w=2 > > [1] http://marc.info/?l=openbsd-cvs&m=139194643911061&w=2 > > I might have failed to upgrade to snapshot but I still have the error. > Right now, I got the snapshot install56.fs file, used it to run an > upgrade and run sysmerge. I must have done something right as > start_daemon isn't available anymore in /etc/rc.local but the error is > still present. In this case could you send me your dmesg, the output of "usbdevs -dv" and the trace when the trap occurs?
Re: kernel page fault on 55-release
2014-08-30 10:53 GMT+02:00 Martin Pieuchot : > Hello Ludovic, > > On 28/08/14(Thu) 20:52, ludovic coues wrote: >> Hello, >> >> Recently, I get a kernel page fault every time I try to use the >> micronucleus [1] command line tool. It 's for uploading an hex file to >> ATtiny processor, much like arduino's avrude. The crash is pretty >> consistent, occuring every time I run `micronucleus --run`. >> I've managed to use it with success in the past on this machine with >> 55-release so it might be hardware related. I added a realtek wireless >> device since last time I've get a successful run with micronucleus. >> >> I get the following message when I run it: >> uvm_fault(0x81daaf001, 0x2, 2, 0, 1) -> e >> kernel: page fault trap, code=0 >> Stopped at usbd_get_cdesc+035: movzwl 0x2 (%rax),%eax >> >> It's followed by the debugger prompt. I don't know how what to do from >> that point. I'm willing to spend time tracking the source of the >> problem but I have no idea of what I'm looking for. > > Thanks for reporting the problem. I believe this is the same issue that > has been reported by Thomas Pfaff in February [0] and fixed post 5.5 [1]. > > Could you try a snapshot and tell me if you can still reproduce it? > > Cheers, > Martin > > [0] http://marc.info/?l=openbsd-bugs&m=139135208628637&w=2 > [1] http://marc.info/?l=openbsd-cvs&m=139194643911061&w=2 I might have failed to upgrade to snapshot but I still have the error. Right now, I got the snapshot install56.fs file, used it to run an upgrade and run sysmerge. I must have done something right as start_daemon isn't available anymore in /etc/rc.local but the error is still present.
Re: kernel page fault on 55-release
Hello Ludovic, On 28/08/14(Thu) 20:52, ludovic coues wrote: > Hello, > > Recently, I get a kernel page fault every time I try to use the > micronucleus [1] command line tool. It 's for uploading an hex file to > ATtiny processor, much like arduino's avrude. The crash is pretty > consistent, occuring every time I run `micronucleus --run`. > I've managed to use it with success in the past on this machine with > 55-release so it might be hardware related. I added a realtek wireless > device since last time I've get a successful run with micronucleus. > > I get the following message when I run it: > uvm_fault(0x81daaf001, 0x2, 2, 0, 1) -> e > kernel: page fault trap, code=0 > Stopped at usbd_get_cdesc+035: movzwl 0x2 (%rax),%eax > > It's followed by the debugger prompt. I don't know how what to do from > that point. I'm willing to spend time tracking the source of the > problem but I have no idea of what I'm looking for. Thanks for reporting the problem. I believe this is the same issue that has been reported by Thomas Pfaff in February [0] and fixed post 5.5 [1]. Could you try a snapshot and tell me if you can still reproduce it? Cheers, Martin [0] http://marc.info/?l=openbsd-bugs&m=139135208628637&w=2 [1] http://marc.info/?l=openbsd-cvs&m=139194643911061&w=2
Re: kernel page fault on 55-release
On 2014-08-28 14:52, ludovic coues wrote: Hello, Recently, I get a kernel page fault every time I try to use the micronucleus [1] command line tool. It 's for uploading an hex file to ATtiny processor, much like arduino's avrude. The crash is pretty consistent, occuring every time I run `micronucleus --run`. I've managed to use it with success in the past on this machine with 55-release so it might be hardware related. I added a realtek wireless device since last time I've get a successful run with micronucleus. I get the following message when I run it: uvm_fault(0x81daaf001, 0x2, 2, 0, 1) -> e kernel: page fault trap, code=0 Stopped at usbd_get_cdesc+035: movzwl 0x2 (%rax),%eax It's followed by the debugger prompt. I don't know how what to do from that point. I'm willing to spend time tracking the source of the problem but I have no idea of what I'm looking for. thanks [1] https://github.com/micronucleus/micronucleus Good day, Ludovic. I have two suggestions: 1) Include a full dmesg with every problem report, even informal reports such as this one. We know you're running 5.5-release, but there are 21 different hardware platforms that release runs on. The dmesg will show your complete hardware configuration, from the kernel's perspective. In addition, that dmesg will show your USB hardware, and the problem is obviously USB-related. 2) The crash(8) man page will give you advice and guidance on what to do at that kernel debugger prompt.