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

2020-04-25 Thread Michael Shell
On Sun, 26 Apr 2020 00:33:42 +0200
Stephen Berman  wrote:

>  kernel/sched/core.c
>  kernel/workqueue.c
>  kernel/workqueue_internal.h
>  3 files changed, 48 insertions(+), 99 deletions(-)


Interesting. A search revealed that a kernel automated test robot flagged
a bug in that commit:

https://lore.kernel.org/lkml/20200327074308.GY11705@shao2-debian/

which resulted in this discussion:

https://lore.kernel.org/lkml/20200327175350.rw5gex6cwum3o...@linutronix.de/

about a race condition.

The end result was this patch:

https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=62849a9612924a655c67cf6962920544aa5c20db

However, I *think* that it is only about an erroneous
warning message.


With regard to the problematic commit that bisection revealed
to you:

https://lore.kernel.org/patchwork/patch/1050496/

Can you try with a very recent kernel package, and then revert
just that commit (manually, in an otherwise stock kernel tree,
using the -R option with patch) Does the problem go away?

If so, it would certainly confirm there is an issue with
that commit. And given the discussion among the developers
about what is what, it seems it is very easy to make a
mistake or oversight in that code.

As to why it only happens to you, maybe a certain combination
of config options is needed to trigger the problem.


  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-25 Thread Ken Moffat
On Sun, Apr 26, 2020 at 12:33:42AM +0200, Stephen Berman wrote:
> 
> I guess I should report this to the kernel bug list?  I searched that
> list for power-off issues and found only one report after the above
> commit, and it seems to be a different issue.  It is rather surprising
> that my machine seems to be the only one with this problem.
> 
> Steve Berman

I was going to suggest you might try reverting that commit from
linus's current tree, and/or from current stable (i.e. save the
commit and then try patch -R if in the stable source), but it might
not revert cleanly.  I suppose that linus's current tree (close to
5.7-rc3) ought to be reasonably good, but YMMV.  I guess that
pedantically that means testing current (and/or current 5.6 stable)
without the revert, to prove the problem is still there, and then
reverting to prove the problem is fixed - or else reporting that it
doesn't revert cleanly.

At a minimum, I guess reverting it from the version you first
identified as 'bad' (5.2 ?  I've trimmed too much) and proving that
the revert solves the problem.

iThen maybe just post to the three people who signed off on that
commit, with a Cc: to lkml (linux-ker...@vger.kernel.org),
summarising the problem (and your hardware) and giving the commit
you identified, with your detailed bisection results.

Good luck!

ĸen
-- 
He could send for Ptraci, his favourite handmaiden. She was special.
Her singing always cheered him up. Life seemed so much brighter when
she stopped.   -- Pyramids
-- 
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] Fwd: bug in /lib/lsb/init-functions

2020-04-25 Thread Bruce Dubbs

On 4/25/20 5:46 PM, Alexander Danel wrote:



-- Forwarded message -
From: *Alexander Danel* >

Date: Sat, 25 Apr 2020 at 17:33
Subject: bug in /lib/lsb/init-functions
To: >



Found a bug.  I am looking at a copy of /lib/lsb/init-functions from way 
back in 2011-10-17.


In the function

pidofproc()

Towards the end of the function

     # Figure out if all listed PIDs are running.
     for pid in ${pidlist}; do
         kill -0 ${pid} 2> /dev/null

         if [ "${?}" -eq "0" ]; then
    # A-Danel, fix bug
#lpids="${pids}${pid} "
             lpids="${lpids}${pid} "
         else
             exitstatus="1"
         fi
     done



I don't think so.  lpids is a list of pids (those in pidlist) that are 
active.  Each iteration appends to the a list (lpids) which is initially 
empty.


Please explain why you think what we have is a bug.

Also, reply to lfs-supoprt.  The patches list is not seen by very many 
people.


  -- Bruce
--
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-25 Thread Stephen Berman
On Fri, 24 Apr 2020 10:39:26 +0200 Stephen Berman  
wrote:

> On Sat, 18 Apr 2020 11:22:36 -0500 Bruce Dubbs  wrote:
>
>> On 4/18/20 6:30 AM, Stephen Berman wrote:
>>> On Sat, 18 Apr 2020 03:08:46 -0400 Michael Shell  
>>> wrote:
>>>
 On Wed, 15 Apr 2020 10:41:27 +0200
 Stephen Berman  wrote:
>>
 Another thing to try - does the problem persist if the CDROM is
 physically disconnected from the system (e.g., its SATA cable
 disconnected and then the system powered up)? If the system
 just hangs at some other point, then that is good evidence that
 something other than the CDROM driver/SCSI system is to blame.
>>> Thanks for the feedback.  I see if I can try your suggestions and see
>>> what happens.
>>
>> Another suggestion would be to build a problematic kernel with
>> CONFIG_CDROM=n to see if the issue is still present.
>
> I guess you mean building *without* CONFIG_CDROM=y, since CONFIG_CDROM=n
> doesn't seem to be a valid Kconfig setting.  In order to remove
> CONFIG_CDROM=y I had to unset CONFIG_BLK_DEV_SR (I couldn't see how to
> do this with `make menuconfig' with the existing .config loaded, but I
> could do it with `make xconfig').  Anyway, I did that with the
> problematic kernel 5.3.0, rebuilt and reinstalled the kernel, booted it,
> confirmed that there was no /dev/cdrom, ran startx, emacs, firefox,
> exited these, ran `shutdown -h now', and as previously with this kernel,
> after the loopback interface message there was nothing more, and after
> waiting more than two minutes I pressed the restart button.
>
> So it looks like detaching the cdrom is not the problem after all.
>
> On Wed, 22 Apr 2020 01:43:18 -0400 Michael Shell  
> wrote:
>
>> 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.
>
> Although the cdrom is evidently not the problem, I guess I've reached
> the point where bisecting is the next thing to try.

I've completed the bisection of the mainline kernel between the good
v5.1 and the bad v5.2, and here's the result:

6d25be5782e482eb93e3de0c94d0a517879377d0 is the first bad commit
commit 6d25be5782e482eb93e3de0c94d0a517879377d0
Author: Thomas Gleixner 
Date:   Wed Mar 13 17:55:48 2019 +0100

sched/core, workqueues: Distangle worker accounting from rq lock

The worker accounting for CPU bound workers is plugged into the core
scheduler code and the wakeup code. This is not a hard requirement and
can be avoided by keeping track of the state in the workqueue code
itself.

Keep track of the sleeping state in the worker itself and call the
notifier before entering the core scheduler. There might be false
positives when the task is woken between that call and actually
scheduling, but that's not really different from scheduling and being
woken immediately after switching away. When nr_running is updated when
the task is retunrning from schedule() then it is later compared when it
is done from ttwu().

[ bigeasy: preempt_disable() around wq_worker_sleeping() by Daniel Bristot 
de Oliveira ]

Signed-off-by: Thomas Gleixner 
Signed-off-by: Sebastian Andrzej Siewior 
Signed-off-by: Peter Zijlstra (Intel) 
Acked-by: Tejun Heo 
Cc: Daniel Bristot de Oliveira 
Cc: Lai Jiangshan 
Cc: Linus Torvalds 
Cc: Peter Zijlstra 
Link: 
http://lkml.kernel.org/r/ad2b29b5715f970bffc1a7026cabd6ff0b24076a.1532952814.git.bris...@redhat.com
Signed-off-by: Ingo Molnar 

 kernel/sched/core.c | 88 +++--
 kernel/workqueue.c  | 54 +---
 kernel/workqueue_internal.h |  5 +--
 3 files changed, 48 insertions(+), 99 deletions(-)

I hope I did the bisection correctly.  According to git there are almost
7000 commits between the v5.1 and v5.2 kernels, resulting in a 13-step
bisection.  In each step I first ran `make oldconfig' using the 5.1.0
config and accepting the defaults of all new options, then built and
installed the kernel.  I tested by booting the kernel, then running
startx (openbox), emacs and firefox, exiting all of these and then
running `shutdown -h now' in the tty.  Here's a summary of the results:

1st test: power off 45 seconds after the message "Bringing down the
loopback interface"; I told git this is bad, though it was a shorter
hang than most others I've experienced.
2nd test: power off 1'56" after loopback message (bad).
3rd test: power off 2'03" after loopback message (bad).
4th test: power off 1'47" after loopback message (bad).
5th test: waited more than 3 minutes after loopback message, no power
off, pressed restart button (bad).
6th test: power off within 4 seconds after loopback message (good).
7th test: power off after 1'28" after loopback message (bad).
8th test: power off within 4 seconds after loopback message (good).
9th test: power off 2'50" after loopback message (bad).
10th test: power off 2'06" after 

[lfs-support] Unsubscribe

2020-04-25 Thread Chris6
Please unsubscribe me

Sent from ProtonMail Mobile

On Sat, Apr 25, 2020 at 8:47 AM, Furkan İnciroğlu 
 wrote:

> Hi there,
>
> When I have done LFS on Virtualbox, I could export my OS as a img
> and ova file. When I want to deploy my OS into several device, I
> should deploy it manually. For example; open ubuntu live and run dd
> command, and copy my OS img to device disks.
>
> My question is, how can I automate this process? I thought, it's the
> better idea to look some installer such as
> https://github.com/linuxmint/live-installer. But I really wonder here,
> first, should I convert my OS img to ISO file?
>
> Best Regards,
> --
> 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-- 
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


[lfs-support] OS Installer

2020-04-25 Thread Furkan İnciroğlu
Hi there,

When I have done LFS on Virtualbox, I could export my OS as a img
and ova file. When I want to deploy my OS into several device, I
should deploy it manually. For example; open ubuntu live and run dd
command, and copy my OS img to device disks.

My question is, how can I automate this process? I thought, it's the
better idea to look some installer such as
https://github.com/linuxmint/live-installer. But I really wonder here,
first, should I convert my OS img to ISO file?

Best Regards,
-- 
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