* Re: kernel hang during reboot when cmdline include a non-exist console device
@ 2021-08-31 2:53 Linus Torvalds
2021-08-31 3:17 ` Sergey Senozhatsky
0 siblings, 1 reply; 13+ messages in thread
From: Linus Torvalds @ 2021-08-31 2:53 UTC (permalink / raw)
To: Petr Mladek, Sergey Senozhatsky
Cc: Steven Rostedt, John Ogness, Linux Kernel Mailing List
There's a bugzilla for this, but let's just move it to reguilar email,
unless some of you want to track it that way.
The bugzilla entry says
"When reboot, the capslock key of thinkpad x1 starts blinking"
which sounds like there's an oops that just isn't showing, quite
possibly because the console has already been shut down.
I didn't test this out, and would sincerely hope that somebody else is
willing to follow up on it since I'm in the busiest part of the merge
window.
Linus
On Mon, Aug 30, 2021 at 7:19 PM <bugzilla-daemon@bugzilla.kernel.org> wrote:
>
> https://bugzilla.kernel.org/show_bug.cgi?id=214201
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: kernel hang during reboot when cmdline include a non-exist console device 2021-08-31 2:53 kernel hang during reboot when cmdline include a non-exist console device Linus Torvalds @ 2021-08-31 3:17 ` Sergey Senozhatsky 2021-08-31 7:34 ` John Ogness 2021-08-31 8:14 ` Petr Mladek 0 siblings, 2 replies; 13+ messages in thread From: Sergey Senozhatsky @ 2021-08-31 3:17 UTC (permalink / raw) To: Linus Torvalds Cc: Petr Mladek, Sergey Senozhatsky, Steven Rostedt, John Ogness, Linux Kernel Mailing List On (21/08/30 19:53), Linus Torvalds wrote: > > There's a bugzilla for this, but let's just move it to reguilar email, > unless some of you want to track it that way. > > The bugzilla entry says > > "When reboot, the capslock key of thinkpad x1 starts blinking" > > which sounds like there's an oops that just isn't showing, quite > possibly because the console has already been shut down. > > I didn't test this out, and would sincerely hope that somebody else is > willing to follow up on it since I'm in the busiest part of the merge > window. [..] > > https://bugzilla.kernel.org/show_bug.cgi?id=214201 I think normally wrong/empty console boot argument should not cause problems. We have a huge number of devices that use console="", for instance. But on some hardware this triggers panic(), very early on. I have the same symptoms on my laptop, and so far haven't been able to figure out how to track it down, but I need to re-start my investigation. In the meantime, we had a series [0] but ended up reverting it. I think we need to revisit it, namely the part that starts with [1]. [0] https://lore.kernel.org/lkml/20201111135450.11214-1-pmladek@suse.com/ [1] https://lore.kernel.org/lkml/X%2FfWGjYI5LapMdGW@jagdpanzerIV.localdomain/ ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: kernel hang during reboot when cmdline include a non-exist console device 2021-08-31 3:17 ` Sergey Senozhatsky @ 2021-08-31 7:34 ` John Ogness 2021-08-31 8:14 ` Petr Mladek 1 sibling, 0 replies; 13+ messages in thread From: John Ogness @ 2021-08-31 7:34 UTC (permalink / raw) To: James Wang Cc: Sergey Senozhatsky, Linus Torvalds, Petr Mladek, Sergey Senozhatsky, Steven Rostedt, Linux Kernel Mailing List Added the reporter to the discussion... On 2021-08-31, Sergey Senozhatsky <senozhatsky@chromium.org> wrote: >> There's a bugzilla for this, but let's just move it to reguilar email, >> unless some of you want to track it that way. >> >> The bugzilla entry says >> >> "When reboot, the capslock key of thinkpad x1 starts blinking" >> >> which sounds like there's an oops that just isn't showing, quite >> possibly because the console has already been shut down. There is no console registered. >> I didn't test this out, and would sincerely hope that somebody else is >> willing to follow up on it since I'm in the busiest part of the merge >> window. > > [..] > >> > https://bugzilla.kernel.org/show_bug.cgi?id=214201 > > I think normally wrong/empty console boot argument should not cause > problems. We have a huge number of devices that use console="", for > instance. But on some hardware this triggers panic(), very early on. @James: Is it possible that you can set up a crash kernel to capture the dump? If a crash kernel is not possible, another option would be to enable kgdb+kdb for a serial port. This would allow you to dump the kernel log. > I have the same symptoms on my laptop, and so far haven't been able to > figure out how to track it down, but I need to re-start my > investigation. A crash kernel or kgdb/kdb on a serial port is the easiest way to debug this. John Ogness ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: kernel hang during reboot when cmdline include a non-exist console device 2021-08-31 3:17 ` Sergey Senozhatsky 2021-08-31 7:34 ` John Ogness @ 2021-08-31 8:14 ` Petr Mladek 2021-08-31 8:31 ` James Wang 2021-08-31 8:47 ` Sergey Senozhatsky 1 sibling, 2 replies; 13+ messages in thread From: Petr Mladek @ 2021-08-31 8:14 UTC (permalink / raw) To: Sergey Senozhatsky Cc: Linus Torvalds, Steven Rostedt, John Ogness, James Wang, Linux Kernel Mailing List Adding the reporter into Cc. On Tue 2021-08-31 12:17:59, Sergey Senozhatsky wrote: > On (21/08/30 19:53), Linus Torvalds wrote: > > > > There's a bugzilla for this, but let's just move it to reguilar email, > > unless some of you want to track it that way. > > > > The bugzilla entry says > > > > "When reboot, the capslock key of thinkpad x1 starts blinking" > > > > which sounds like there's an oops that just isn't showing, quite > > possibly because the console has already been shut down. > > > > I didn't test this out, and would sincerely hope that somebody else is > > willing to follow up on it since I'm in the busiest part of the merge > > window. > > [..] > > > > https://bugzilla.kernel.org/show_bug.cgi?id=214201 > > I think normally wrong/empty console boot argument should not cause > problems. We have a huge number of devices that use console="", for > instance. But on some hardware this triggers panic(), very early on. > > I have the same symptoms on my laptop, and so far haven't been able > to figure out how to track it down, but I need to re-start my investigation. Sergey, I think that you talk about the crash where there is no registered console and console_on_rootfs() fails to create stdin, stdout, and stderr for the init process. As a result the kernel crashes during boot. But the bugreport says that the system booted. It crashed later during reboot. It will likely be in the shutdown phase. It still might be still be caused by the missing console. But we should rule out other problems. James, do you see the problem: 1. When there is a real console registered. When you remove the wrong console= parameter. 2. When using "reboot -f" so that the system reboots a dirty way without trying to shut down services. Best Regards, Petr ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: kernel hang during reboot when cmdline include a non-exist console device 2021-08-31 8:14 ` Petr Mladek @ 2021-08-31 8:31 ` James Wang 2021-08-31 8:47 ` Sergey Senozhatsky 1 sibling, 0 replies; 13+ messages in thread From: James Wang @ 2021-08-31 8:31 UTC (permalink / raw) To: Petr Mladek, Sergey Senozhatsky Cc: Linus Torvalds, Steven Rostedt, John Ogness, Linux Kernel Mailing List 在 2021/8/31 PM4:14, Petr Mladek 写道: > Adding the reporter into Cc. > > On Tue 2021-08-31 12:17:59, Sergey Senozhatsky wrote: >> On (21/08/30 19:53), Linus Torvalds wrote: >>> There's a bugzilla for this, but let's just move it to reguilar email, >>> unless some of you want to track it that way. >>> >>> The bugzilla entry says >>> >>> "When reboot, the capslock key of thinkpad x1 starts blinking" >>> >>> which sounds like there's an oops that just isn't showing, quite >>> possibly because the console has already been shut down. >>> >>> I didn't test this out, and would sincerely hope that somebody else is >>> willing to follow up on it since I'm in the busiest part of the merge >>> window. >> [..] >> >>>> https://bugzilla.kernel.org/show_bug.cgi?id=214201 >> I think normally wrong/empty console boot argument should not cause >> problems. We have a huge number of devices that use console="", for >> instance. But on some hardware this triggers panic(), very early on. >> >> I have the same symptoms on my laptop, and so far haven't been able >> to figure out how to track it down, but I need to re-start my investigation. > Sergey, I think that you talk about the crash where there is no registered > console and console_on_rootfs() fails to create stdin, stdout, and > stderr for the init process. As a result the kernel crashes > during boot. > > But the bugreport says that the system booted. It crashed later during > reboot. It will likely be in the shutdown phase. It still might be still > be caused by the missing console. But we should rule out other > problems. > > James, do you see the problem: > > 1. When there is a real console registered. When you remove the > wrong console= parameter. if I use a real tty, no problem; > > 2. When using "reboot -f" so that the system reboots a dirty way > without trying to shut down services. Yes,I have to use "reboot -f" to avoid a cold reboot; > Best Regards, > Petr ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: kernel hang during reboot when cmdline include a non-exist console device 2021-08-31 8:14 ` Petr Mladek 2021-08-31 8:31 ` James Wang @ 2021-08-31 8:47 ` Sergey Senozhatsky 2021-08-31 13:45 ` James Wang 1 sibling, 1 reply; 13+ messages in thread From: Sergey Senozhatsky @ 2021-08-31 8:47 UTC (permalink / raw) To: Petr Mladek Cc: Sergey Senozhatsky, Linus Torvalds, Steven Rostedt, John Ogness, James Wang, Linux Kernel Mailing List On (21/08/31 10:14), Petr Mladek wrote: > On Tue 2021-08-31 12:17:59, Sergey Senozhatsky wrote: > > On (21/08/30 19:53), Linus Torvalds wrote: > > > > > > There's a bugzilla for this, but let's just move it to reguilar email, > > > unless some of you want to track it that way. > > > > > > The bugzilla entry says > > > > > > "When reboot, the capslock key of thinkpad x1 starts blinking" > > > > > > which sounds like there's an oops that just isn't showing, quite > > > possibly because the console has already been shut down. > > > > > > I didn't test this out, and would sincerely hope that somebody else is > > > willing to follow up on it since I'm in the busiest part of the merge > > > window. > > > > [..] > > > > > > https://bugzilla.kernel.org/show_bug.cgi?id=214201 > > > > I think normally wrong/empty console boot argument should not cause > > problems. We have a huge number of devices that use console="", for > > instance. But on some hardware this triggers panic(), very early on. > > > > I have the same symptoms on my laptop, and so far haven't been able > > to figure out how to track it down, but I need to re-start my investigation. > > Sergey, I think that you talk about the crash where there is no registered > console and console_on_rootfs() fails to create stdin, stdout, and > stderr for the init process. As a result the kernel crashes > during boot. Oh, good point, this is during reboot... I somehow missed it. I saw that the kernel oopses when invalid console driver is specified and that sounded familiar. So these cases still _can have_ same root cause, but not necessarily. > But the bugreport says that the system booted. It crashed later during > reboot. It will likely be in the shutdown phase. It still might be still > be caused by the missing console. But we should rule out other > problems. > > James, do you see the problem: > > 1. When there is a real console registered. When you remove the > wrong console= parameter. > > 2. When using "reboot -f" so that the system reboots a dirty way > without trying to shut down services. And may I ask, just in case, if James can revert a revert of Petr's commit: revert a91bd6223ecd46addc71ee6fcd432206d39365d2 boot with wrong console argument and see if the kernel reboots without any problems. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: kernel hang during reboot when cmdline include a non-exist console device 2021-08-31 8:47 ` Sergey Senozhatsky @ 2021-08-31 13:45 ` James Wang 2021-08-31 14:33 ` Petr Mladek 0 siblings, 1 reply; 13+ messages in thread From: James Wang @ 2021-08-31 13:45 UTC (permalink / raw) To: Sergey Senozhatsky, Petr Mladek Cc: Linus Torvalds, Steven Rostedt, John Ogness, Linux Kernel Mailing List 在 2021/8/31 PM4:47, Sergey Senozhatsky 写道: > And may I ask, just in case, if James can revert a revert of Petr's commit: > > revert a91bd6223ecd46addc71ee6fcd432206d39365d2 > > boot with wrong console argument and see if the kernel reboots without > any problems. After test, revert Petr's commit can work; reboot without any problem; James (was: jnwang@suse.com) ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: kernel hang during reboot when cmdline include a non-exist console device 2021-08-31 13:45 ` James Wang @ 2021-08-31 14:33 ` Petr Mladek 2021-08-31 14:38 ` James Wang 0 siblings, 1 reply; 13+ messages in thread From: Petr Mladek @ 2021-08-31 14:33 UTC (permalink / raw) To: James Wang Cc: Sergey Senozhatsky, Linus Torvalds, Steven Rostedt, John Ogness, Linux Kernel Mailing List On Tue 2021-08-31 21:45:05, James Wang wrote: > > 在 2021/8/31 PM4:47, Sergey Senozhatsky 写道: > > And may I ask, just in case, if James can revert a revert of Petr's commit: > > > > revert a91bd6223ecd46addc71ee6fcd432206d39365d2 > > > > boot with wrong console argument and see if the kernel reboots without > > any problems. > > After test, revert Petr's commit can work; reboot without any problem; Interesting, it looks like the panic() is really caused by missing stdout, stdin, and stderr, for the init process. Unfortunately, the fix is not easy, as described in the commit a91bd6223ecd46addc71e ("Revert "init/console: Use ttynull as a fallback when there is no console"). Best Regards, Petr ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: kernel hang during reboot when cmdline include a non-exist console device 2021-08-31 14:33 ` Petr Mladek @ 2021-08-31 14:38 ` James Wang 2021-08-31 14:52 ` Petr Mladek 0 siblings, 1 reply; 13+ messages in thread From: James Wang @ 2021-08-31 14:38 UTC (permalink / raw) To: Petr Mladek Cc: Sergey Senozhatsky, Linus Torvalds, Steven Rostedt, John Ogness, Linux Kernel Mailing List 在 2021/8/31 PM10:33, Petr Mladek 写道: > On Tue 2021-08-31 21:45:05, James Wang wrote: >> 在 2021/8/31 PM4:47, Sergey Senozhatsky 写道: >>> And may I ask, just in case, if James can revert a revert of Petr's commit: >>> >>> revert a91bd6223ecd46addc71ee6fcd432206d39365d2 >>> >>> boot with wrong console argument and see if the kernel reboots without >>> any problems. >> After test, revert Petr's commit can work; reboot without any problem; > Interesting, it looks like the panic() is really caused by missing > stdout, stdin, and stderr, for the init process. > > Unfortunately, the fix is not easy, as described in the commit > a91bd6223ecd46addc71e ("Revert "init/console: Use ttynull as > a fallback when there is no console"). OK. But I suppose you could find a quick workaround to mitigate this issue. James ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: kernel hang during reboot when cmdline include a non-exist console device 2021-08-31 14:38 ` James Wang @ 2021-08-31 14:52 ` Petr Mladek 2021-09-01 1:52 ` James Wang 0 siblings, 1 reply; 13+ messages in thread From: Petr Mladek @ 2021-08-31 14:52 UTC (permalink / raw) To: James Wang Cc: Sergey Senozhatsky, Linus Torvalds, Steven Rostedt, John Ogness, Linux Kernel Mailing List On Tue 2021-08-31 22:38:42, James Wang wrote: > > 在 2021/8/31 PM10:33, Petr Mladek 写道: > > On Tue 2021-08-31 21:45:05, James Wang wrote: > > > 在 2021/8/31 PM4:47, Sergey Senozhatsky 写道: > > > > And may I ask, just in case, if James can revert a revert of Petr's commit: > > > > > > > > revert a91bd6223ecd46addc71ee6fcd432206d39365d2 > > > > > > > > boot with wrong console argument and see if the kernel reboots without > > > > any problems. > > > After test, revert Petr's commit can work; reboot without any problem; > > Interesting, it looks like the panic() is really caused by missing > > stdout, stdin, and stderr, for the init process. > > > > Unfortunately, the fix is not easy, as described in the commit > > a91bd6223ecd46addc71e ("Revert "init/console: Use ttynull as > > a fallback when there is no console"). > > OK. But I suppose you could find a quick workaround to mitigate this issue. You could either remove the invalid console=ttyUSB0,115200 parameter. As a result, tty0 will become the default console and it will be used by the init process. If you do not want any console, you could build the kernel with CONFIG_NULL_TTY=y and use console=null on the commandline. Best Regards, Petr ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: kernel hang during reboot when cmdline include a non-exist console device 2021-08-31 14:52 ` Petr Mladek @ 2021-09-01 1:52 ` James Wang 2021-09-01 11:48 ` Petr Mladek 0 siblings, 1 reply; 13+ messages in thread From: James Wang @ 2021-09-01 1:52 UTC (permalink / raw) To: Petr Mladek Cc: Sergey Senozhatsky, Linus Torvalds, Steven Rostedt, John Ogness, Linux Kernel Mailing List 在 2021/8/31 PM10:52, Petr Mladek 写道: > On Tue 2021-08-31 22:38:42, James Wang wrote: >> 在 2021/8/31 PM10:33, Petr Mladek 写道: >>> On Tue 2021-08-31 21:45:05, James Wang wrote: >>>> 在 2021/8/31 PM4:47, Sergey Senozhatsky 写道: >>>>> And may I ask, just in case, if James can revert a revert of Petr's commit: >>>>> >>>>> revert a91bd6223ecd46addc71ee6fcd432206d39365d2 >>>>> >>>>> boot with wrong console argument and see if the kernel reboots without >>>>> any problems. >>>> After test, revert Petr's commit can work; reboot without any problem; >>> Interesting, it looks like the panic() is really caused by missing >>> stdout, stdin, and stderr, for the init process. >>> >>> Unfortunately, the fix is not easy, as described in the commit >>> a91bd6223ecd46addc71e ("Revert "init/console: Use ttynull as >>> a fallback when there is no console"). >> OK. But I suppose you could find a quick workaround to mitigate this issue. > You could either remove the invalid console=ttyUSB0,115200 > parameter. As a result, tty0 will become the default console and > it will be used by the init process. No,I just want to use a "invalid" console parameter for "boot up", because It could help me "drop" kernel/systemd log, keep the kernel logo on the screen; James ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: kernel hang during reboot when cmdline include a non-exist console device 2021-09-01 1:52 ` James Wang @ 2021-09-01 11:48 ` Petr Mladek 2021-09-01 13:53 ` James Wang 0 siblings, 1 reply; 13+ messages in thread From: Petr Mladek @ 2021-09-01 11:48 UTC (permalink / raw) To: James Wang Cc: Sergey Senozhatsky, Linus Torvalds, Steven Rostedt, John Ogness, Linux Kernel Mailing List On Wed 2021-09-01 09:52:54, James Wang wrote: > > 在 2021/8/31 PM10:52, Petr Mladek 写道: > > On Tue 2021-08-31 22:38:42, James Wang wrote: > > > 在 2021/8/31 PM10:33, Petr Mladek 写道: > > > > On Tue 2021-08-31 21:45:05, James Wang wrote: > > > > > 在 2021/8/31 PM4:47, Sergey Senozhatsky 写道: > > > > > > And may I ask, just in case, if James can revert a revert of Petr's commit: > > > > > > > > > > > > revert a91bd6223ecd46addc71ee6fcd432206d39365d2 > > > > > > > > > > > > boot with wrong console argument and see if the kernel reboots without > > > > > > any problems. > > > > > After test, revert Petr's commit can work; reboot without any problem; > > > > Interesting, it looks like the panic() is really caused by missing > > > > stdout, stdin, and stderr, for the init process. > > > > > > > > Unfortunately, the fix is not easy, as described in the commit > > > > a91bd6223ecd46addc71e ("Revert "init/console: Use ttynull as > > > > a fallback when there is no console"). > > > OK. But I suppose you could find a quick workaround to mitigate this issue. > > You could either remove the invalid console=ttyUSB0,115200 > > parameter. As a result, tty0 will become the default console and > > it will be used by the init process. > > No,I just want to use a "invalid" console parameter for "boot up", because > It could help me "drop" kernel/systemd log, keep the kernel logo on the > screen; This looks like a hack. And it works just by chance. It is neither documented nor supported. The official way to hide kernel messages is using "quiet" or "loglevel=1" kernel parameters. If you really do not want the console then I suggest to use the ttynull driver mentioned in the previous mail. Best Regards, Petr ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: kernel hang during reboot when cmdline include a non-exist console device 2021-09-01 11:48 ` Petr Mladek @ 2021-09-01 13:53 ` James Wang 0 siblings, 0 replies; 13+ messages in thread From: James Wang @ 2021-09-01 13:53 UTC (permalink / raw) To: Petr Mladek Cc: Sergey Senozhatsky, Linus Torvalds, Steven Rostedt, John Ogness, Linux Kernel Mailing List 在 2021/9/1 PM7:48, Petr Mladek 写道: > The official way to hide kernel messages is using "quiet" or > "loglevel=1" kernel parameters. “quiet" will block kernel logo, right? I want kernel logo keep in screen. James ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2021-09-01 13:53 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-08-31 2:53 kernel hang during reboot when cmdline include a non-exist console device Linus Torvalds 2021-08-31 3:17 ` Sergey Senozhatsky 2021-08-31 7:34 ` John Ogness 2021-08-31 8:14 ` Petr Mladek 2021-08-31 8:31 ` James Wang 2021-08-31 8:47 ` Sergey Senozhatsky 2021-08-31 13:45 ` James Wang 2021-08-31 14:33 ` Petr Mladek 2021-08-31 14:38 ` James Wang 2021-08-31 14:52 ` Petr Mladek 2021-09-01 1:52 ` James Wang 2021-09-01 11:48 ` Petr Mladek 2021-09-01 13:53 ` James Wang
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.