Opened 16 years ago

Closed 11 years ago

Last modified 6 years ago

#4004 closed bug (invalid)

Haiku booting hangs at the 5th icon on Intel ICH9

Reported by: e_barsukowski Owned by: marcusoverhagen
Priority: normal Milestone: R1
Component: Drivers/Disk Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: x86

Description

I have Intel DG33FB motherboard with Core2 Duo E6750 CPU and 2GB of RAM. Chipset is G33 Express with ICH9DH south bridge. The machine has four hard drives: 2 IDE drives on single IDE channel and 2 SATA drives.

I've installed Haiku hrev30980 on the first primary partition of the slave IDE drive and on the first primary partition of the second SATA drive (SATA port 2). In both cases Haiku hangs at the 5th icon when SATA controller is in AHCI mode, and at the 4th icon when SATA is configured as IDE. Playing with safe mode options gave nothing. Serial debug logs for each 4 cases are attached.

Attachments (5)

boot_from_ide,sata_ahci.log (97.0 KB ) - added by e_barsukowski 16 years ago.
boot_from_ide,sata_as_ide.log (37.5 KB ) - added by e_barsukowski 16 years ago.
boot_from_sata,sata_ahci.log (106.5 KB ) - added by e_barsukowski 16 years ago.
boot_from_sata,sata_as_ide.log (47.4 KB ) - added by e_barsukowski 16 years ago.
syslog_ide_boot (55.4 KB ) - added by rudolfc 15 years ago.
syslog ide boot on system failing with ata manager

Download all attachments as: .zip

Change History (20)

by e_barsukowski, 16 years ago

Attachment: boot_from_ide,sata_ahci.log added

by e_barsukowski, 16 years ago

by e_barsukowski, 16 years ago

by e_barsukowski, 16 years ago

comment:1 by umccullough, 16 years ago

FWIW, Standard Haiku builds don't boot properly on my G33-based ICH9 machine either.

When I switch the bus_manager from "ide" to "ata", however, it does boot fine (I don't have to fiddle with any BIOS modes either).

If you're building your own images, try adding this to your UserBuildConfig:

HAIKU_ATA_STACK = 1 ;

mind the spacing, that's important.

comment:2 by umccullough, 16 years ago

I should also note that in my case, I tend to get some long timeouts as Haiku is enumerating the partitions on my disk (sometimes a couple minutes), so if you have a lot of drives/partitions, you might give it some extra time.

In my case, I believe it's related to a known-issue with Seagate/Maxtor drives like mine, and the disk hangs at certain times no matter what OS I use... I'm about to throw it in the trash.

in reply to:  2 comment:3 by e_barsukowski, 16 years ago

I know about this issue, but my hdds are not affected by it (they are Samsung, WD and very old 60GB Maxtor). Other OSes (FreeBSD and Solaris) boot with no delays. By the way, don't throw away your drive. Seagate released firmware upgrades to deal with the issue. I've successfully repaired one Seagate drive at my work. I'll try switching the bus_manager and will report.

comment:4 by e_barsukowski, 16 years ago

After setting

HAIKU_ATA_STACK = 1 ;

in UserBuildConfig Haiku completely refused to recognize my IDE drives (many messages "ata 0 error: timeout waiting for interrupt" and no partitions found). After I detached both IDE drives from the system Haiku hanged at the message "allocate_commpage_entry(". I think it is the same place where it froze before, but at that time it printed only the letter "a" on the last line.

So, 1) 'ata' bus_manager works worse than 'ide' on my system, 2) now it seems to be not the bug in disk driver, but in kernel; it is similar to bug #1711, but I can't see the whole debug message because the system freezes before it can print the message to the end. After rebuilding Haiku with the old bus_manager I'll try to find out more information.

comment:5 by e_barsukowski, 16 years ago

After a bit testing I found out the following.

1) When SATA controller is configured in AHCI mode the system hangs at the 5th icon half typing the message "allocate_commpa" or "allocate_commpage_entr" or other variants on serial debug. After disabling SMP (either in BIOS or via safe mode options) I finally get

<...>
ahci: AHCIPort::ResetPort port 4, deviceBusy 0, forceDeviceReset 0
ahci: AHCIPort::PostReset port 4
ahci: device signature 0xeb140101 (ATAPI)
allocate_commpage_entry(4, 34) -> 0xffff0118
PANIC: Fatal exception "Machine-Check Exception" occurred! Error code: 0x0

Welcome to Kernel Debugging Land...
Thread 12 "main2" running on CPU 0
kdebug> 

This is bug #1711, so I'll post there.

2) When SATA IDE emulation enabled the system hangs at the 4th icon with message "More than 99% interrupts of vector 11 are unhandled". Here's the end of the debug log:

KDiskDeviceManager::_AddDiskSystem() done: No error
number of disk systems: 5
KDiskDeviceManager::_Scan(/dev/disk)
PCI-IDE: Controller in native mode: cmd 0x4448, ctrl 0x4466, irq 11
PCI-IDE: init channel...
PCI-IDE: channel index 0
PCI-IDE: bus master base 0x4410
PCI-IDE: init channel done
IDE: scan_device_worker: bus 0x80fb5a5c, device-number 0
IDE: create_device: bus 0x80fb5a5c, device-number 0
IDE: setup_device_links: bus 0x80fb5a5c, device 0x817cb740
IDE: scan_device_int: device 0x817cb740, atapi 0
IDE: scan_device_int: waiting 100ms...
More than 99% interrupts of vector 11 are unhandled
Last message repeated 129 times.
PANIC: Keyboard Requested Halt

Welcome to Kernel Debugging Land...
Thread 13 "main2" running on CPU 0
kdebug> ints
int   1, enabled 1, handled        0, unhandled        0, ACTIVE
kernel_x86:debug_keyboard_interrupt (0x800d4510), data 0x00000000
int   9, enabled 2, handled        0, unhandled        0
ehci:InterruptHandler__4EHCIPv (0x805f8db4), data 0x80fbf660
uhci:InterruptHandler__4UHCIPv (0x80757d00), data 0x80fbe2a8
int  10, enabled 2, handled        0, unhandled        0
uhci:InterruptHandler__4UHCIPv (0x80757d00), data 0x80fbe6a4
uhci:InterruptHandler__4UHCIPv (0x80757d00), data 0x80fbe000
int  11, enabled 5, handled        1, unhandled  1309353
ide_adapter:ide_adapter_inthand (0x80619b38), data 0x80fc5000
ehci:InterruptHandler__4EHCIPv (0x805f8db4), data 0x80fbf880
uhci:InterruptHandler__4UHCIPv (0x80757d00), data 0x80fbe550
uhci:InterruptHandler__4UHCIPv (0x80757d00), data 0x80fbe3fc
uhci:InterruptHandler__4UHCIPv (0x80757d00), data 0x80fbe154
int 219, enabled 1, handled     5182, unhandled        0
kernel_x86:apic_timer_interrupt (0x800ddb20), data 0x00000000
int 221, enabled 1, handled     1108, unhandled        0
kernel_x86:i386_ici_interrupt (0x800d620c), data 0x00000000
int 222, enabled 1, handled        0, unhandled        0
kernel_x86:i386_smp_error_interrupt (0x800d6244), data 0x00000000
int 223, enabled 1, handled        0, unhandled        0
kernel_x86:i386_spurious_interrupt (0x800d6238), data 0x00000000
kdebug> 

Removing both uhci and ehci drivers or disabling USB controller in BIOS helps: the boot process ends up at the first issue (allocate_commpage_entry). This seems to be IRQ sharing conflict between ide and usb drivers. Should I change the ticket header accordingly?

comment:6 by rudolfc, 15 years ago

Hi,

I just tested booting with ATA manager (image of 24 august 2009), and I also get this message repeating a lot: "ata 0 error: timeout waiting for interrupt" It seems the boot won't succeed, nor will haiku kdl. Seems like a loop or so.

As a test I replaced ata ide busmanager with the ide version (dumped it in place and renamed it to ata).

The result is a working system. This system is used a lot by me to quickly test images and they always worked upto the switch to the ATA manager by default.

For completeness, I'll add the syslog from the successfull boot with the ide manager dropped in place. Maybe this can help somehow?

Bye!

Rudolf.

by rudolfc, 15 years ago

Attachment: syslog_ide_boot added

syslog ide boot on system failing with ata manager

comment:7 by rudolfc, 15 years ago

BTW,

The tests with the default ATA manager, and with the dropped-in-place IDE manager were both executed from the same USB stick. I did not boot from HD. The HD and DVD-ROM were in the same conditions during both boots (connected, DVD-ROM empty).

Bye!

Rudolf.

comment:8 by marcusoverhagen, 15 years ago

Hi Rudolf, I appreciate your input. To make tracking these multiple issues easier, please open a new ticket and provide syslog (or screenshots) from a boot with using both ata components. Include the range starting after PCI device information dumps up to the second timeout. Thanks.

comment:9 by marcusoverhagen, 15 years ago

Hi e_barsukowski,

it looks like the ahci driver is working correctly. It detects 2 harddisks and one DVD-RW (see below).

The ide driver has interrupt handling issues, this also interferes when booting from sata. It is no longer maintained and replaced by the ata driver.

As bug #1711 appears to be fixed, can you provide more information about booting with the ATA driver?

BTW, you can probably boot from SATA , in AHCI mode by removing both ata and ide drivers. Please note that ahci needs scsi bus manager to work.

boot_from_ide sata_ahci.log

794	ahci: AHCIPort::ScsiInquiry port 0
795	ahci: lba 1, lba48 1, fUse48BitCommands 1, sectors 156301488, sectors48 156301488, size 80026361856
796	ahci: model number:  WDC WD800JD-55MUA1                     
797	ahci: serial number:      WD-WMAMD8292263

804	ahci: AHCIPort::ScsiInquiry port 1
805	ahci: lba 1, lba48 1, fUse48BitCommands 1, sectors 268435455, sectors48 625142448, size 320072933376
806	ahci: model number:  SAMSUNG HD321KJ                         
807	ahci: serial number: S0MQJDWQ183734

829	ahci: device signature 0xeb140101 (ATAPI)
830	ahci: AHCIPort::ScsiInquiry port 4
831	ahci: model number:  Optiarc DVD RW AD-7201S                 
832	ahci: serial number: B
833	ahci: firmware rev.: 1.06

comment:10 by Grey, 15 years ago

When Haiku booting hangs, try to call debuger and continue execution ( Press SysReq Alt+D, then type "co" and press Enter ). There are good chance, that "magic" will continue Haiku loading. If not, try this "calm" again and again...

comment:11 by Coldfirex, 14 years ago

Is this still an issue for you on recent builds?

comment:12 by scottmc, 14 years ago

Can you recheck this with a recent Haiku build? It may have been fixed recently.

comment:13 by scottmc, 14 years ago

Blocking: 7665 added

comment:14 by korli, 11 years ago

Resolution: invalid
Status: newclosed

Closing for lack of feedback.

comment:15 by waddlesplash, 6 years ago

Blocking: 7665 removed
Note: See TracTickets for help on using tickets.