From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Kernel lockup, might be helpful log.
Date: Mon, 14 Dec 2015 06:51:41 +0000 (UTC) [thread overview]
Message-ID: <pan$42e96$8159f644$233ed3aa$27e4f2e6@cox.net> (raw)
In-Reply-To: 566DF757.8020807@birds-are-nice.me
Birdsarenice posted on Sun, 13 Dec 2015 22:55:19 +0000 as excerpted:
> Meanwhile, I did get lucky: At one crash I happened to be logged in and
> was able to hit dmesg seconds before it went completely. So what I have
> here is information that looks like it'll help you track down a
> rarely-encountered and hard-to-reproduce bug which can cause the system
> to lock up completely in event of certain types of hard drive failure.
> It might be nothing, but perhaps someone will find it of use - because
> it'd be a tricky one to both reproduce and get a good error report if it
> did occur.
>
> I see an 'invalid opcode' error in here, that's pretty unusual
Disclaimer: I'm a list regular and (small-scale) sysadmin, not a dev,
and most certainly not a btrfs dev. Take what I saw with that in mind,
tho I've been active on-list for over a year and thus now have a
reasonable level of practical sysadmin configuration and crisis recovery
level btrfs experience.
You could well be quite correct with the unusual crash log and its value,
I'll leave that up to the devs to decide, but that "invalid opcode: 0000"
bit is in fact not at all unusual on btrfs. Tho I can say it fooled me
originally as well, because it certainly /looks/ both suspicious and in
general unusual.
Based on how a dev explained it to me, I believe btrfs actually
deliberately uses opcode 0000 to trigger a semi-controlled crash in
instances where code that "should never happen" actually gets executed
for some reason, leaving the kernel is an unknown and thus not
trustworthy enough to reliably write to storage devices and do a
controlled shutdown. That's of course why the tracebacks are there, to
help the devs figure out where it was and what triggered it, but the 0000
opcode itself is actually quite frequently found in these tracebacks,
because it's the method chosen to deliberately trigger them.
I'd guess the same technique is actually used in various other (non-
btrfs) kernel code as well, but in fully stable code it actually is very
rarely seen, precisely because it /does/ mean the kernel reached code
that it is never expected to reach, meaning something specific went wrong
to get to that point, and in fully stable code, it's rare that any code
paths actually leading to that sort of execution point remain, as they've
all been found over the years.
But of course btrfs, while no longer experimental, remains "still
stabilizing and maturing, not yet fully stable or mature", so there's
still code paths left that do still occasionally reach these intended to
be unreachable code points, and when that happens, triggering a crash and
hopefully getting a traceback that helps the devs figure out which code
path has the bug and why, is a good thing to do, and this is apparently
the way it's done.
(BTW, compliments on the nick and email address. =:^)
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
next prev parent reply other threads:[~2015-12-14 6:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-13 22:55 Kernel lockup, might be helpful log Birdsarenice
2015-12-14 6:51 ` Duncan [this message]
2015-12-14 8:35 ` Hugo Mills
2015-12-14 12:38 ` Duncan
2015-12-14 7:36 ` Chris Murphy
2015-12-14 8:28 ` Birdsarenice
2015-12-14 12:06 ` Filipe Manana
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='pan$42e96$8159f644$233ed3aa$27e4f2e6@cox.net' \
--to=1i5t5.duncan@cox.net \
--cc=linux-btrfs@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