Opened 8 years ago

Last modified 3 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: hard disk drive park heads shutdown Cc:
Blocked By: #8112 Blocking: #8657
Has a Patch: no Platform: All

Description

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 (17)

comment:1 Changed 8 years ago by stargatefan

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 8 years ago by stargatefan (previous) (diff)

comment:2 Changed 8 years ago by aldeck

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 Changed 8 years ago by tqh

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 Changed 8 years ago by stargatefan

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

comment:5 Changed 8 years ago by aldeck

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 Changed 7 years ago by axeld

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 Changed 7 years ago by tonestone57

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

Try with
HAIKU_ATA_STACK = 0 ;

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 Changed 6 years ago by axeld

Blocking: 8657 added

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

comment:9 Changed 6 years ago by Giova84

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 Changed 6 years ago by joechd

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 Changed 4 years ago by Giova84

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 Changed 4 years ago by pulkomandy

Blocked By: 8112 added

comment:13 Changed 4 years ago by philcostin

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 4 years ago by philcostin (previous) (diff)

comment:14 Changed 4 years ago by waddlesplash

PulkoMandy just committed a fix for that, correct?

comment:15 Changed 4 years ago by philcostin

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

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

comment:16 Changed 4 years ago by pulkomandy

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 Changed 3 months ago by philcostin

Could this ticket be just another aspect of #3150

Note: See TracTickets for help on using tickets.