From: Dave Jones <davej@codemonkey.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: /proc/<pid>/status & task struct locking
Date: Fri, 15 Apr 2016 14:23:01 -0400 [thread overview]
Message-ID: <20160415182301.GA929@codemonkey.org.uk> (raw)
In-Reply-To: <CA+55aFx0kt2zXHGo2rzn9a-Bu=-Di=MYApmpWTAyE+TreV2C9Q@mail.gmail.com>
On Fri, Apr 15, 2016 at 11:07:16AM -0700, Linus Torvalds wrote:
> On Fri, Apr 15, 2016 at 9:49 AM, Dave Jones <davej@codemonkey.org.uk> wrote:
> > [<ffffffff811d7b39>] ? seq_vprintf+0x39/0x70
> > [<ffffffff811d7b35>] seq_vprintf+0x35/0x70
> > Code: 89 cd 49 01 fc 0f 82 18 03 00 00 48 89 7d b0 41 0f b6 07 0f 1f 84 00 00 00 00 00 84 c0 74 43 48 8d 75 c8 4c 89 ff e8 30 d4 ff ff <0f> b6 55 c8 48 63 c8 4d 8d 34 0f 80 fa 07 0f 87 4c 02 00 00 ff
>
> The code disassembles to
>
> 0: 48 89 7d b0 mov %rdi,-0x50(%rbp)
> 4: 41 0f b6 07 movzbl (%r15),%eax
> 8: 0f 1f 84 00 00 00 00 nopl
> 10: 84 c0 test %al,%al
> 12: 74 43 je 0x57
> 14: 48 8d 75 c8 lea -0x38(%rbp),%rsi
> 18: 4c 89 ff mov %r15,%rdi
> 1b: e8 30 d4 ff ff callq 0xffffffffffffd450
> 20:* 0f b6 55 c8 movzbl -0x38(%rbp),%edx <-- trapping instruction
> 24: 48 63 c8 movslq %eax,%rcx
>
> which is interesting. That "-0x38(%rbp)" was passed (by reference) to
> some subroutine, and now that we try to read the value, we take a
> fault.
>
> And it makes even less sense because %rbp really seems to be not a
> random register, but the frame pointer:
>
> RBP: ffff8801ac52fc78
> RSP: ffff8801ac52fc08
>
> So why the *hell* do we get
>
> BUG: unable to handle kernel NULL pointer dereference at 0000000000000019
>
> for that? That makes no sense.
That's a really good question.
> Quite frankly, I would not attribute this to /proc/pid/status with
> this kind of insane oops.
>
> Maybe I misread your oops, but that just all looks completely bogus.
> Even if the stack got corrupted and/or unmapped, how did %cr2 get that
> odd "0000000000000019" fault address? None of this makes any sense at
> all to me.
>
> What CPU is this on? There was the crazy AMD microcode bug. This looks
> even more random, because now the registers look fine, and the oops
> just looks bad.
It's a Xeon E5-2680 v4.
> Do you have other versions of the oops for this same problem?
I've seen this a few times, so I'll see if I can dig up some more next week.
I'm now wondering if it's just some hardware bug though. As mentioned it's
an outlier bug, but one that seems to pop up enough times that it's been
nagging at me, in case it's also responsible for similar weird /proc traces
I've been seeing (more frequently), those have a different signature to this
though.
To put my mind at rest though, am I wrong about that absent task_lock() stuff ?
Dave
next prev parent reply other threads:[~2016-04-15 18:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-15 16:49 /proc/<pid>/status & task struct locking Dave Jones
2016-04-15 18:07 ` Linus Torvalds
2016-04-15 18:23 ` Dave Jones [this message]
2016-04-15 18:39 ` Linus Torvalds
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=20160415182301.GA929@codemonkey.org.uk \
--to=davej@codemonkey.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/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