https://bugs.dragonflybsd.org/https://bugs.dragonflybsd.org/favicon.ico?16293952082014-06-22T13:43:05ZDragonFlyBSD bugtrackerDragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=120942014-06-22T13:43:05Zpeeterkaru.pruun@gmail.com
<ul></ul><p>All of the following is about the new usb, u4b.</p>
<p>Commented out all firewire in the kernel config file and set</p>
<p>hw.usb.ohci.debug=15</p>
<p>The last lines before freeze are:</p>
<p>---<br />ohci0.pci0.pcib0.legacy0.nexus0.root0<br />ohci0: <nVidia nForce MCP79 USB Controller> [tentative] mem 0xd3488000-0xd3488fff irq 11 at device 4.0 pci0<br />ohci0: Reserved 0x1000 bytes for rid 0x10 type 3 at 0xd3488000<br />ohci_init: start<br />ohci_controller_init: SMM active, request owner change<br />---FREEZE---</p>
<p>That last output is a DPRINTF at line 179 in sys/bus/u4b/controller/ohci.c. I put some kprintf-s after that to see where how far it gets. The output then is:</p>
<p>---<br />ohci0.pci0.pcib0.legacy0.nexus0.root0<br />ohci0: <nVidia nForce MCP79 USB Controller> [tentative] mem 0xd3488000-0xd3488fff irq 11 at device 4.0 pci0<br />ohci0: Reserved 0x1000 bytes for rid 0x10 type 3 at 0xd3488000<br />ohci_init: start<br />ohci_controller_init: SMM active, request owner change<br />0:1:<br />---FREEZE---</p>
<p>The '1:' is a kprintf("1:"); after OWRITE4 at line 180. It never reaches the kprintfs I put in the 'for' cycle that comes next.</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=120962014-06-25T11:54:15Zprofmakxmarkus.pfeiffer@morphism.de
<ul></ul><p>Hi Peeter,</p>
<p>Can you paste exactly the code where you put the kprintfs? I am not quite clear on where exactly the hang supposedly occurs.</p>
<p>Markus</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=120972014-06-25T12:18:55Zprofmakxmarkus.pfeiffer@morphism.de
<ul><li><strong>Assignee</strong> set to <i>profmakx</i></li></ul> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=120982014-06-25T12:42:34Zpeeterkaru.pruun@gmail.com
<ul></ul><p>Hi Markus</p>
<p>Thanks. The code is here:</p>
<p>--- sys/bus/u4b/controller/ohci.c ---</p>
<p>static usb_error_t<br />ohci_controller_init(ohci_softc_t *sc, int do_suspend)
{<br /> struct usb_page_search buf_res;<br /> uint32_t i;<br /> uint32_t ctl;<br /> uint32_t ival;<br /> uint32_t hcr;<br /> uint32_t fm;<br /> uint32_t per;<br /> uint32_t desca;</p>
<pre><code>/* Determine in what context we are running. <strong>/<br /> ctl = OREAD4(sc, OHCI_CONTROL);<br /> if (ctl & OHCI_IR) {<br /> /</strong> SMM active, request change */<br /> DPRINTF("SMM active, request owner change\n");</code></pre>
<pre><code>kprintf("0:"); //debug</code></pre>
<pre><code>OWRITE4(sc, OHCI_COMMAND_STATUS, OHCI_OCR);</code></pre>
<pre><code>kprintf("1:"); //debug</code></pre>
<pre><code>for (i = 0; (i < 100) && (ctl & OHCI_IR); i++) {</code></pre>
<pre><code>kprintf("."); //debug</code></pre>
<pre><code>usb_pause_mtx(NULL, hz / 1000);<br /> ctl = OREAD4(sc, OHCI_CONTROL);<br /> }</code></pre>
<pre><code>kprintf("2:"); //debug</code></pre>
<pre><code>if (ctl & OHCI_IR) {<br /> device_printf(sc->sc_bus.bdev,<br /> "SMM does not respond, resetting\n");<br /> OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_RESET);<br /> goto reset;<br /> }<br /> } else {<br /> DPRINTF("cold started\n");<br />--- ---</code></pre>
<p>Peeter</p>
<p>--</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=120992014-06-25T13:13:05Zprofmakxmarkus.pfeiffer@morphism.de
<ul></ul><p>Peeter,</p>
<p>if you have the time could you try a current -master or -DragonFly_RELEASE_3_8 and see whether it works now? Cheers.</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121002014-06-25T14:36:28Zpeeterkaru.pruun@gmail.com
<ul></ul><p>I tried DragonFly_RELEASE_3_8. Unfortunately, now it stops quite early at booting, almost the first page after reporting the CPU etc:</p>
<p>--- ---<br />cryptosoft0: <software crypto> on motherboard<br />aesni0: No AESNI support.<br />padlock0: No ACE support.<br />rdrand0: No RdRand support. <br />pcib0: <MTABLE Host-PCI bridge> pcibus 0 on motherboard<br />pci0: <PCI bus> on pcib0<br />MPTABLE: fixed interrupt routing for 0:3 INTA<br />MPTABLE: fixed interrupt routing for 0:3 INTB<br />MPTABLE: fixed interrupt routing for 0:4 INTA<br />---FREEZE---</p>
<p>and the same with boot_verbose=YES:</p>
<p>--- ---<br />MPTABLE: fixed interrupt routing for 0:3 INTB<br />MPTABLE: 0:3 INTB routed to irq 14<br />IOAPIC: irq 14, gsi 14 edge/high <del>> level/low<br />found</del>> vendor=0x10de. . .<br />. . .<br /> map<sup><a href="#fn10">10</a></sup>: type Memory, range 32, base 0xd3488000, size 12, enabled<br />MPTABLE: fixed interrupt routing for 0:4 INTA<br />MPTABLE: 0:4 INTA routed to irq 11<br />IOAPIC: irq 11, gsi 11 edge/high <del>> level/low<br />unknown: Reserved 0x1000 bytes for rid 0x10 type 3 at 0xd3488000<br />ohci early: SMM active, request owner change<br />---FREEZE--</del></p>
<p>I commented out firewire in the kern config. Should I try with firewire?</p>
<p>Peeter</p>
<p>--</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121012014-06-25T15:07:03Zprofmakxmarkus.pfeiffer@morphism.de
<ul></ul><p>This is becoming weird. We're doing exactly the same thing that FreeBSD does. Do you use any differing options (ACPI on/off or anything)? It seems that requesting the ownership change from SMM to OS from OHCI hangs the system.</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121022014-06-26T03:26:49Zpeeterkaru.pruun@gmail.com
<ul></ul><p>Yes, I have ACPI off since DFly does not boot with ACPI: DFly 3.6, 3.8, master all freeze at boot immediately with ACPI on. When ACPI is on, the message at boot before freezing is:</p>
<p>--- ---<br />ACPI: APIC . . .<br />ACPI: APIC . . . <br />ACPI: MCFG . . .<br />ACPI: ASF! . . .<br />ACPI: SBST . . .<br />ACPI: ECDT . . .<br />ACPI: SSDT . . .<br />ACPI: SSDT . . .<br />ACPI: SSDT . . .<br />cryptosoft0: <software crypto> on motherboard<br />aesni0: No AESNI support<br />padlock0: No ACE support<br />rdrand0: No RdRand support<br />acpi0: <APPLE Apple00> on motherboard<br />ACPI: All ACPI Tables successfully acquired <br />---FREEZE---</p>
<p>FBSD 10.0 does boot with ACPI on and all is fine. However, now that you ask I turned ACPI off at FBSD 10.0 booting and it panics immediately at boot:</p>
<p>---FBSD 10.0 with ACPI off---<br />SMAP type. . .<br />SMAP type. . .<br />APIC: Could not find any APICs.<br />panic: running without device atpic requires a local APIC<br />cpuid = 0<br />KDB: stack backtrace: <br />. . .<br />Uptime: 1s<br />---FREEZE---</p>
<p>I also tried DFly master just as a quick consistency check that I did not miss anything while building kernel but its behavior is identical to DFly_RELEASE_3_8.</p>
<p>So all in all: in order for FBSD 10.0 to boot it must have ACPI on. But DFly freezes with ACPI on even before getting to pci or usb. DFly with ACPI off freezes as described above.</p>
<p>Questions regarding DFly ACPI would have been next on my list.</p>
<p>Let me know if I can send any more debug info or do anything to help further.</p>
<p>Peeter</p>
<p>--</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121032014-06-26T07:07:11Zswildner
<ul></ul><p>Regarding ACPI:</p>
<ul>
<li>Does booting verbosely with ACPI enabled give further messages?</li>
</ul>
<ul>
<li>Does the box have the latest BIOS?</li>
</ul>
<ul>
<li>Can you boot the box without ACPI and put up the output of acpidump -b somewhere for further inspection? Do it in an empty directory, as it will output a number of .dat files. I <em>think</em> it should work without acpi.ko loaded.</li>
</ul>
<p>We really should look at the ACPI issues now because ACPI is actually mandatory on x86_64.</p>
<p>S.</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121042014-06-26T07:27:47Zpeeterkaru.pruun@gmail.com
<ul></ul><p>A few quick clarifications:</p>
<ul>
<li>No unfortunately there are no further messages. This was the verbose one that I got with "set boot_verbose=YES" and "set verbose=YES". Is there anything more that I could set specifically to make ACPI more verbose, like there is "set hw.usb.ohci.debug=15" for ohci?</li>
</ul>
<ul>
<li>It is a macbookpro5,5, so it has an Apple EFI, not BIOS.</li>
</ul>
<ul>
<li>I will get the ACPI dump from DFly. I can also get the dumps from FBSD if it is of any help and/or if DFly does not give acpidump without acpi.ko loaded.</li>
</ul>
<p>Peeter</p>
<p>--</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121052014-06-26T07:41:21Zpeeterkaru.pruun@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/1109">dfly-3.6-x86_64-macbookpro5,5-acpidump-b.tgz</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1109/dfly-3.6-x86_64-macbookpro5,5-acpidump-b.tgz">dfly-3.6-x86_64-macbookpro5,5-acpidump-b.tgz</a> added</li></ul><p>The "acpidump -b" is attached. Does it look like one you expected? Regarding your question re the EFI's version, no I haven't updated it. It's the original one.</p>
<p>Peeter</p>
<p>--</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121062014-06-26T07:44:30Zswildner
<ul></ul><p>The log you gave in <a class="external" href="http://bugs.dragonflybsd.org/issues/2686#note-8">http://bugs.dragonflybsd.org/issues/2686#note-8</a> which ends with</p>
<p>rdrand0: No RdRand support <br />acpi0: <APPLE Apple00> on motherboard <br />ACPI: All ACPI Tables successfully acquired</p>
<p>does not look verbose. Can you try with 'v' from the loader menu or (to enable it permanently) putting boot_verbose=yes in /boot/loader.conf?</p>
<p>Sascha</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121072014-06-26T08:14:25Zpeeterkaru.pruun@gmail.com
<ul></ul><p>OK sorry, here are excerpts from booting master. (I will try to get a video shot in a couple of hours and report back.)</p>
<p>--- --- <br />SMAP. . .<br />SMAP. . .<br />Copyright. . .<br />Slab ZoneSize set to 128KB<br />Leaving critical section, allowing interrupts<br />ACPI SDT: RSDP not in EBDA<br />ACPI SDT: RSDP in BIOS mem<br />ACPI FADT: SCI irq 9, conform/conform<br />DragonFly v.3.9.0.152. . .<br />Calibrating clock(s) . . .<br />. . .<br />avail memory = . . . <br />ACPI MADT: LAPIC address 0xfee00000, flags 0x1<br />ACPI MADT: BSP apic id 0<br />ACPI MADT: cpu id 0, apic id 0<br />ACPI MADT: cpu id 1, apic id 1<br />lapic: divisor index 0, frequency 132667255 Hz<br />SMP: CPU0 apic_initialize():<br /> lint0: 0x00010700 lint1: 0x00000400 TPR: 0x00000000 SVR: 0x000001ff</p>
<p>. . . not sure about this---went by too fast . . .</p>
<p>crypto: cryptosoft0 registers alg 14 flags 0 maxoplen 0</p>
<p>. . . lots of crypto here . . .</p>
<p>cryptosoft0: <software crypto> [attached!] on motherboard <br />aesni0: No AESNI support.<br />padlock0: No ACE support. <br />rdrand0: No RdRand support. <br />acpi0.nexus0.root0<br />acpi0: <APPLE Apple00> [tentative] on motherboard<br />ACPI: All ACPI Tables successfully acquired<br />PCIe: Memory Mapped configuration base @ 0xf0000000, bus [0, 255]<br />PCIe: Using Memory Mapped configuration<br />---FREEZE---</p>
<p>Peeter</p>
<p>--</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121082014-06-26T09:16:53Zswildner
<ul></ul><p>Can you try putting:</p>
<p>hw.pci.mcfg=0</p>
<p>in /boot/loader.conf and booting with ACPI enabled?</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121092014-06-26T10:30:02Zpeeterkaru.pruun@gmail.com
<ul></ul><p>Then it shows the same messages as a couple of posts above and freezes (verbose is on):</p>
<p>--- --- <br />ACPI: APIC . . . <br />ACPI: APIC . . . <br />ACPI: MCFG . . . <br />ACPI: ASF! . . . <br />ACPI: SBST . . . <br />ACPI: ECDT . . . <br />ACPI: SSDT . . . <br />ACPI: SSDT . . . <br />ACPI: SSDT . . . <br />cryptosoft0: <software crypto> on motherboard <br />aesni0: No AESNI support <br />padlock0: No ACE support <br />rdrand0: No RdRand support <br />acpi0: <APPLE Apple00> on motherboard <br />ACPI: All ACPI Tables successfully acquired <br />---FREEZE---</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121102014-06-26T10:43:49Zpeeterkaru.pruun@gmail.com
<ul></ul><p>As far as I can verify the ACPI: lines incl the addresses are identical to the ones contained in the FBSD dmesg above in the first post:</p>
<p>DFly: <br />--- ---<br />ACPI: APIC 0x00000000BFEEA000 000068 (v01 APPLE Apple00 00000001 Loki 0000005F)</p>
<p>. . .</p>
<hr />
<p>FBSD: <br />--- ---<br />ACPI: APIC 0xbfeea000 00068 (v01 APPLE Apple00 00000001 Loki 0000005F)<br />ACPI: APIC 0xbfee9000 00068 (v02 APPLE Apple00 00000001 Loki 0000005F)<br />ACPI: MCFG 0xbfee8000 0003C (v01 APPLE Apple00 00000001 Loki 0000005F)<br />ACPI: ASF! 0xbfee7000 000A5 (v32 APPLE Apple00 00000001 Loki 0000005F)<br />ACPI: SBST 0xbfee6000 00030 (v01 APPLE Apple00 00000001 Loki 0000005F)<br />ACPI: ECDT 0xbfee5000 00053 (v01 APPLE Apple00 00000001 Loki 0000005F)<br />ACPI: SSDT 0xbfec7000 004DC (v01 APPLE CpuPm 00003000 INTL 20061109)<br />ACPI: SSDT 0xbfecc000 000A5 (v01 SataRe SataPri 00001000 INTL 20061109)<br />ACPI: SSDT 0xbfecb000 0009F (v01 SataRe SataSec 00001000 INTL 20061109)<br />--- ---</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121112014-06-26T12:19:46Zprofmakxmarkus.pfeiffer@morphism.de
<ul></ul><p>digging around in the big dump of things turns up things like these:</p>
<p><a class="external" href="http://svnweb.freebsd.org/base?view=revision&revision=196769">http://svnweb.freebsd.org/base?view=revision&revision=196769</a><br /><a class="external" href="http://lists.freebsd.org/pipermail/svn-src-head/2010-November/022705.html">http://lists.freebsd.org/pipermail/svn-src-head/2010-November/022705.html</a></p>
<p>This might be something most quickly solved by prodding matt. I will first need to understand whats going on in that part of the system.</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121132014-06-27T21:04:16Zprofmakxmarkus.pfeiffer@morphism.de
<ul></ul><p>peeter,</p>
<p>can you try the patch <a class="external" href="http://leaf.dragonflybsd.org/~profmakx/0001-Change-PAT-MSR-to-solve-freezes-with-MacBooks.patch">http://leaf.dragonflybsd.org/~profmakx/0001-Change-PAT-MSR-to-solve-freezes-with-MacBooks.patch</a></p>
<p>please? Boot with this patch applied to -master and ACPI enabled.</p>
<p>Cheers,<br />Markus</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121142014-06-28T01:58:36Zpeeterkaru.pruun@gmail.com
<ul></ul><p>Hi Markus</p>
<p>It does not hang on ACPI any more---it's a massive progress! It does freeze though, but much later in the booting process, at the same place we started with. It gives a db prompt but unfortunately no call dumpsys since the machine freezes.</p>
<p>---NO verbose--- <br />pci4: <ACPI PCI bus> on pcib4<br />pcib4: No _PTR found, routing with pci<br />fwohci0: vendor=11c1, dev=5901<br />fwohci0: <1394 Open Host Controller Interface> mem 0xd3100000-0xd3100fff irq 19 at device 0.0 on pci4</p>
<p>Fatal trap 12: page fault while in kernel mode<br />cpuid = 0; lapic->id = 00000000<br />fault virtual address = 0x38<br />fault code = . . .</p>
<p>. . .</p>
<p>CPU0 stopping CPUs: 0x00000002<br /> stopped<br />Stopped at taskqueue_thread_loop+0x2f: lock addl $0x1,0x38(%rbx)<br />db> <br />---FREEZE---</p>
<p>I can't call dumpsys, the system is frozen.</p>
<p>With boot_verbose=YES and "options USB_DEBUG" in kernel I see this last message:</p>
<p>---boot_verbose=YES---<br />fwohci0: <1394 Open Host Controller Interface> [tentative] mem 0xd3100000-0xd3100fff irq 19 at device 0.0 on pci4<br />fwohci0: latency timer 0 -> 32.<br />fwohci0: cache size 64 -> 64.<br />fwohci0: Reserved 0x1000 bytes for rid 0x10 type 3 at 0xd31000000</p>
<p>Fatal trap 12: page fault while in kernel mode</p>
<p>. . .</p>
<p>db> <br />---FREEZE---</p>
<p>Can't get dumpsys.</p>
<p>I can try and compile without firewire as above?</p>
<p>Peeter</p>
<p>--</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121152014-06-28T08:00:05Zprofmakxmarkus.pfeiffer@morphism.de
<ul></ul><p>It's worth a try. I'll have a sharp look at my patch again to make sure I didn't mess up constants.</p>
<p>Does the kernel print a backtrace, or at least an address at which the panic happens?</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121162014-06-28T08:43:02Zpeeterkaru.pruun@gmail.com
<ul></ul><p>Unfortunately no backtrace, the complete message is always this:</p>
<p>The complete panic msg is always this:</p>
<p>--- ---<br />Fatal trap 12: page fault while in kernel mode<br />cpuid = 0; lapic->id = 00000000<br />fault virtual address = 0x38<br />fault code = supervisor write data, page not present<br />instruction pointer = 0x8:0xffffffff806197fc<br />stack pointer = 0x10:0xffffffe0fbc2ba90<br />frame pointer = 0x10:0xffffffe0fbc2bab0<br />code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 0, def32 0, gran 1<br />processor eflags = interrupt enabled, resume, IOPL = 0<br />current process = Idle<br />current thread = pri 12 (CRIT)<br />kernel: type 12 trap, code=2</p>
<p>CPU0 stopping CPUs: 0x00000002<br /> stopped<br />Stopped at taskqueue_thread_loop+0x2f: lock addl $0x1,0x38(%rbx)<br />db><br />--- ---</p>
<p>The new thing in boot messages were the above lines (in boot_verbose=NO):</p>
<p>---<br />pci4: <ACPI PCI bus> on pcib4 <br />pcib4: No _PTR found, routing with pci <br />---</p>
<p>I had not seen this before.</p>
<p>I'll try and compile w/o firewire.</p>
<p>Peeter</p>
<p>--</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121172014-06-28T09:27:53Zpeeterkaru.pruun@gmail.com
<ul></ul><p>Without firewire support in the kernel, the picture looks a little different. Now the messages before freeze are:</p>
<p>---boot_verbose=NO--- <br />cpu_cst1: <ACPI CPU C-state> on cpu1<br />cpu_pst1: <ACPI CPU C-state> on cpu1<br />clockmod1: <CPU clock modulation> on cpu1<br />coretemp1: <CPU On-Die Thermal Sensors> on cpu1</p>
<p>Fatal trap 12: page fault while in kernel mode<br />cpuid = 0; lapic->id = 00000000<br />fault virtual address = 0x38<br />fault code = supervisor write data, page not present<br />instruction pointer = 0x8:0xffffffff806086cc<br />stack pointer = 0x10:0xffffffe0fbc2ba90<br />frame pointer = 0x10:0xffffffe0fbc2bab0<br />code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 0, def32 0, gran 1<br />processor eflags = interrupt enabled, resume, IOPL = 0<br />current process = Idle<br />current thread = pri 12 (CRIT) <br />kernel: type 12 trap, code=2</p>
<p>CPU0 stopping CPUs: 0x00000002<br /> stopped<br />Stopped at taskqueue_thread_loop+0x2f: lock addl $0x1,0x38(%rbx)<br />db><br />---FREEZE---</p>
<p>Unfortunately no dumpsys since all is frozen. The verbose one is:</p>
<p>--- ---<br />clockmod1: <CPU clock modulation> [tentative] on cpu1<br />clockmod1: <CPU clock modulation> [attached!] on cpu1<br />coretemp1.cpu1.acpi0.nexus0.root0<br />coretemp1: <CPU On-Die Thermal Sensors> [tentative] on cpu1<br />coretemp1: Setting TjMax=100</p>
<p>Fatal trap 12: page fault while in kernel mode<br />cpuid = 0; lapic->id = 00000000<br />fault virtual address = 0x38<br />fault code = supervisor write data, page not present<br />instruction pointer = 0x8:0xffffffff806086cc<br />stack pointer = 0x10:0xffffffe0fbc2ba90<br />frame pointer = 0x10:0xffffffe0fbc2bab0<br />code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 0, def32 0, gran 1<br />processor eflags = interrupt enabled, resume, IOPL = 0<br />current process = Idle<br />current thread = pri 12 (CRIT) <br />kernel: type 12 trap, code=2</p>
<p>CPU0 stopping CPUs: 0x00000002<br /> stopped<br />Stopped at taskqueue_thread_loop+0x2f: lock addl $0x1,0x38(%rbx)<br />db><br />---FREEZE---</p>
<p>Peeter</p>
<p>--</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121202014-07-01T00:22:31Zprofmakxmarkus.pfeiffer@morphism.de
<ul></ul><p>Hi Peeter,</p>
<p>can you try the patch at (with the previous one reverted)?</p>
<p><a class="external" href="http://leaf.dragonflybsd.org/~profmakx/0002-Change-PAT-MSR-to-solve-freezes-with-MacBooks.patch">http://leaf.dragonflybsd.org/~profmakx/0002-Change-PAT-MSR-to-solve-freezes-with-MacBooks.patch</a></p>
<p>I can't see how it should make any difference, but since I can also not test it's a little bit of stab-and-prod now.</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121212014-07-01T02:29:43Zpeeterkaru.pruun@gmail.com
<ul></ul><p>Hi Markus</p>
<p>Thanks, are you sure this is the patch you meant? Diff shows the first and the second patch are identical. . .</p>
<p>Peeter</p>
<p>--</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121222014-07-01T09:13:34Zprofmakxmarkus.pfeiffer@morphism.de
<ul></ul><p>Hi Peeter,</p>
<p>yeah, I am sure. Sorry I overwrote the old patch and it's just a suble difference.</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121232014-07-01T09:16:08Zpeeterkaru.pruun@gmail.com
<ul></ul><p>Yep sry :), just realized this. Am compiling. . .</p>
<p>P</p>
<p>--</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121242014-07-01T11:01:56Zpeeterkaru.pruun@gmail.com
<ul></ul><p>Unfortunately it freezes at the same location with similar messages (kernel is WITH firewire):</p>
<p>--- patch-0002 --- boot_verbose=NO ---</p>
<p>pci4: <ACPI PCI bus> on pcib4 <br />pcib4: No _PTR found, routing with pci <br />fwohci0: vendor=11c1, dev=5901 <br />fwohci0: <1394 Open Host Controller Interface> mem 0xd3100000-0xd3100fff irq 19 at device 0.0 on pci4</p>
<p>Fatal trap 12: page fault while in kernel mode <br />cpuid = 0; lapic->id = 00000000 <br />fault virtual address = 0x38 <br />fault code = supervisor write data, page not present <br />instruction pointer = 0x8:0xffffffff806199ec <br />stack pointer = 0x10:0xffffffe0fbc1aa90 <br />frame pointer = 0x10:0xffffffe0fbc1aab0<br />code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 0, def32 0, gran 1 <br />processor eflags = interrupt enabled, resume, IOPL = 0 <br />current process = Idle <br />current thread = pri 12 (CRIT) <br />kernel: type 12 trap, code=2</p>
<p>CPU0 stopping CPUs: 0x00000002 <br />stopped <br />Stopped at +0x2f: lock addl $0x1,0x38(%rbx) <br />db></p>
<p>---FREEZE---</p>
<p>and the verbose:</p>
<p>--- patch-0002 --- boot_verbose=YES ---</p>
<p>fwohci0: <1394 Open Host Controller Interface> [tentative] mem 0xd3100000-0xd3100fff irq 19 at device 0.0 on pci4<br />fwohci0: latency timer 0 -> 32.<br />fwohci0: cache size 64 -> 64.<br />fwohci0: Reserved 0x1000 bytes for rid 0x10 type 3 at 0xd31000000</p>
<p>Fatal trap 12: page fault while in kernel mode<br />cpuid = 0; lapic->id = 00000000<br />fault virtual address = 0x38<br />fault code = supervisor write data, page not present<br />instruction pointer = 0x8:0xffffffff806199ec<br />stack pointer = 0x10:0xffffffe0fbc1aa90<br />frame pointer = 0x10:0xffffffe0fbc1aab0<br />code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 0, def32 0, gran 1<br />processor eflags = interrupt enabled, resume, IOPL = 0<br />current process = Idle<br />current thread = pri 12 (CRIT) <br />kernel: type 12 trap, code=2</p>
<p>CPU0 stopping CPUs: 0x00000002<br /> stopped<br />Stopped at +0x2f: lock addl $0x1,0x38(%rbx)<br />db></p>
<p>---FREEZE---</p>
<p>Can't get dumpsys since kbd frozen.</p>
<p>Peeter</p>
<p>--</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121252014-07-01T11:17:56Zprofmakxmarkus.pfeiffer@morphism.de
<ul></ul><p>grml.</p>
<p>Any chance you can upload your kernel or at least the kernel config so i can dig around what's going wrong at that panic?</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121262014-07-01T11:59:17Zpeeterkaru.pruun@gmail.com
<ul></ul><p>Thanks! Patched kernels (with respectively the first and the second patch, dfly-3.9-x86_64):</p>
<p><a class="external" href="https://dl.dropboxusercontent.com/u/27306304/kernel-patch/kernel-patch-0001.tgz">https://dl.dropboxusercontent.com/u/27306304/kernel-patch/kernel-patch-0001.tgz</a></p>
<p><a class="external" href="https://dl.dropboxusercontent.com/u/27306304/kernel-patch/kernel-patch-0002.tgz">https://dl.dropboxusercontent.com/u/27306304/kernel-patch/kernel-patch-0002.tgz</a></p>
<p>kernconf is X86_64_GENERIC with "options USB_DEBUG"</p>
<p><a class="external" href="https://dl.dropboxusercontent.com/u/27306304/kernel-patch/X86_64_GENERIC-NU">https://dl.dropboxusercontent.com/u/27306304/kernel-patch/X86_64_GENERIC-NU</a></p>
<p>Let me know if you have problems accessing these.</p>
<p>Peeter</p>
<p>--</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121282014-07-02T18:01:03Zprofmakxmarkus.pfeiffer@morphism.de
<ul></ul><p>Peeter,</p>
<p>There have been a couple of commits in the taskqueue code recently in -master. Could you try current master + my patch? Are you using the built-in keyboard of the macbook? Do you know whether that's connected by USB?<br />the fact that it doesn't dump is probably due to it not having setup a dumpdev yet.</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121292014-07-03T03:33:37Zpeeterkaru.pruun@gmail.com
<ul></ul><p>Thanks, pulled the latest master and tried both patch-0001 and patch-0002 but unfortunately everything remains the same: freeze, panic, no dumpsys and the same panic message.</p>
<p>You're right about the kbd being a USB device (<a class="external" href="https://discussions.apple.com/message/24166876">https://discussions.apple.com/message/24166876</a>, second hit when searching for "keyboard"). I use the built-in kbd yes.</p>
<p>I tried "set dumpdev=disk0s1b:" at the loader prompt but no dumpsys.</p>
<p>This is probably of no relevance, but found</p>
<p><a class="external" href="http://www.opensource.apple.com/source/xnu/xnu-1699.32.7/osfmk/i386/mtrr.c">http://www.opensource.apple.com/source/xnu/xnu-1699.32.7/osfmk/i386/mtrr.c</a></p>
<p>and there are a few hits when you search PAT and setting the WC bit; I have no idea what's going on though.</p>
<p>Peeter</p>
<p>--</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=121302014-07-03T16:03:55Zprofmakxmarkus.pfeiffer@morphism.de
<ul></ul><p>Hi Peeter,</p>
<p>this gives me a hint where to look, cheers.</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=126792015-06-29T02:25:33Zpeeterkaru.pruun@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/1257">0001-Program-PAT-indices-5-as-WP-from-default-WT-and-6-as.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1257/0001-Program-PAT-indices-5-as-WP-from-default-WT-and-6-as.patch">0001-Program-PAT-indices-5-as-WP-from-default-WT-and-6-as.patch</a> added</li></ul><p>Hello</p>
<p>I've come back to this issue---and while I don't have a solution yet it seems you were on the right track Markus. It seems there are several issue involved. The patch you gave above is part of the solution. The discussion in the FreeBSD list</p>
<p>discussion: <br /><a class="external" href="http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021485.html">http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021485.html</a></p>
<p>solution: <br /><a class="external" href="http://lists.freebsd.org/pipermail/svn-src-head/2010-November/022705.html">http://lists.freebsd.org/pipermail/svn-src-head/2010-November/022705.html</a></p>
<p>shows that many macbookpro models had an issue with PAT and changing from bits (4, 5) to bits (5, 6) resolved that.</p>
<p>I improved Markus' patch a little (attached) bit since you also have to change the masks for the MSR register accordingly [1]. With this patch the system gets ACPI working in</p>
<p>macbookpro5,1<br />macbookpro5,5 <br />iMac9,1</p>
<p>as confirmed in the FreeBSD list and macbookpro5,5 I can confirm myself. Since FreeBSD boots on other systems the patch does not affect systems that work either way.</p>
<p>Question: the original FreeBSD commit</p>
<p><a class="external" href="http://lists.freebsd.org/pipermail/svn-src-head/2010-November/022705.html">http://lists.freebsd.org/pipermail/svn-src-head/2010-November/022705.html</a></p>
<p>also changes the pmap_cache_bits() routine; DragonFly pmap.c does not have this routine but it should be checked if there might be similar routines that need adjusting.</p>
<p>The next step: I suspect there is something off with the acpi--pci link since the error before crash is that _PRT is not found. I'll dig further.</p>
<p>Peeter</p>
<p>[1] pages 11-34 to 11-35, Vol. 3A in: <a class="external" href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-system-programming-manual-325384.pdf">http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-system-programming-manual-325384.pdf</a></p>
<p>--</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=126802015-06-29T12:46:12Zprofmakxmarkus.pfeiffer@morphism.de
<ul></ul><p>Oh my god, I am so sorry. I did exactly what your patch does, but apparently that didn't end up in the patch I posted. I'll apply this, and test it. Unfortunately it'll be too late for 4.2, but 4.2.1 will then contain this fix (as well as -master of course).</p>
<p>Thanks again.</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=126822015-06-29T13:14:46Zprofmakxmarkus.pfeiffer@morphism.de
<ul></ul><p>Can you specify what you mean by "the crash"?</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=126832015-06-29T13:44:19Zpeeterkaru.pruun@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/1258">no-prt-found-dragonfly-boot-crash.jpg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1258/no-prt-found-dragonfly-boot-crash.jpg">no-prt-found-dragonfly-boot-crash.jpg</a> added</li></ul><p>Thanks! I mean the kernel still panics later in the boot process (see attached jpg) and gives the db> prompt. But since the keyboard is hung/frozen, I can't call dumpsys.</p>
<p>There's an error message at the top "pcib4: No _PRT found, routing with pci". This should not happen normally. I'm wondering if tweaking acpi--pci will get rid of this message and of the trap. When FreeBSD is booting, it handles all the pci devices without that error message; DragonFly should do the same.</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=126842015-06-29T14:04:07Zpeeterkaru.pruun@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/1259">dragonfly-boot-crash-verbose-no-prt.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1259/dragonfly-boot-crash-verbose-no-prt.png">dragonfly-boot-crash-verbose-no-prt.png</a> added</li></ul><p>And here's the verbose boot---it's less helpful though since the "No _PRT found" error is out of the screen. I am working with the assumption that the latter is the culprit.</p>
<p>Ideally one would get the keyboard working but I have no idea how the keyboard is driven before the devices have been probed. I booted with "boot_ddb=1", the system drops to db prompt but the keyboard is hung/frozen. I think the internal keyboard is a usb device.</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=126852015-06-30T02:18:05Zpeeterkaru.pruun@gmail.com
<ul></ul><p>It would be helpful if one could get a dumpsys. Since the keyboard is hung/frozen, I tried to "fake" a call dumpsys by brute force: I hardcoded in the</p>
<p>sys/ddb/db_lex.c: db_read_line()</p>
<p>that it returns "call dumpsys" to</p>
<p>sys/ddb/db_input.c: db_readline()</p>
<p>And so indeed it went to</p>
<p>sys/kern/kern_shutdown.c: dumpsys()</p>
<p>but alas: in that routine, the if condition at line 913</p>
<p>dumper.dumper != NULL</p>
<p>failed and no dumpsys. I do not know how to correctly initialize the dumper struct so dumpsys is executed. Any ideas how to do that?</p>
<p>Figuring out why the keyboard does not work might be harder since with FreeBSD keyboard hangs too when the kernel drops to ddb immediately after booting.</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=131572017-06-06T14:23:00Zpeeterkaru.pruun@gmail.com
<ul><li><strong>File</strong> <i>fbsd-11.dmesg</i> added</li></ul><p>For what it's worth, here's the FreeBSD 11 verbose boot.</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=131582017-06-06T14:32:37Zpeeterkaru.pruun@gmail.com
<ul><li><strong>File</strong> deleted (<del><i>fbsd-11.dmesg</i></del>)</li></ul> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=131592017-06-06T14:33:40Zpeeterkaru.pruun@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/1397">fbsd-11.dmesg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1397/fbsd-11.dmesg">fbsd-11.dmesg</a> added</li></ul><p>The last attachment did not come through. Try again.</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=131602017-06-11T09:30:05Zpeeterkaru.pruun@gmail.com
<ul></ul><p>DragonFly boots on macbookpro5,5 as of these commits</p>
<p><a class="external" href="https://gitweb.dragonflybsd.org/dragonfly.git/commit/f6520cce7cc497d0d35ef0fc771daf741d9134cf">https://gitweb.dragonflybsd.org/dragonfly.git/commit/f6520cce7cc497d0d35ef0fc771daf741d9134cf</a><br /><a class="external" href="https://gitweb.dragonflybsd.org/dragonfly.git/commit/704f404a0d28f2071a8c86686d90388c6ad28a26">https://gitweb.dragonflybsd.org/dragonfly.git/commit/704f404a0d28f2071a8c86686d90388c6ad28a26</a></p>
<p>given the kernel is compiled without bwn and siba_bwn. After boot, one can load siba_bwn and bwn without crashing the kernel; they do not attach though.</p>
<p>It is still open why the two drivers crash the kernel at boot but not afterwards, but this can be investigated in another PR.</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=131612017-06-11T09:33:43Zpeeterkaru.pruun@gmail.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li></ul><p>Closed.</p> DragonFlyBSD - Bug #2686: kernel 3.8.1 freezes and panics at boothttps://bugs.dragonflybsd.org/issues/2686?journal_id=138422019-12-20T15:44:40Zdaftaupepierre-alain@toret.fr
<ul></ul><p>I'm adding a note as a reminder, because this ticket helped me boot and install DragonFly 5.7 on my Macbook 4,1.</p>
<p>I had to compile kernel without bwn and siba_bwn and remove /boot/kernel/if_bwn.ko and /boot/kernel/siba_bwn.ko from the install media.</p>
<p>After that I could install DragonFly without any issue, I haven't tried loading the modules later as I'm not using the wifi on this laptop.</p>