Re: [lfs-support] linux 5.5.9: shutdown -h hangs on detaching cdrom

2020-04-21 Thread Michael Shell
On Wed, 22 Apr 2020 00:48:29 +0200
Stephen Berman  wrote:

> the machine did power off.  So this took longer than the 20 seconds
> it took when calling shutdown immediately after logging in but
> unlike when running emacs or startx it didn't hang indefinitely.


And I thought it couldn't get any stranger. Obviously, I was wrong. :(

I see that (my, older) emacs is linked against libmount. My best guess
at this point is that both emacs and Xorg "look at" the cdrom and this
is what triggers the infinite hang. However, if nothing "looks" at the
cdrom, then the hang will be limited in duration. Nevertheless, at
this point I believe that both the delay and hang are linked to the
cdrom driver.

What if you issue a command like:

dd count=100 bs=1k if=/dev/cdrom of=/dev/null

with and without a readable disk in your cd/dvd drive?

After the above command is attempted/executed how does your shutdown
proceed then?

If it hangs forever, then I say that accessing the cdrom is what emacs
and Xorg does that triggers the infinite hang.

We could be looking at an interaction bug between your particular
dvd drive's firmware and the kernel. For example, previous kernels
sent the drive certain commands to close, etc. and newer kernels
do it a different way, one that triggers a "bug" in the drive's
firmware. Even if true, this does not mean that the kernel code
should not be changed - there is a general policy of kernel
developers to workaround such hardware issues whenever possible.

The next test would be to see if the hang persists even if the drive
is disconnected (or as Bruce suggested, trying a kernel without
the cdrom driver).

If that confirms it is the cdrom, then you have to bisect until
you find the specific change in the driver that created the
issue.


   Mike
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style


Re: [lfs-support] linux 5.5.9: shutdown -h hangs on detaching cdrom

2020-04-21 Thread Stephen Berman
On Tue, 21 Apr 2020 02:08:36 -0400 Michael Shell  wrote:

> On Sat, 18 Apr 2020 13:30:40 +0200
> Stephen Berman  wrote:
>
>
>> Do you mean run `more' in one tty and while it's running do `shutdown -h
>> now' in another tty?
>
>
> Yes, and perhaps also by putting the process into the background:
>
> more file.txt&

I did try (with kernel 5.5.3) `shutdown -h now' with `more' running in
another tty (immediately after logging in and without running any other
programm), and as before it got to the loopback interface message and
then appeared to hang, but after a minute or so (I neglected to check
the time more precisely but it was less than two minutes), the machine
did power off.  So this took longer than the 20 seconds it took when
calling shutdown immediately after logging in but unlike when running
emacs or startx it didn't hang indefinitely.

Steve Berman
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style