Opened 15 years ago

Closed 5 years ago

Last modified 4 years ago

#4287 closed bug (fixed)

Haiku Crashes With ATA Stack

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

Description

Haiku crashes using ATA stack. Does not boot.

Error: Could not write back block 97. Stack trace for thread 14 "block notifier/writer". Appears to mess up while trying to initialize networking card.

In screenshot, in black region shows: ata 0-1 error..., ata 0 error...., over & over again.

I will update ticket with listdev & Haiku revision information when I get the chance.

Attachments (18)

P1010014.JPG (170.6 KB ) - added by tonestone57 15 years ago.
ATA stack crash
p1010007-new.jpg (485.8 KB ) - added by tonestone57 15 years ago.
ata stack crash 2
Screenshot1.png (53.6 KB ) - added by tonestone57 15 years ago.
Screenshot2.png (54.5 KB ) - added by tonestone57 15 years ago.
Screenshot3.png (52.4 KB ) - added by tonestone57 15 years ago.
Screenshot4.png (51.2 KB ) - added by tonestone57 15 years ago.
Screenshot5.png (46.9 KB ) - added by tonestone57 15 years ago.
Screenshot6.png (47.5 KB ) - added by tonestone57 15 years ago.
Screenshot7.png (51.9 KB ) - added by tonestone57 15 years ago.
Screenshot8.png (48.4 KB ) - added by tonestone57 15 years ago.
Screenshot9.png (48.6 KB ) - added by tonestone57 15 years ago.
Screenshot10.png (52.7 KB ) - added by tonestone57 15 years ago.
Screenshot11.png (56.0 KB ) - added by tonestone57 15 years ago.
Screenshot12.png (70.9 KB ) - added by tonestone57 15 years ago.
Screenshot13.png (80.0 KB ) - added by tonestone57 15 years ago.
syslog_part_a.txt (253.6 KB ) - added by tonestone57 15 years ago.
system log - 1st half
syslog_part_b.txt (238.6 KB ) - added by tonestone57 15 years ago.
system log - 2nd half
panic.png (46.0 KB ) - added by diver 14 years ago.
qemu /dev/sda panic

Download all attachments as: .zip

Change History (41)

by tonestone57, 15 years ago

Attachment: P1010014.JPG added

ATA stack crash

comment:1 by umccullough, 15 years ago

Might be useful to get some hardware info with that ;)

comment:2 by tonestone57, 15 years ago

Haiku Revision: 32522 (gcc2) w/ata stack

listdev output:

device Serial bus controller (SMBus) [c|5|0]
  vendor 8086: Intel Corporation
  device 27da: 82801G (ICH7 Family) SMBus Controller

device Mass storage controller (IDE interface) [1|1|8a]
  vendor 8086: Intel Corporation
  device 27df: 82801G (ICH7 Family) IDE Controller

device Bridge (ISA bridge) [6|1|0]
  vendor 8086: Intel Corporation
  device 27b8: 82801GB/GR (ICH7 Family) LPC Interface Bridge

device Display controller (VGA compatible controller, VGA controller) [3|0|0]
  vendor 102b: Matrox Graphics, Inc.
  device 0519: MGA 2064W [Millennium]

device Bridge (PCI bridge, Subtractive decode) [6|4|1]
  vendor 8086: Intel Corporation
  device 244e: 82801 PCI Bridge

device Serial bus controller (USB Controller, EHCI) [c|3|20]
  vendor 8086: Intel Corporation
  device 27cc: 82801G (ICH7 Family) USB2 EHCI Controller

device Serial bus controller (USB Controller, UHCI) [c|3|0]
  vendor 8086: Intel Corporation
  device 27cb: 82801G (ICH7 Family) USB UHCI Controller #4

device Serial bus controller (USB Controller, UHCI) [c|3|0]
  vendor 8086: Intel Corporation
  device 27ca: 82801G (ICH7 Family) USB UHCI Controller #3

device Serial bus controller (USB Controller, UHCI) [c|3|0]
  vendor 8086: Intel Corporation
  device 27c9: 82801G (ICH7 Family) USB UHCI Controller #2

device Serial bus controller (USB Controller, UHCI) [c|3|0]
  vendor 8086: Intel Corporation
  device 27c8: 82801G (ICH7 Family) USB UHCI Controller #1

device Bridge (PCI bridge, Normal decode) [6|4|0]
  vendor 8086: Intel Corporation
  device 27d6: 82801G (ICH7 Family) PCI Express Port 4

device Bridge (PCI bridge, Normal decode) [6|4|0]
  vendor 8086: Intel Corporation
  device 27d4: 82801G (ICH7 Family) PCI Express Port 3

device Network controller (Ethernet controller) [2|0|0]
  vendor 10ec: Realtek Semiconductor Co., Ltd.
  device 8168: RTL8111/8168B PCI Express Gigabit Ethernet controller

device Bridge (PCI bridge, Normal decode) [6|4|0]
  vendor 8086: Intel Corporation
  device 27d0: 82801G (ICH7 Family) PCI Express Port 1

device Multimedia controller (Audio device) [4|3|0]
  vendor 8086: Intel Corporation
  device 27d8: 82801G (ICH7 Family) High Definition Audio Controller

device Display controller (VGA compatible controller, VGA controller) [3|0|0]
  vendor 8086: Intel Corporation
  device 2772: 82945G/GZ Integrated Graphics Controller

device Bridge (Host bridge) [6|0|0]
  vendor 8086: Intel Corporation
  device 2770: 82945G/GZ/P/PL Memory Controller Hub
~> 

comment:3 by umccullough, 15 years ago

Interesting. I think I have a couple machines with ICH7 that don't seem to have any issues so far. I'll see if I can dig out in order to compare the listdev output.

by tonestone57, 15 years ago

Attachment: p1010007-new.jpg added

ata stack crash 2

comment:4 by tonestone57, 15 years ago

The first ata crash ( screenshot 1 ). It crashes while going through the network cards - trying to initialize them and they timeout.

The 2nd crash ( screenshot 2 ) I believe is also related to ata stack crashing & may require a separate ticket to be filed for it.

I was not sure if these crashes are related to one another so I put them both here for now. Both bt I believe are caused with the crashing of the ata stack but maybe for different reasons.

Sometimes I am able to boot into Haiku and sometimes I am not.

comment:5 by umccullough, 15 years ago

Just to be sure, this is a completely fresh image built with HAIKU_ATA_STACK = 1 ; in your UserBuildConfig?

I ask because when I tried to update an existing image from IDE to ATA a while back, i ran into similar problems as well, but when building a completely fresh image, it was resolved.

in reply to:  5 comment:6 by mmlr, 15 years ago

Replying to umccullough:

Just to be sure, this is a completely fresh image built with HAIKU_ATA_STACK = 1 ; in your UserBuildConfig?

That is actually important, yes. If both an old IDE and a new ATA stack are present (as the old one won't be removed by setting HAIKU_ATA_STACK to one) the outcome is undefined :-)

Both issues certainly stem from the same cause. The ATA stack is not actually crashing, it just seems it programs the controller in a way that it stalls. In that case reads and writes will then time out producing the cases you are getting.

Helpful in this case would be the output during boot. If you could take photos of the on-screen debug output while booting that would show when the first errors happen and what they are. You could take one picture per output page for example. The initialization phase of the ATA stack would be the most interesting part.

comment:7 by tonestone57, 15 years ago

Yes, with HAIKU_ATA_STACK = 1 ; in UserBuildConfig but NOT with fresh image.

So, I went into my generated folder & deleted all other folders (attributes, objects, tmp,) except for build, cross_tools, download & the Jamfile which I left alone.

I went to a slightly older revision, Haiku 32267. I re-jammed everything but using the old configuration I had in the generated folder.

Creating image ...
Writing boot code to "/dev/hdb2" (partition offset: 10750440960 bytes, start offset = 0) ...
Populating image ...
Deleting old MIME database ...
Installing MIME database ...
Unmounting ...
...updated 10167 target(s)...

I notice that I am getting the same crash issue when running through QEMU. qemu -hda /dev/hdb -m 264.

I will try removing build folder & jamfile from generated folder & re-run configure to start completely new. I'll just leave in the download folder & delete everything else and maybe that will make a difference?

in reply to:  7 comment:8 by mmlr, 15 years ago

Replying to tonestone57:

I will try removing build folder & jamfile from generated folder & re-run configure to start completely new. I'll just leave in the download folder & delete everything else and maybe that will make a difference?

No need to do that really. The only thing that is problematic is when you update an existing installation that already has the IDE stack installed and then switch to ATA. Because that will leave the old files on that installation. If you are initializing the partition using the build system then you are fine.

comment:9 by tonestone57, 15 years ago

Haiku Revision 32267.

I cleaned out my generated folder ( except for downloads ). Left HAIKU_ATA_STACK = 1 ; in UserBuildConfig. Rebuilt the gcc2 cross compiler and haiku image.

...updated 10166 target(s)...

TO TEST: 1) Built haiku.image file & used QEMU. The image file worked without any issues; it booted into Haiku and ran Haiku3d - worked! 2) Built image to /dev/hdb2. Used QEMU & Haiku would crash; not boot. 3) Tried booting Haiku itself and would crash and not boot.

The ATA stack apparently does not like something about my hardware configuration. The Haiku partition I am trying to boot is located off a PATA drive but I also have SATA controller & SATA disk drive & SATA burner in this computer too.

I will attach 13 screenshots of the console debugging through QEMU & see if that helps you out. Regards,

by tonestone57, 15 years ago

Attachment: Screenshot1.png added

by tonestone57, 15 years ago

Attachment: Screenshot2.png added

by tonestone57, 15 years ago

Attachment: Screenshot3.png added

by tonestone57, 15 years ago

Attachment: Screenshot4.png added

by tonestone57, 15 years ago

Attachment: Screenshot5.png added

by tonestone57, 15 years ago

Attachment: Screenshot6.png added

by tonestone57, 15 years ago

Attachment: Screenshot7.png added

by tonestone57, 15 years ago

Attachment: Screenshot8.png added

by tonestone57, 15 years ago

Attachment: Screenshot9.png added

by tonestone57, 15 years ago

Attachment: Screenshot10.png added

by tonestone57, 15 years ago

Attachment: Screenshot11.png added

by tonestone57, 15 years ago

Attachment: Screenshot12.png added

by tonestone57, 15 years ago

Attachment: Screenshot13.png added

comment:10 by axeld, 15 years ago

To repeat Michael's words differently: deleting "generated" makes no sense in this case. You have to delete the IDE bus manager, and the ide_adapter from your partition! Ie. delete

/boot/system/add-ons/kernel/bus_managers/ide
/boot/system/add-ons/kernel/generic/ide_adapter

comment:11 by marcusoverhagen, 15 years ago

Please make sure that the ide files are not installed. However, the syslog does not show anything that indicates their presence. We should probably print a line when IDE or ATA stack get initialized.

One problem that the stack has is some missing functionality. After a device timeout, the scsi stack should reset the device, however it doesn't do so. Recovery from an error is impossible this way.

http://haiku.it.su.se:8180/source/xref/src/add-ons/kernel/bus_managers/ata/ATAChannel.cpp#527

comment:12 by tonestone57, 15 years ago

I booted into my gcc4 IDE Haiku (31540). I mounted the partition for ATA Haiku & looked in those folders. In kernel/bus_managers, there is NO ide listed, instead I have ata. In kernel/generic there is NO ide_adapter, instead I have ata_adapter.

I would say that IDE is NOT installed. So, my issue is not being caused by any IDE-ATA conflict and can rule that out.

I tested further booting into ATA Haiku & will say that around 40% of the time I can boot into it and the other 60% it crashes, KDLs. I also can't say ATA Haiku is stable, for me, when booted because I ran Bsnow demo. I ended up with CPU activity but no snow showing at all - when I clicked to remove Bsnow, CPU activity stopped ( forgot to check with ProcessController ). When I run Bsnow on IDE Haiku, it actually works and shows snow piling up on the desktop.

comment:13 by axeld, 15 years ago

Thanks for the clarification, tonestone57!

comment:14 by tonestone57, 15 years ago

No worries Axel. I sometimes come off strong. I wanted to be clear in my response and not rude to anyone.

I disconnected my SATA drive & burner and still have the error. The only fix so far was to disable DMA, which allows me to boot & use Haiku ( works OK so far & appears to be stable ). Checkfs seems kinda slow on a partition with lots of files though, without DMA support. I wonder for anyone else having trouble with the ATA_STACK, if turning off DMA lets them boot Haiku too?

I will see about taking photos, like Michael suggested, of Haiku actually booting to show the error because QEMU screenshots may have missed some important console debug information.

by tonestone57, 15 years ago

Attachment: syslog_part_a.txt added

system log - 1st half

by tonestone57, 15 years ago

Attachment: syslog_part_b.txt added

system log - 2nd half

comment:15 by tonestone57, 15 years ago

Added system log, in 2 parts, to ticket. It is long and fairly repetitive but may shed some light on what is causing the ata_stack to crash. ATA error is listed in the log files.

Also, I was able to boot with DMA by enabling console debug and going slowly one page at a time. The extra time was able to handle the device, whatever that may be, from timing out and causing the crash.

comment:16 by tonestone57, 15 years ago

I installed Haiku onto sata drive, which is working under legacy mode. DMA works with sata controller & drive. I tested the system with GLTeapot, Chart ( 2 threads ), Haiku3d, Pulse & BezillaBrowser with no crashes.

Haiku crashing (dropping to KDL) only occurs on my pata drive ( ide controller ) with DMA enabled. I believe I always see "device timeout" when it goes to KDL. Some type of timing issue with ATA stack & ide controller?

comment:17 by diver, 14 years ago

Replying to tonestone57:

Haiku Revision 32267.

TO TEST: 1) Built haiku.image file & used QEMU. The image file worked without any issues; it booted into Haiku and ran Haiku3d - worked! 2) Built image to /dev/hdb2. Used QEMU & Haiku would crash; not boot.

Same here in hrev35000.
qemu haiku.image boots fine
qemu /dev/sda crashes during boot, see attachment:panic.png
I'm wonder what the difference between booting from an image and booting from partition from the QEMU POV?

comment:18 by axeld, 14 years ago

Blocking: 5238 added

by diver, 14 years ago

Attachment: panic.png added

qemu /dev/sda panic

comment:19 by diver, 14 years ago

Haiku boots fine now in qemu 0.12.3 (Ubuntu 10.04) using qemu /dev/sda.

comment:20 by Coldfirex, 13 years ago

tonestone57: still an issue on your hardware with a recent build?

comment:21 by tonestone57, 13 years ago

I am fairly sure this issue was fixed. That Atom system is packed away and can't really test. Anyone else want to confirm? I'm good with having this closed for now and re-opening later on if needed.

comment:22 by waddlesplash, 5 years ago

Resolution: fixed
Status: newclosed

comment:23 by nielx, 4 years ago

Milestone: R1R1/beta2

Assign tickets with status=closed and resolution=fixed within the R1/beta2 development window to the R1/beta2 Milestone

Note: See TracTickets for help on using tickets.