public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Waiman Long <longman@redhat.com>
To: kernel test robot <rong.a.chen@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Andrew Morton <akpm@linux-foundation.org>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Tim Chen <tim.c.chen@linux.intel.com>,
	Will Deacon <will.deacon@arm.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	tipbuild@zytor.com, lkp@01.org
Subject: Re: [locking/rwsem] f03c360396: WARNING:at_init/main.c:#start_kernel
Date: Fri, 12 Apr 2019 10:01:19 -0400	[thread overview]
Message-ID: <4d35a232-ed7b-b74e-bbae-30013355ceb8@redhat.com> (raw)
In-Reply-To: <20190412031809.GJ17122@shao2-debian>

On 04/11/2019 11:18 PM, kernel test robot wrote:
> FYI, we noticed the following commit (built with gcc-7):
>
> commit: f03c36039664fc53ebf6d8322c46aaf8e373f70c ("locking/rwsem: Merge owner into count on x86-64")
> https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git WIP.locking/core
>
> in testcase: trinity
> with following parameters:
>
> 	runtime: 300s
>
> test-description: Trinity is a linux system call fuzz tester.
> test-url: http://codemonkey.org.uk/projects/trinity/
>
>
> on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 8G
>
> caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
>
>
> +----------------------------------------------------+------------+------------+
> |                                                    | 1878939138 | f03c360396 |
> +----------------------------------------------------+------------+------------+
> | boot_successes                                     | 0          | 0          |
> | boot_failures                                      | 4          | 9          |
> | BUG:kernel_hang_in_boot-around-mounting-root_stage | 3          | 5          |
> | BUG:kernel_reboot-without-warning_in_test_stage    | 1          |            |
> | WARNING:at_init/main.c:#start_kernel               | 0          | 9          |
> | RIP:start_kernel                                   | 0          | 9          |
> +----------------------------------------------------+------------+------------+
>
>
>
> [    4.777899] WARNING: CPU: 0 PID: 0 at init/main.c:663 start_kernel+0x366/0x512
> [    4.777906] Modules linked in:
> [    4.777920] CPU: 0 PID: 0 Comm: swapper Not tainted 5.1.0-rc4-00083-gf03c360 #2
> [    4.777929] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
> [    4.777943] RIP: 0010:start_kernel+0x366/0x512
> [    4.777957] Code: 01 00 e8 f2 85 00 00 e8 84 cd 01 00 e8 0e 48 02 00 e8 34 2b 8b fe 9c 58 0f ba e0 09 73 0e 48 c7 c7 e0 08 a0 99 e8 2c 91 bd fd <0f> 0b c6 05 4b c0 b9 ff 00 e8 64 d2 cb fd fb e8 c9 ca 02 00 e8 87
> [    4.777966] RSP: 0000:ffffffff9a207ed8 EFLAGS: 00010282
> [    4.777977] RAX: dffffc0000000008 RBX: ffff8881f699cb00 RCX: ffffffff9896f4d5
> [    4.777986] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff988f0c4b
> [    4.777995] RBP: 1ffffffff3440fdb R08: fffffbfff35085ae R09: fffffbfff35085ae
> [    4.778003] R10: 0000000000000001 R11: fffffbfff35085ad R12: ffffffff9ad812e0
> [    4.778011] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
> [    4.778020] FS:  0000000000000000(0000) GS:ffffffff9a2a7000(0000) knlGS:0000000000000000
> [    4.778029] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [    4.778037] CR2: 00000000ffffffff CR3: 00000001e884c000 CR4: 00000000000006b0
> [    4.778046] Call Trace:
> [    4.778063]  ? mem_encrypt_init+0x1/0x1
> [    4.778080]  ? memcpy_orig+0x16/0x110
> [    4.778093]  secondary_startup_64+0xb6/0xc0
> [    4.778116] random: get_random_bytes called from print_oops_end_marker+0x34/0x47 with crng_init=0
> [    4.778128] ---[ end trace 8182026d66b2a4ad ]---
>
>
> To reproduce:
>
>         # build kernel
> 	cd linux
> 	cp config-5.1.0-rc4-00083-gf03c360 .configf03c36039664fc53ebf6d8322c46aaf8e373f70c
> 	make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 olddefconfig
> 	make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 prepare
> 	make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 modules_prepare
> 	make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 SHELL=/bin/bash
> 	make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 bzImage
>
>
>         git clone https://github.com/intel/lkp-tests.git
>         cd lkp-tests
>         bin/lkp qemu -k <bzImage> job-script # job-script is attached in this email
>
>
>
> Thanks,
> Rong Chen
>
I think it was caused by the bug that I forgot to initialize sem->owner
in __init_rwsem() when CONFIG_RWSEM_SPIN_ON_OWNER isn't defined as
pointed out by Peter. That will be fixed in the next version of the
patchset.

Thanks,
Longman


      reply	other threads:[~2019-04-12 14:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12  3:18 [locking/rwsem] f03c360396: WARNING:at_init/main.c:#start_kernel kernel test robot
2019-04-12 14:01 ` Waiman Long [this message]

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=4d35a232-ed7b-b74e-bbae-30013355ceb8@redhat.com \
    --to=longman@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=dave@stgolabs.net \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@01.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rong.a.chen@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tim.c.chen@linux.intel.com \
    --cc=tipbuild@zytor.com \
    --cc=torvalds@linux-foundation.org \
    --cc=will.deacon@arm.com \
    /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