Stumbling Through KMDB with New Hardware

Recently, I refreshed my home workstation from an AMD X-2 based system with an ASUS A8N socket 939 motherboard to a brand spanking new Sandy Bridge Core i5-2500K based system with a Gigabyte P67A-UD3-B3 motherboard.  Debian Squeeze runs lightening fast!  However, I did not purchase this machine to for the sole intent of running wobbly windows in Debian.

I want to use this new machine to build and tinker with the latest Illumos releases.  So I popped the latest Open Indiana 151 beta install DVD and selected the graphical install mode from the OpenIndiana GRUB menu.  The OI kernel text displayed next and then… nothing.  The system was apparently getting stuck while attempting to load the kernel.

My next logical step was to fire up KMDB (Kernel Modular DeBugger), what else?!

middle of a kmdb session

Stepping through the kernel load functions was a little tedious as my KMDB skills are still rusty.  Since Illumos (the kernel OpenIndiana uses) is open source, I was able to follow along using the Illumos source code on my laptop without much trouble.

Soon, I discovered that the system appeared to be hanging while enumerating a PCI bus.  Specifically, the hang occurred in pci_autoconfig`enumerate_bus_devs.  The enumerate_bus_devs function is called several times during the PCI setup process and it wasn’t until the system attempted to use it in the second for block in the pci_setup_tree function (illumos-gate/usr/src/uts/intel/io/pci/pci_boot.c) that the kernel would lock up.

for (i = 1; i <= pci_bios_maxbus; i++) {
    if (pci_bus_res[i].dip == NULL) {
        pci_bus_res[i].root_addr = root_bus_addr++;
    enumerate_bus_devs(i, CONFIG_INFO);

    /* add slot-names property for named pci hot-plug slots */

I found that when i = 3, the kernel hung.  I’m not familiar with this part of the Illumos kernel (or any of it, really) but I was able to get a sense of what was going on despite my lack of specific knowledge.  I assumed that a device on the PCI bus was not getting along with Illumos and that finding and disabling the device (if possible) would allow me to boot an Illumos based kernel successfully (Joyent’s SmartOS hangs in a similar place).

My first thought was the ATI Radeon 5750 graphics card was the culprit.  I wanted to try something a little easier than tearing my machine apart and inserting an NVIDIA based graphics card first.  So I rebooted and entered the BIOS.  It was then I had a brainwave.

“USB 3.0?”

Sure enough, I disabled USB 3.0 on my motherboard and booted straight into the OpenIndiana install without a hitch.

Now that I have a valid build environment, I’m off to find out why enabling USB 3.0 on my mobo was causing Illumos so many fits.

This entry was posted in computers, illumos. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *