linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Petr Mladek <pmladek@suse.com>, Jan Kara <jack@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Peter Zijlstra <peterz@infradead.org>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Eric Biederman <ebiederm@xmission.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>, Pavel Machek <pavel@ucw.cz>,
	Len Brown <len.brown@intel.com>,
	linux-kernel@vger.kernel.org, lkp@01.org
Subject: Re: [printk]  fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage
Date: Wed, 5 Apr 2017 15:29:19 +0800	[thread overview]
Message-ID: <20170405072919.GE20286@yexl-desktop> (raw)
In-Reply-To: <20170331063913.GE20961@yexl-desktop>

On 03/31, 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.

Sorry for the late. I applied the patch of on top of the fbc14616f4 ("printk: enable printk offloading") 
and the "reboot-without-waring" issue is gone for 6 times of tests.

testcase/path_params/tbox_group/run: trinity/300s/vm-kbuild-yocto-ia32

fbc14616f483788a  a75384abd8885080d6923d7036  
----------------  --------------------------  
          4:4         -100%            0:6     dmesg.BUG:kernel_reboot-without-warning_in_test_stage

Thanks,
Xiaolong

>
>Thanks,
>Xiaolong
>>
>>---
>> drivers/tty/sysrq.c | 8 ++------
>> 1 file changed, 2 insertions(+), 6 deletions(-)
>>
>>diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
>>index 817dfb69914d..069f5540be36 100644
>>--- a/drivers/tty/sysrq.c
>>+++ b/drivers/tty/sysrq.c
>>@@ -240,7 +240,6 @@ static DECLARE_WORK(sysrq_showallcpus, sysrq_showregs_othercpus);
>> 
>> static void sysrq_handle_showallcpus(int key)
>> {
>>-	printk_emergency_begin();
>> 	/*
>> 	 * Fall back to the workqueue based printing if the
>> 	 * backtrace printing did not succeed or the
>>@@ -255,7 +254,6 @@ static void sysrq_handle_showallcpus(int key)
>> 		}
>> 		schedule_work(&sysrq_showallcpus);
>> 	}
>>-	printk_emergency_end();
>> }
>> 
>> static struct sysrq_key_op sysrq_showallcpus_op = {
>>@@ -282,10 +280,8 @@ static struct sysrq_key_op sysrq_showregs_op = {
>> 
>> static void sysrq_handle_showstate(int key)
>> {
>>-	printk_emergency_begin();
>> 	show_state();
>> 	show_workqueue_state();
>>-	printk_emergency_end();
>> }
>> static struct sysrq_key_op sysrq_showstate_op = {
>> 	.handler	= sysrq_handle_showstate,
>>@@ -296,9 +292,7 @@ static struct sysrq_key_op sysrq_showstate_op = {
>> 
>> static void sysrq_handle_showstate_blocked(int key)
>> {
>>-	printk_emergency_begin();
>> 	show_state_filter(TASK_UNINTERRUPTIBLE);
>>-	printk_emergency_end();
>> }
>> static struct sysrq_key_op sysrq_showstate_blocked_op = {
>> 	.handler	= sysrq_handle_showstate_blocked,
>>@@ -537,6 +531,7 @@ void __handle_sysrq(int key, bool check_mask)
>> 	int orig_log_level;
>> 	int i;
>> 
>>+	printk_emergency_begin();
>> 	rcu_sysrq_start();
>> 	rcu_read_lock();
>> 	/*
>>@@ -582,6 +577,7 @@ void __handle_sysrq(int key, bool check_mask)
>> 	}
>> 	rcu_read_unlock();
>> 	rcu_sysrq_end();
>>+	printk_emergency_end();
>> }
>> 
>> void handle_sysrq(int key)
>>-- 
>>2.12.2
>>

  parent reply	other threads:[~2017-04-05  7:30 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-29  9:25 [RFC][PATCHv2 0/8] printk: introduce printing kernel thread Sergey Senozhatsky
2017-03-29  9:25 ` [RFC][PATCHv2 1/8] printk: move printk_pending out of per-cpu Sergey Senozhatsky
2017-03-31 13:09   ` Petr Mladek
2017-03-31 13:33     ` Peter Zijlstra
2017-04-03 11:23       ` Sergey Senozhatsky
2017-04-03 12:43         ` Petr Mladek
2017-03-29  9:25 ` [RFC][PATCHv2 2/8] printk: introduce printing kernel thread Sergey Senozhatsky
2017-04-04  9:01   ` Petr Mladek
2017-04-04  9:36     ` Sergey Senozhatsky
2017-04-06 17:14   ` Pavel Machek
2017-04-07  5:12     ` Sergey Senozhatsky
2017-04-07  7:21       ` Pavel Machek
2017-04-07  8:15         ` Sergey Senozhatsky
2017-04-07 12:06           ` Pavel Machek
2017-03-29  9:25 ` [RFC][PATCHv2 3/8] printk: offload printing from wake_up_klogd_work_func() Sergey Senozhatsky
2017-03-31 14:56   ` Petr Mladek
2017-04-04 16:15     ` Sergey Senozhatsky
2017-03-29  9:25 ` [RFC][PATCHv2 4/8] pm: switch to printk.emergency mode in unsafe places Sergey Senozhatsky
2017-03-31 15:06   ` Petr Mladek
2017-04-06 17:20   ` Pavel Machek
2017-04-09 10:59     ` Andreas Mohr
2017-04-10 12:20       ` Petr Mladek
2017-04-10 14:38         ` Sergey Senozhatsky
2017-03-29  9:25 ` [RFC][PATCHv2 5/8] sysrq: " Sergey Senozhatsky
2017-03-31 15:37   ` Petr Mladek
2017-04-01  0:04     ` Sergey Senozhatsky
2017-03-29  9:25 ` [RFC][PATCHv2 6/8] kexec: " Sergey Senozhatsky
2017-03-31 15:39   ` Petr Mladek
2017-03-29  9:25 ` [RFC][PATCHv2 7/8] printk: add printk emergency_mode parameter Sergey Senozhatsky
2017-04-03 15:29   ` Petr Mladek
2017-04-04  8:29     ` Sergey Senozhatsky
2017-03-29  9:25 ` [RFC][PATCHv2 8/8] printk: enable printk offloading Sergey Senozhatsky
2017-03-30 21:38   ` [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage kernel test robot
2017-03-31  2:35     ` Sergey Senozhatsky
2017-03-31  4:04       ` Sergey Senozhatsky
2017-03-31  6:39         ` Ye Xiaolong
2017-03-31 14:47           ` Sergey Senozhatsky
2017-03-31 15:28             ` Eric W. Biederman
2017-04-03  9:31               ` Jan Kara
2017-04-03 10:06                 ` Petr Mladek
2017-04-06 17:33                 ` Pavel Machek
2017-04-07  4:44                   ` Sergey Senozhatsky
2017-04-07  7:15                     ` Pavel Machek
2017-04-07  7:46                       ` Sergey Senozhatsky
2017-04-07  8:14                         ` Pavel Machek
2017-04-07 12:10                           ` Sergey Senozhatsky
2017-04-07 12:44                             ` Pavel Machek
2017-04-07 14:40                               ` Steven Rostedt
2017-05-08  6:37                                 ` Sergey Senozhatsky
2017-05-17 13:13                                   ` Petr Mladek
2017-04-07 15:13                               ` Sergey Senozhatsky
2017-04-07 15:23                                 ` Peter Zijlstra
2017-04-07 15:40                                   ` Sergey Senozhatsky
2017-04-09 18:21                                     ` Eric W. Biederman
2017-04-10  4:46                                       ` Sergey Senozhatsky
2017-04-09 10:12                                 ` Pavel Machek
2017-04-10  4:53                                   ` Sergey Senozhatsky
2017-04-10 11:54                                     ` Petr Mladek
2017-04-10 15:08                                       ` Sergey Senozhatsky
2017-04-10 18:48                                     ` Pavel Machek
2017-04-11  1:46                                       ` Sergey Senozhatsky
2017-04-11 16:19                                         ` Sergey Senozhatsky
2017-04-12 18:43                                           ` Pavel Machek
2017-04-13  4:34                                             ` Sergey Senozhatsky
2017-04-13  5:50                                           ` Sergey Senozhatsky
2017-04-13  8:19                                             ` Sergey Senozhatsky
2017-04-13 14:03                                           ` Petr Mladek
2017-04-14  4:42                                             ` Sergey Senozhatsky
2017-04-07 14:29                           ` Steven Rostedt
2017-04-09  9:57                             ` Pavel Machek
2017-04-03 10:51               ` Sergey Senozhatsky
2017-04-05  7:29           ` Ye Xiaolong [this message]
2017-04-05  8:40             ` Sergey Senozhatsky
2017-04-03 15:42   ` [RFC][PATCHv2 8/8] printk: enable printk offloading Petr Mladek
2017-04-04 13:20     ` Sergey Senozhatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170405072919.GE20286@yexl-desktop \
    --to=xiaolong.ye@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jack@suse.cz \
    --cc=jslaby@suse.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@01.org \
    --cc=pavel@ucw.cz \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=rjw@rjwysocki.net \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).