Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#5550 closed bug (fixed)

Boot Panic with ipwifi3945(abg) : out of MTRRs! [r35779]

Reported by: composr Owned by: bonefish
Priority: critical Milestone: Unscheduled
Component: System/Kernel Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: x86

Description

Hello all, this is finally my first submission, which I will be happy to work out with the developers as much as possible. I have been following Haiku for a long time, and have been wanting to be more involved, so here we go.

Setup I am running this particular build of Haiku on a Dell Latitude D830, which contains an Intel PROSet Wireless 3495ABG adapter. I have the machine set up with 4 partitions:

  • sda1: Linux / (root)
  • sda2: [swap]
  • sda3: Linux /liferay (for work projects)
  • sda4: Haiku

All seems well, and I have the development environment set up in my Linux system, following the configuration for a GCC4-cross-compile and all.

Procedure I updated my SVN to hrev35779 and built out a raw image, which was then written to a USB stick. I rebooted from the USB stick to find it would not boot. The splash screen shows up, and each icon lights up predictably during the boot process. Once the boot script is launched, I get a black screen indefinitely. Upon reboot, and configuring the screen dump instead of the splash screen, I end up with the following panic message:

"(PANIC: add_used_mtrr(0xe00000000, 0x20000000, 1): out of MTRRs!)"

I cannot retrieve the end of what the screen dump says, because it dumps to the screen, which immediately clears and drops to the kernel debugger.

There are two ways I have confirmed this is a result of the wireless chipset:

1) Upon reboot, I drop into the BIOS setup, and disable the wireless adapter completely. Upon save and continue booting, Haiku boots as normal. 2) I have rebuilt Haiku, commenting out the inclusion of the wifi drivers in the HaikuImage ruleset in jam. Upon boot, proceeds as expected with no errors.

Unfortunately, since the only way to get system information is through turning off the wireless adapter, it does not show up in the dumps I am attaching. I will plan on rebuilding Haiku, commenting out the wifi drivers install script, and hope that I can get it booted so I can provide dumps that contain the wireless adapter's information.

I apologise for any confusion, and look forward to helping out as much as possible.

Attachments (11)

syslog.panic.txt (183.1 KB ) - added by composr 14 years ago.
Current syslog, with one failed boot and one successful
kdbg-ints.txt (1.9 KB ) - added by composr 14 years ago.
Kernel Debugger interrupts immediately following panic
kernel-dbg-message.txt (65 bytes ) - added by composr 14 years ago.
Kdbg Panic message
listdev.txt (3.1 KB ) - added by composr 14 years ago.
Listdev containing a disabled wireless adapter
listimage-drivers.txt (1.5 KB ) - added by composr 14 years ago.
Once again, the wireless adapter is BIOS-disabled
lspci-linux.txt (2.1 KB ) - added by composr 14 years ago.
Device dump from Linux, to give a more accurate picture
dmesg.txt (56.1 KB ) - added by composr 14 years ago.
Dmesg dump from Linux
debug.txt (73.7 KB ) - added by composr 14 years ago.
Debug dump from linux
kern.log.txt (270.1 KB ) - added by composr 14 years ago.
Kernel log from Linux
MTRR_output.txt (5.0 KB ) - added by diver 14 years ago.
syslog (94.5 KB ) - added by diver 14 years ago.
syslog from hrev35830

Download all attachments as: .zip

Change History (25)

by composr, 14 years ago

Attachment: syslog.panic.txt added

Current syslog, with one failed boot and one successful

by composr, 14 years ago

Attachment: kdbg-ints.txt added

Kernel Debugger interrupts immediately following panic

by composr, 14 years ago

Attachment: kernel-dbg-message.txt added

Kdbg Panic message

by composr, 14 years ago

Attachment: listdev.txt added

Listdev containing a disabled wireless adapter

by composr, 14 years ago

Attachment: listimage-drivers.txt added

Once again, the wireless adapter is BIOS-disabled

by composr, 14 years ago

Attachment: lspci-linux.txt added

Device dump from Linux, to give a more accurate picture

in reply to:  description comment:1 by composr, 14 years ago

Priority: blockercritical

I would like to clarify that this has occurred for me on previous revisions; ever since the wifi stack was included by default in the build, I have had this problem with this wireless adapter. Hope that makes the issue clearer. :)

comment:2 by anevilyak, 14 years ago

Component: Network & Internet/WirelessSystem/Kernel
Owner: changed from axeld to bonefish
Status: newassigned
Version: R1/alpha1R1/Development

comment:3 by stippi, 14 years ago

This panic was recently introduced by Ingo, after he worked some more on the MTRR setup routine. It is a continuable panic, just type "cont" at the kernel debugger prompt (possibly multiple times). I think what could be useful is attaching your MTRR setup from Linux, I forgot how that is retrieved. Either you can find instructions in another ticket, or perhaps Ingo or someone else leaves a note.

in reply to:  3 ; comment:4 by composr, 14 years ago

Platform: Allx86

I understand it is an MTRR setup issue, however, it is irresolvable without disabling the wireless controller. I have attempted, at muiltiple builds and boots, to continue from the kernel debugger. After about two or three panics, it simply freezes the system. I have left it alone for up to fifteen minutes after that, with no response from the system, and had to force a shutdown. I am attaching the dmesg, kern.log and debug dumps from linux. Let me know what else I can do to help :) Thanks!

by composr, 14 years ago

Attachment: dmesg.txt added

Dmesg dump from Linux

by composr, 14 years ago

Attachment: debug.txt added

Debug dump from linux

by composr, 14 years ago

Attachment: kern.log.txt added

Kernel log from Linux

in reply to:  4 ; comment:5 by bonefish, 14 years ago

Replying to composr:

I understand it is an MTRR setup issue, however, it is irresolvable without disabling the wireless controller. I have attempted, at muiltiple builds and boots, to continue from the kernel debugger. After about two or three panics, it simply freezes the system.

As in "can't enter the kernel debugger via Alt-SysReq-D"? Or does it just fail continuing to boot? An unfortunate side effect of a panic in the boot process is that, if you stay too long in KDL, I/O can time out, which might stop the boot process.

I have left it alone for up to fifteen minutes after that, with no response from the system, and had to force a shutdown. I am attaching the dmesg, kern.log and debug dumps from linux. Let me know what else I can do to help :) Thanks!

The Linux stuff is not so interesting. A complete syslog up to the point where the panic() occurs would be helpful. Unfortunately the interesting part is missing in the attached one. If you could capture the serial output, that would be perfect. Alternatively in the kernel debugger a "syslog | tail 50" may or may not contain the missing output (more might be needed). You could also try a to replace the panic() in http://dev.haiku-os.org/browser/haiku/trunk/src/system/kernel/arch/x86/arch_vm.cpp#L125 by a dprintf(). Maybe it will fully boot. If it doesn't and you can enter the kernel debugger, you could run "on_exit sync" and "co" in the hope that it writes back all syslog additions to disk. And reboot thereafter.

As a general hint: Most Linux distributions have a "befs" file system module which does at least allow you to read-access BFS volumes. I.e. you don't need to boot Haiku to grab the syslog.

in reply to:  5 comment:6 by composr, 14 years ago

Replying to bonefish:

As in "can't enter the kernel debugger via Alt-SysReq-D"? Or does it just fail continuing to boot? An unfortunate side effect of a panic in the boot process is that, if you stay too long in KDL, I/O can time out, which might stop the boot process.

Both; I have tried any forms of input whatever, as well as re-entering the debugger, with no success.

The Linux stuff is not so interesting. A complete syslog up to the point where the panic() occurs would be helpful. Unfortunately the interesting part is missing in the attached one. If you could capture the serial output, that would be perfect. Alternatively in the kernel debugger a "syslog | tail 50" may or may not contain the missing output (more might be needed). You could also try a to replace the panic() in http://dev.haiku-os.org/browser/haiku/trunk/src/system/kernel/arch/x86/arch_vm.cpp#L125 by a dprintf(). Maybe it will fully boot. If it doesn't and you can enter the kernel debugger, you could run "on_exit sync" and "co" in the hope that it writes back all syslog additions to disk. And reboot thereafter.

I will, of course, try to have a syslog that captures that; it is not practical for me to catch the on-screen output before and up to the panic, since I don't have the ability to do that. I will certainly try to capture the log and re-post it up here for you. The linux stuff was only due to a request, as per the previous comment. I apologise if it's superfluous.

As a general hint: Most Linux distributions have a "befs" file system module which does at least allow you to read-access BFS volumes. I.e. you don't need to boot Haiku to grab the syslog.

This may provide with a better chance of getting the panic text. Will reply with the aforementioned information. I, too, want to see what the log looks like leading to the panic :)

comment:7 by diver, 14 years ago

After Ingo fixed #4399 I think I have the same issue here. If I enable on screen debug output it hangs after 3 pages without any related messages, but if I press "p" to disable paging in the beginning of debug output it gets me much further (btw, is that expected or I should open another ticket?). I end up with the following messages:

add_memory_type_range(2249,0x0,0x1000)
add_used_mtrr(0xf00000000, 0x10000000, 1): out of MTRRs!
add_used_mtrr(0xe00000000, 0x20000000, 1): out of MTRRs!

in reply to:  7 comment:8 by bonefish, 14 years ago

Replying to diver:

After Ingo fixed #4399 I think I have the same issue here. If I enable on screen debug output it hangs after 3 pages without any related messages, but if I press "p" to disable paging in the beginning of debug output it gets me much further (btw, is that expected or I should open another ticket?).

Might be related.

I end up with the following messages:

add_memory_type_range(2249,0x0,0x1000)
add_used_mtrr(0xf00000000, 0x10000000, 1): out of MTRRs!
add_used_mtrr(0xe00000000, 0x20000000, 1): out of MTRRs!

A full syslog would be nice, or at last all lines with "add_memory_type_range" or "remove_memory_type_range". As of hrev35817 there's the "Select debug options" -> "Enable debug syslog" option in the boot loader. When you enable it and boot normally otherwise and then reenter the boot loader directly after reset, the same menu will have the item "Display syslog from previous session", which allows to scroll through the previous syslog. Might be a bit longish, though.

comment:9 by diver, 14 years ago

It took me some time to write down all this lines using this method, this machine doesn't have a serial port. I wish it would be possible to dump this syslog to usb flash, sigh. Anyway, please look at the attached MTRR_output.txt.

by diver, 14 years ago

Attachment: MTRR_output.txt added

in reply to:  9 comment:10 by bonefish, 14 years ago

Replying to diver:

It took me some time to write down all this lines using this method, this machine doesn't have a serial port.

Sorry, I totally forgot to mention that the matching add_memory_type_range()/remove_memory_type_range() pairs can be omitted.

I wish it would be possible to dump this syslog to usb flash, sigh.

Yeah, that would be nice. Unfortunately writing to a file system on disk is not so simple in the boot loader. Maybe at least FAT32 support can be added.

Anyway, please look at the attached MTRR_output.txt.

Thanks! I'm not quite sure why it ends in garbage. Maybe the data had not yet been written from the CPU cache back to memory when the reset happened. I haven't encountered that in my tests. How did you reset the machine?

Anyway, the syslog does at least suggest that there are several very small RAM ranges which complicate the MTRR setup significantly. As of hrev35825 those will simply be ignored. Please give it a try. Even if it works please add a fresh syslog for reference.

comment:11 by diver, 14 years ago

Ingo, you rock once again! Haiku is now fully boots again on this pc. I will attach syslog now, it looks truncated, though. The only showstopper for me is #5221.

by diver, 14 years ago

Attachment: syslog added

syslog from hrev35830

comment:12 by bonefish, 14 years ago

Thanks! The syslog looks good. I hope that things work for composr, too.

in reply to:  12 comment:13 by bonefish, 14 years ago

Resolution: fixed
Status: assignedclosed

Replying to bonefish:

Thanks! The syslog looks good. I hope that things work for composr, too.

Assuming that they do. Closing...

comment:14 by composr, 14 years ago

Just wanted to round out the bug closure by confirming testing on two devices - bugfix worked. Thank you all.

Note: See TracTickets for help on using tickets.