Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1615033
| From | Jan Kara <jack@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage |
| Date | 2017-04-03 11:40 +0200 |
| Message-ID | <ts6CS-52F-19@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <tqUDL-6Xi-1@gated-at.bofh.it> <tqW2S-7VW-19@gated-at.bofh.it> <tqYxH-10x-1@gated-at.bofh.it> <tr62e-5Sb-13@gated-at.bofh.it> <tr6OC-6qJ-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri 31-03-17 10:28:15, Eric W. Biederman wrote: > Sergey Senozhatsky <sergey.senozhatsky@gmail.com> writes: > > > On (03/31/17 14:39), Ye Xiaolong wrote: > >> On 03/31, Sergey Senozhatsky wrote: > >> >On (03/31/17 11:35), Sergey Senozhatsky wrote: > >> >[..] > >> >> > [ 21.009531] VFS: Warning: trinity-c2 using old stat() call. Recompile your binary. > >> >> > [ 21.148898] VFS: Warning: trinity-c0 using old stat() call. Recompile your binary. > >> >> > [ 22.298208] warning: process `trinity-c2' used the deprecated sysctl system call with > >> >> > > >> >> > Elapsed time: 310 > >> >> > BUG: kernel reboot-without-warning in test stage > >> >> > >> >> so as far as I understand, this is the "missing kernel messages" > >> >> type of bug report. a worst case scenario. > >> > > >> >panic() should have called console_flush_on_panic(), which sould have > >> >flushed the messages regardless the printk_kthread state. so it probably > >> >was not panic() that rebooted the kernel. (probably). > >> > > >> >kernel_restart() and kernel_halt() have pr_emerg() messages, printk switches > >> >to printk_emergency mode the first time it sees EMERG level message. (may be > >> >we switch to late). > >> > > >> >on the other hand, there is a emergency_restart(), where we don't switch > >> >to printk_emergency mode and don't flush the existing kernel messages. > >> >there is a bunch of places that call emergency_restart(), including sysrq. > >> > > >> >may I ask you, how do you usually restart the vm after the test? > >> >`echo X > /proc/sysrq-trigger'? > >> > >> Yes. > >> > >> > > >> >does this patch make it any better? > >> > >> I am trying it and will post the result once I get it. > > > > > > ... I'd also probably add pr_emerg() print-out to emergency_restart(), > > the same way kernel_restart()/kernel_halt()/kernel_power_off() do. > > > > for those cases when emergency_restart() is called with printk in > > kthreaded mode, not in emergency mode. > > No. No. No. > > emergency_restart should be the equivalent of a watchdog going off. > AKA it is long past the point where you want to be coordinating > with other parts of the kernel. Rebooting is the priority. > A print statement absolutely does not belong in emergency_restart. > > The fact that nothing managed to get printed out without magic flushing > code is highly disturbing. > > Looking from the outside this patchset appears to be broken by design. > > If you don't want kernel functions suffering from the overhead of > printing to a slow output device, don't do that then. Sorry, but the above is just contradictory. On one hand you say that missing messages is disturbing and on the other hand you say we should have no messages to avoid the overhead of printing. The fact is kernel has tons of messages because people want to see what happens to possibly debug stuff. And I don't see as viable to reduce amount of messages as it is neverending fight and always someone will be unhappy. As a result currently some machines are not able to boot due to printk traffic and there are other nasty effects from CPUs getting stuck printing messages to serial console (and this really bothers people as is proved by the fact that about every 6 months someone comes with a hack to printk to fix the particular lockup he is hitting). This patch set gives up part of the printk() reliability for bounded latency (at least unless we detect we are really in trouble) which is IMHO a good trade-off for lots of users (and others can just turn this feature off). Honza -- Jan Kara <jack@suse.com> SUSE Labs, CR
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC][PATCHv2 0/8] printk: introduce printing kernel thread Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-03-29 11:30 +0200
[RFC][PATCHv2 2/8] printk: introduce printing kernel thread Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-03-29 11:30 +0200
Re: [RFC][PATCHv2 2/8] printk: introduce printing kernel thread Petr Mladek <pmladek@suse.com> - 2017-04-04 11:10 +0200
Re: [RFC][PATCHv2 2/8] printk: introduce printing kernel thread Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-04 11:40 +0200
Re: [RFC][PATCHv2 2/8] printk: introduce printing kernel thread Pavel Machek <pavel@ucw.cz> - 2017-04-06 19:20 +0200
Re: [RFC][PATCHv2 2/8] printk: introduce printing kernel thread Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-07 07:20 +0200
Re: [RFC][PATCHv2 2/8] printk: introduce printing kernel thread Pavel Machek <pavel@ucw.cz> - 2017-04-07 09:30 +0200
Re: [RFC][PATCHv2 2/8] printk: introduce printing kernel thread Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-07 10:20 +0200
Re: [RFC][PATCHv2 2/8] printk: introduce printing kernel thread Pavel Machek <pavel@ucw.cz> - 2017-04-07 14:10 +0200
[RFC][PATCHv2 5/8] sysrq: switch to printk.emergency mode in unsafe places Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-03-29 11:30 +0200
Re: [RFC][PATCHv2 5/8] sysrq: switch to printk.emergency mode in unsafe places Petr Mladek <pmladek@suse.com> - 2017-03-31 17:40 +0200
Re: [RFC][PATCHv2 5/8] sysrq: switch to printk.emergency mode in unsafe places Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-04-01 02:10 +0200
[RFC][PATCHv2 1/8] printk: move printk_pending out of per-cpu Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-03-29 11:40 +0200
Re: [RFC][PATCHv2 1/8] printk: move printk_pending out of per-cpu Petr Mladek <pmladek@suse.com> - 2017-03-31 15:20 +0200
Re: [RFC][PATCHv2 1/8] printk: move printk_pending out of per-cpu Peter Zijlstra <peterz@infradead.org> - 2017-03-31 15:40 +0200
Re: [RFC][PATCHv2 1/8] printk: move printk_pending out of per-cpu Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-03 13:30 +0200
Re: [RFC][PATCHv2 1/8] printk: move printk_pending out of per-cpu Petr Mladek <pmladek@suse.com> - 2017-04-03 14:50 +0200
[RFC][PATCHv2 6/8] kexec: switch to printk.emergency mode in unsafe places Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-03-29 11:40 +0200
Re: [RFC][PATCHv2 6/8] kexec: switch to printk.emergency mode in unsafe places Petr Mladek <pmladek@suse.com> - 2017-03-31 17:40 +0200
[RFC][PATCHv2 8/8] printk: enable printk offloading Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-03-29 11:40 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-03-31 04:40 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-03-31 06:10 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Ye Xiaolong <xiaolong.ye@intel.com> - 2017-03-31 08:50 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-03-31 16:50 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage ebiederm@xmission.com (Eric W. Biederman) - 2017-03-31 17:40 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Jan Kara <jack@suse.cz> - 2017-04-03 11:40 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Petr Mladek <pmladek@suse.com> - 2017-04-03 12:10 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Pavel Machek <pavel@ucw.cz> - 2017-04-06 19:40 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-07 06:50 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Pavel Machek <pavel@ucw.cz> - 2017-04-07 09:20 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-07 09:50 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Pavel Machek <pavel@ucw.cz> - 2017-04-07 10:20 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-07 14:20 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Pavel Machek <pavel@ucw.cz> - 2017-04-07 14:50 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Steven Rostedt <rostedt@goodmis.org> - 2017-04-07 16:50 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-04-07 17:20 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Peter Zijlstra <peterz@infradead.org> - 2017-04-07 17:30 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-04-07 17:50 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage ebiederm@xmission.com (Eric W. Biederman) - 2017-04-09 20:30 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-10 06:50 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Pavel Machek <pavel@ucw.cz> - 2017-04-09 12:20 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-10 07:00 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Petr Mladek <pmladek@suse.com> - 2017-04-10 14:00 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Steven Rostedt <rostedt@goodmis.org> - 2017-04-07 16:40 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Pavel Machek <pavel@ucw.cz> - 2017-04-09 12:00 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-03 13:00 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Ye Xiaolong <xiaolong.ye@intel.com> - 2017-04-05 09:40 +0200
Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-05 10:50 +0200
Re: [RFC][PATCHv2 8/8] printk: enable printk offloading Petr Mladek <pmladek@suse.com> - 2017-04-03 17:50 +0200
Re: [RFC][PATCHv2 8/8] printk: enable printk offloading Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-04-04 14:30 +0200
[RFC][PATCHv2 4/8] pm: switch to printk.emergency mode in unsafe places Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-03-29 11:40 +0200
Re: [RFC][PATCHv2 4/8] pm: switch to printk.emergency mode in unsafe places Petr Mladek <pmladek@suse.com> - 2017-03-31 17:10 +0200
Re: [RFC][PATCHv2 4/8] pm: switch to printk.emergency mode in unsafe places Pavel Machek <pavel@ucw.cz> - 2017-04-06 19:30 +0200
Re: [RFC][PATCHv2 4/8] pm: switch to printk.emergency mode in unsafe places Andreas Mohr <andi@lisas.de> - 2017-04-09 13:00 +0200
Re: [RFC][PATCHv2 4/8] pm: switch to printk.emergency mode in unsafe places Petr Mladek <pmladek@suse.com> - 2017-04-10 14:30 +0200
Re: [RFC][PATCHv2 4/8] pm: switch to printk.emergency mode in unsafe places Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-04-10 16:40 +0200
[RFC][PATCHv2 7/8] printk: add printk emergency_mode parameter Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-03-29 11:40 +0200
Re: [RFC][PATCHv2 7/8] printk: add printk emergency_mode parameter Petr Mladek <pmladek@suse.com> - 2017-04-03 17:30 +0200
Re: [RFC][PATCHv2 7/8] printk: add printk emergency_mode parameter Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-04 10:30 +0200
csiph-web