On XO-1.5 with 11.3.0/11.3.1 -- hang during shutdown?

James Cameron quozl at laptop.org
Sat Jun 16 03:08:25 EDT 2012


G'day Anish,

I don't think you should conflate the shutdown issue with slower than
claimed microSD cards.  The shutdown issue may be a symptom, combining
Fedora's assumptions about how quickly the kernel will finish writing
data, with the microSD cards being much slower than the hard disks the
halt script was written for.

Your fix of adding delay was based on the assumption that more time
was needed for processes to be killed.  I disagree.  I think the delay
was reducing the probability of dirty blocks in the cache, and you
would have observed an improvement because of that alone.

Your fix of adding a sync before umount might work.  I'm interested to
know how successful that is.

Another thing you could do is reduce the retry timers and counters in
__umount_loop so that it abandons the wait sooner, resulting in the
laptop powering down with the filesystem still mounted.  A better
scenario than staying powered.

__umount_loop tries an umount.  In your photograph [12] that first
umount failed with "umount: /home: device is busy."  __umount_loop
then counts the number of filesystems yet to be unmounted, allowing
two seconds to elapse before it sends another signal to each process
that has references to the filesystem.  It then sleeps for three
seconds before retrying up to 3 times.  __umount_loop is then
abandoned.

That means the hang should not exceed 15 seconds.  Is this what you
find?  If not, then this casts doubt on your solution.

The "umount2: Device or resource busy" is interesting.  I don't see
this if I try to umount a device that is busy on Fedora 14.  It may
suggest that the umount is failing for a reason other than filesystems
with remaining references or dirty blocks.

I really doubt that fixing the microSD card write performance will
properly fix this hang problem.  Fixing the microSD card write
performance, if it is below a specification, should be done anyway.
It may well reduce the frequency of the hang.  But as far as I can
see, it isn't the only contributor to the hang.

You seem to have settled on a myth.  You seem to believe, based on
selected evidence, that the problem is entirely to do with microSD
cards.  You continue to seek such evidence, but I think you should
seek other evidence.

-- 
James Cameron
http://quozl.linux.org.au/



More information about the Devel mailing list