public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johanna Abrahamsson <johanna@mjao.org>
To: Andrew Morton <akpm@linux-foundation.org>,
	Davidlohr Bueso <dave@stgolabs.net>
Cc: linux-kernel@vger.kernel.org
Subject: [BUG] kernel freeze, rcu_sched self-detected stall on CPU
Date: Sat, 17 Dec 2016 23:25:35 +0100	[thread overview]
Message-ID: <20161217222531.GA16921@fedora-21-dvm> (raw)

A bug has been introduced in ipc/sem.c by a patch '[PATCH -next 2/2] ipc/sem: avoid idr tree lookup for interrupted semop' (https://marc.info/?l=linux-kernel&m=147870885903619, commit 370b262c896e5565b271a3ea3abee4d0914ba443).
The bug results in a kernel freeze and several "INFO: rcu_sched self-detected stall on CPU". The system becomes unresponsible and has to be rebooted to work again as far as I can tell.
My repro case is, hilariously enough, packaging the linux kernel for debian with `make -j8 deb-pkg`. I'm sure a smaller repro case could be constructed, but so far I've had 100% reproducibility from this one. The freeze always occurs at the Makefiles.headerinst part of packaging, after the kernel is built.
The bug is present in next-20161124 and linux-next versions going forward from that and has now been merged to linus/master. However, in linus/master it doesn't trigger a bug. This seems to indicate that it only triggers a bug in combination with a commit that is present in next-20161216 but not present in linus/master.
I've confirmed that doing `git revert 370b262c896e5565b271a3ea3abee4d0914ba443` on next-20161216 fixes the bug.

In all repro cases I've tested on virtual machines with multiple cpu cores running under either Xen or Virtualbox.

I will try to investigate this further but as I have limited knowledge of RCU and how the kernel works with semaphores don't expect any miracles :)

Best Regards,
Johanna Abrahamsson

             reply	other threads:[~2016-12-17 22:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-17 22:25 Johanna Abrahamsson [this message]
2016-12-18 16:32 ` [BUG] kernel freeze, rcu_sched self-detected stall on CPU Davidlohr Bueso
2016-12-19  9:06   ` Johanna Abrahamsson

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=20161217222531.GA16921@fedora-21-dvm \
    --to=johanna@mjao.org \
    --cc=akpm@linux-foundation.org \
    --cc=dave@stgolabs.net \
    --cc=linux-kernel@vger.kernel.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