Thread (1 message) 1 message, 1 author, 2003-02-13

Re: System hang when trying to enter sleep/standby state

From: Pavel Machek <hidden>
Date: 2003-02-13 22:09:24

Hi!
quoted
quoted
You're absolutely right. But, most people do those things deliberately, 
and know the consequences. 
Do you think someone becomes root and does an "echo 5 > /proc/acpi/sleep"
by accident? ;-)
Definitely. By, trying a range of values, they stumble on one that crashes 
their system. 
And what? Try echo 5 > /proc/kmem and see what you get *then*.
quoted
quoted
That's a perfectly valid thing to do, and the kernel has no right to crash
when he does something like that. 
The kernel has the right to do what the specs say. There might be 
systems where this is wanted (which boot from read only medium and
need a really fast poweroff).
The kernel does what the specs say. Read the code. The system is placed 
into S5 when doing off from a shutdown sequence, exactly what the spec 
intended to be done. 

As a whole, we do enforce a minimum amount of policy we do not want to 
lose users data. And that will happen. 

Let me repeat, and try and get you to listen: 

You *will* corrupt your data if you do not flush the disk buffers. 
Not true... With ext3 or reiser it is okay to power down system like
that.
That's why it's so slow when you do a normal shutdown. That's why 
immediately putting the system into S5 is so fast - we don't flush the 
buffers. 
Normal shutdown takes services down in reverse older they start.

If you reboot by SAK-S,U,B, you can do it under a second on almost any
system. If you powerdown by 
kill -15 -1; sleep 1; kill -9 -1; umount /; echo 5 > /proc/acpi/sleep

you have clean & very fast way to do it.

And btw if someone does echo 4 > /proc/acpi/sleep and then fails to
pass resume=/dev/hdaX he's in pretty much same situation as when he
does echo 5 > sleep... And *way* worse if he manages to pass resume=
after he does fsck (silent corruption vs. fsck being run).

Better don't mess with sleep if you don't know what you know what you
are doing.

								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]


-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help