All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: BUG_ON(nd->inode->i_op->follow_link);
Date: Thu, 7 Mar 2013 14:35:01 -0500	[thread overview]
Message-ID: <20130307193501.GA2802@redhat.com> (raw)
In-Reply-To: <CA+55aFyVZeDswi=M65ULQkGCvJq5vsASLqGCtufH3TcS--MC1Q@mail.gmail.com>

On Thu, Mar 07, 2013 at 09:30:56AM -0800, Linus Torvalds wrote:
 > On Thu, Mar 7, 2013 at 7:30 AM, Dave Jones <davej@redhat.com> wrote:
 > > On Wed, Mar 06, 2013 at 09:16:45PM -0500, Dave Jones wrote:
 > >
 > >  >  kernel BUG at fs/namei.c:1441!
 > 
 > Ok, that's a seriously bad error case. although I still worry that
 > BUG_ON() is too bug of a hammer. If we hold any other locks, we're
 > basically screwed, and may end up not saving the error message to
 > /var/log/messages etc.
 > 
 > So I think we should change that BUG_ON() into a
 > 
 >         if (WARN_ON_ONCE(nd->inode != parent->d_inode))
 >                 return -ESTALE;

Curiously, the machine wasn't dead after hitting that.
Oh wait, it locks up that one CPU, leaving the others running right ?
That would explain it, it's got a few cores..

 > >  >   [<ffffffff811be75e>] path_lookupat+0x71e/0x740
 > >  >   [<ffffffff811be7b4>] filename_lookup+0x34/0xc0
 > >  >   [<ffffffff811be8f2>] do_path_lookup+0x32/0x40
 > >  >   [<ffffffff811beb7a>] kern_path+0x2a/0x50
 > >  >   [<ffffffff811d569d>] do_mount+0x8d/0xa00
 > >  >   [<ffffffff811d609e>] sys_mount+0x8e/0xe0
 > >  >   [<ffffffff816cd942>] system_call_fastpath+0x16/0x1b
 > 
 > Hmm. Nothing looks all that odd in that trace. Do you have any idea
 > what the path was? This being trinity, I'm assuming you're doing some
 > kind of targeted testing. sysfs or proc, perhaps? Or some particular
 > concurrency test with random system calls/pathnames? Not that I see
 > how it could happen anyway, but maybe it could give some hint about
 > what triggered this.

Basically, see the summary of a bunch of bugs I reported to Greg last night
in sysfs: https://lkml.org/lkml/2013/3/7/21
It sounds like it's just trinity finding old bugs for the first time,
though I've not actually tested yet on an older kernel.

 > Dave, are these BUG_ON's new with current git, or is it perhaps
 > because you've expanded trinity with new patterns to test random
 > arguments for?

I suspect it's the addition of this..
http://git.codemonkey.org.uk/?p=trinity.git;a=commitdiff;h=fd46c22e967a613de73d7e51a9715717d954ec45
Which adds a bunch of negative dentry lookups when it hits a mangled pathname.

It's really hard to figure out exactly what was going on in these crashes
though, as I think they're races, and I don't have a way to figure out
exactly what was happening on other threads at the time of the crash.
Telling trinity to fuzz just 'mount' probably won't reproduce the trace
above for eg, because it's the symptom of whatever else was going on.

Hmm, could make the oopses dump all cpu stacks instead somehow ?.
Perhaps that might be more enlightening for these kinds of bugs.

I'd be surprised if these bugs aren't easily reproducible for anyone
given how easy I seem to be stumbling into them.
You can grab the code at git://github.com/kernelslacker/trinity.git 

Running it with no args will use /proc, /sys and /dev as potential fd's.
You can tell it to just use a specific path/file with '-V /proc' 
I've been running the 'test-random.sh' harness which runs a few instances
to really drive the load up, and get things happening faster, but you
may get (un)lucky with just a single instance.

Also recommended = -q to quieten things, and -l off if logging is
slowing things down too much to cause fun things to trigger.

	Dave


  reply	other threads:[~2013-03-07 19:35 UTC|newest]

Thread overview: 99+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-07  2:16 BUG_ON(nd->inode != parent->d_inode); Dave Jones
2013-03-07 15:30 ` BUG_ON(nd->inode->i_op->follow_link); Dave Jones
2013-03-07 17:30   ` BUG_ON(nd->inode->i_op->follow_link); Linus Torvalds
2013-03-07 19:35     ` Dave Jones [this message]
2013-03-07 20:33       ` BUG_ON(nd->inode->i_op->follow_link); Linus Torvalds
2013-03-07 21:38         ` ipc/testmsg GPF Dave Jones
2013-03-07 21:45           ` Linus Torvalds
2013-03-07 21:49             ` David Miller
2013-03-07 21:51               ` Linus Torvalds
2013-03-07 22:03             ` Dave Jones
2013-03-07 22:36               ` pipe_release oops Dave Jones
2013-03-07 23:14                 ` fasync_remove_entry oops Dave Jones
2013-03-07 23:46                   ` Linus Torvalds
2013-03-07 23:54                     ` Dave Jones
2013-03-08  0:20                       ` Dave Jones
2013-03-08  0:21                 ` pipe_release oops Linus Torvalds
2013-03-08 14:53                   ` Dave Jones
2013-03-08 18:30                     ` Linus Torvalds
2013-03-08 18:26                       ` Jörn Engel
2013-03-10 23:33                         ` Al Viro
2013-03-12 19:09                           ` Jörn Engel
2013-03-10 22:10                       ` Al Viro
2013-03-11  0:35                         ` Al Viro
2013-03-11 15:10                           ` Linus Torvalds
2013-03-11 18:05                             ` Al Viro
2013-03-12 13:06                               ` Al Viro
2013-03-12 15:31                                 ` Linus Torvalds
2013-03-12 19:43                                   ` Al Viro
2013-03-12 19:56                                     ` Dave Jones
2013-03-12 20:09                                     ` Linus Torvalds
2013-03-12 20:51                                       ` Al Viro
2013-03-27 13:51                                       ` Yet another pipe related oops Dave Jones
2013-03-27 15:20                                         ` Al Viro
2013-03-27 16:33                                           ` Linus Torvalds
2013-03-27 16:53                                             ` Raymond Jennings
2013-03-27 17:45                                             ` Al Viro
2013-04-01 20:34                                               ` Al Viro
2013-04-01 21:00                                                 ` Greg Kroah-Hartman
2013-04-01 21:21                                                   ` Al Viro
2013-04-01 21:44                                                     ` Greg Kroah-Hartman
2013-04-01 23:27                                                       ` Al Viro
2013-04-02  0:22                                                         ` Al Viro
2013-04-02  1:55                                                           ` Greg Kroah-Hartman
2013-03-12  1:27                       ` pipe_release oops Dave Jones
2013-03-09  0:27           ` ipc/testmsg GPF Peter Hurley
2013-03-09  0:32             ` Dave Jones
2013-03-11 18:26             ` Dave Jones
2013-03-11 19:03               ` Peter Hurley
2013-03-12 22:02                 ` Andrew Morton
2013-03-12 22:33                   ` Dave Jones
2013-03-15 21:21                   ` Dave Jones
2013-03-25 16:37                 ` Dave Jones
2013-03-25 18:28                   ` Peter Hurley
2013-03-25 18:39                     ` Dave Jones
2013-03-07 22:18         ` BUG_ON(nd->inode->i_op->follow_link); Dave Jones
2013-03-07 22:50           ` BUG_ON(nd->inode->i_op->follow_link); Linus Torvalds
2013-03-07 23:03             ` BUG_ON(nd->inode->i_op->follow_link); Dave Jones
2013-03-07 23:55             ` BUG_ON(nd->inode->i_op->follow_link); Linus Torvalds
2013-03-11  0:02             ` BUG_ON(nd->inode->i_op->follow_link); Al Viro
2013-03-10 23:04   ` BUG_ON(nd->inode->i_op->follow_link); Al Viro
2013-03-12 18:31     ` BUG_ON(nd->inode->i_op->follow_link); Linus Torvalds
2013-03-08 15:04 ` BUG_ON(nd->inode != parent->d_inode); Dave Jones
2013-03-08 18:51   ` Linus Torvalds
2013-03-08 19:18     ` Dave Jones
2013-03-08 19:20       ` Dave Jones
2013-03-08 19:36         ` Dave Jones
2013-03-08 19:47           ` Linus Torvalds
2013-03-08 21:04             ` Dave Jones
2013-03-08 22:41               ` Linus Torvalds
2013-03-08 23:07                 ` Dave Jones
2013-03-08 23:14                   ` Dave Jones
2013-03-08 23:20                   ` Linus Torvalds
2013-03-08 23:28                     ` Linus Torvalds
2013-03-08 23:34                       ` Dave Jones
2013-03-08 23:47                       ` Dave Jones
2013-03-08 23:51                         ` Linus Torvalds
2013-03-08 23:30                     ` Dave Jones
2013-03-08 23:45                       ` Linus Torvalds
2013-03-08 23:55                         ` Dave Jones
2013-03-09  0:02                           ` Linus Torvalds
2013-03-09  0:19                             ` Dave Jones
2013-03-09  0:29                               ` Raymond Jennings
2013-03-09  0:36                               ` Dave Jones
2013-03-09  1:18                                 ` Linus Torvalds
2013-03-09  2:03                                   ` Dave Jones
2013-03-09  2:08                                     ` Linus Torvalds
2013-03-09  2:26                                       ` Dave Jones
2013-03-09  2:56                                         ` Dave Jones
2013-03-09  2:57                                           ` Dave Jones
     [not found]                                             ` <CA+55aFxyOYXnzDoWr7Utr1QLjjMUCON5EGH3FMvGBHxnxMJmQQ@mail.gmail.com>
2013-03-09  3:25                                               ` Dave Jones
2013-03-09  3:38                                                 ` Eric W. Biederman
2013-03-09  4:26                                                   ` Dave Jones
2013-03-09  8:28                                                     ` Eric W. Biederman
     [not found]                                                 ` <CA+55aFweyfew3VU79ZQV4otJcWiF0=xKXxDtADXcccNxGaqMwA@mail.gmail.com>
2013-03-09  3:50                                                   ` Dave Jones
2013-03-09  4:31                                                     ` Linus Torvalds
2013-03-09  4:39                                                       ` Dave Jones
2013-03-09  5:13                                                         ` Sasha Levin
2013-03-09  5:16                                                           ` Dave Jones
2013-03-09  3:27                                             ` Eric W. Biederman

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=20130307193501.GA2802@redhat.com \
    --to=davej@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.