Opened 12 years ago

Last modified 11 months ago

#6847 new bug

Hard disks not shuting down cleanly (does not park heads)

Reported by: aldeck Owned by: marcusoverhagen
Priority: critical Milestone: R1
Component: Drivers/Disk Version: R1/alpha2
Keywords: Cc:
Blocked By: #8112, #8657 Blocking: #16033
Platform: All


On 3 different machines, on shutdown, i can clearly hear the hard disk heads knocking and an unusual abrupt spin down sound.

It happens either with or without acpi shutdown.

Doesn't happen with other operating systems.

I suppose this is a quite serious problem for the hardware an thus mark the ticket as critical.

haiku hrev39530, i noticed the problem a few weeks ago or more.

Change History (25)

comment:1 by stargatefan, 12 years ago

I have 2 open case machines 5 closed case machines running haiku on that particular nightly, both native installs. I have 7 machines now with either 100% haiku only instilations or dual boots. Not once have I encountered this. What type of hardware are you running ? I update my machines about 1 time a week. which build are you using ? what type of hardware, IDE SATA PATA SATA2 ?????

would help to know.

just for my personal hardware spread.

1 p3 intel bx440 machine 1 dual p3 machine 1 athalon xp 1.99ghz machine 1 p4 machine 1 panasonic tough book p4 with intel chip set 1 amd phenom 9550 machine 1 amd thuban x6 1 core i-5 laptop

this represents a real common cross section of hardware and If I don't see the problem. Maybe something corrupted. I know I got scottmc pulling his hair out on one of my tickets but I think BOM has a problem.

what does the version info say in the ABOUT box for haiku ???

Last edited 12 years ago by stargatefan (previous) (diff)

comment:2 by aldeck, 12 years ago

It happens with both SATA and PATA, atom netbook, core 1 duo laptop, core 2 quad desktop that work otherwise very well with haiku for years. As i said the problem isn't new though i can't tell how old it is. Could it be since the new ATA stack? Leaving the question to a specialist. Otherwise links to specs or code could be a start :)

comment:3 by tqh, 12 years ago

I suspect something similar on one of my older machines with ATI chipset but I havn't used it in very long time. After rebooting from Haiku the bios stops and don't find disks. Another reboot and everything works fine.

comment:4 by stargatefan, 12 years ago

A note that would be useful is what chipsets ? none of my machines have ATI chipsets. Could be a ATI issue.

comment:5 by aldeck, 11 years ago

I suppose one possibility might be that Haiku is too fast :) ie: shuts down too quickly for the disk to go idle and do its things. Though i've no idea how harddisks are supposed to behave.

comment:6 by axeld, 11 years ago

Usually they should have a capacitor that parks the disk once the power is gone. That being said, my laptop HD also sounds very weird when shutting down, although this is not specific to Haiku at all.

comment:7 by tonestone57, 11 years ago

If you believe problem with ATA stack then why not build with IDE stack and test with that?

Try with

That way can see if that is at fault or not.

I suppose one possibility might be that Haiku is too fast :) ie: shuts down too quickly for the disk to go idle and do its things.

I was thinking the same. Maybe the disk shuts down before the head can get to the proper position? ie, the drive head should get parked before the OS shuts off.

comment:8 by axeld, 10 years ago

Blocking: 8657 added

(In #8657) Looks like a similar issue to #6847 which also hasn't been resolved yet.

comment:9 by Giova84, 10 years ago

hrev45148: this issue is still present. If i shutdown Haiku from the Deskbar i get corrupted files. At the next startup, when i do "checkfs /boot" i always obtain "some blocks weren't allocated" on these files: MediaFiles, multi_audio_settings, syslog.old, and sometimes on Tracker setting file. I don't get any filesystem error if i shutdown Haiku using "shutdown -q" (a quick shutdown). Reinitialize the filesystem doesn't solve this issue.

My hard disk is healthy.

comment:10 by joechd, 9 years ago

This bug still exist on haiku R1 alpha 4.1, I tried it on my Asus EeePC 1005PX, and the hdd still show parking position when I shutdown from haiku, just like a forced shutdown -- pressing power key. When I tried shutdown on other OS the hdd just shutdown cleanly without making any noise.

comment:11 by Giova84, 8 years ago

hrev48061 I'm running Haiku on another computer (the HDD is new and healthy) but the issue is still here as described in #6847: if I shutdown Haiku from the default shutdown command present in the Deskbar menu, at the next boot i lose some files (also corrupted), instead all is fine if I shutdown Haiku using "shutdown -q".

comment:12 by pulkomandy, 8 years ago

Blocked By: 8112 added

comment:13 by philcostin, 7 years ago

CppCheck reveals "Shifting by a negative value is undefined behaviour" in src/add-ons/kernel/busses/ata/ide_isa/ide_isa.c (line 123)

In write_command_block_regs

for (i=0; i<7; i++)

if (((1 << (i-7)) & mask != 0) <----

This means that it is undefined as to when the following call to channel->isa->write_io_8() occurs.

Edit: Same thing occurs also in busses\ide\ide_isa\ide_isa.c

Last edited 7 years ago by philcostin (previous) (diff)

comment:14 by waddlesplash, 7 years ago

PulkoMandy just committed a fix for that, correct?

comment:15 by philcostin, 7 years ago

Yes, he did. Whether it fixes this ticket though, I'm not sure.

Last edited 7 years ago by philcostin (previous) (diff)

comment:16 by pulkomandy, 7 years ago

I don't think it does, the issue had already been fixed in ide_pci (what everyone uses) and I just copied the fix over to ide_isa in both the IDE stack and the ATA stack. Both of these are not used in any post-pentium machine.

comment:17 by philcostin, 4 years ago

Could this ticket be just another aspect of #3150

comment:18 by philcostin, 3 years ago

This could most likely be closed too, now...

comment:19 by waddlesplash, 3 years ago

Nope. Vidrep reported this still occurs even after the fix to that ticket.

comment:20 by bitigchi, 2 years ago

It would be nice to have this fixed for Beta3. Although many people use SSD's today for their main systems, this is potentially very dangerous for external hard drives.

comment:21 by waddlesplash, 2 years ago

External hard drives that are attached by USB do not have this problem as we detach them correctly. And as the comments indicate above, this may also be fixed; it's not clear.

comment:22 by bitigchi, 2 years ago

I think I replicated this with my bare metal install. Hard disk just "pew"ed itself down at the end of the shutdown process.

comment:23 by waddlesplash, 11 months ago

Blocked By: 8657 added
Blocking: 8657 removed
Keywords: hard disk drive park heads shutdown removed

comment:24 by waddlesplash, 11 months ago

Blocking: 16033 added

comment:25 by Maxis, 11 months ago

I noticed that on my notebook i have corrected hard drive power off only when i boot from liveusb AND do not mount disk partition with my data on the HDD. If i just mount and then unmount partition before shutdown then i have got incorrect power off of my HDD.
The notebook is Toshiba Satellite C660-16D. listdev provided in #16033 bugreport.

Note: See TracTickets for help on using tickets.