mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Américo Wang" <xiyou.wangcong@gmail.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
	rusty@rustcorp.com.au, linux-kernel@vger.kernel.org
Subject: Re: hang in call_usermodehelper_exec()
Date: Tue, 23 Feb 2010 14:49:50 +0800	[thread overview]
Message-ID: <2375c9f91002222249w55b2b06cq30b0236fa44b6cb@mail.gmail.com> (raw)
In-Reply-To: <20100222120430.GA10789@hmsreliant.think-freely.org>

On Mon, Feb 22, 2010 at 8:04 PM, Neil Horman <nhorman@tuxdriver.com> wrote:
> On Mon, Feb 22, 2010 at 02:19:28PM +0800, Américo Wang wrote:
>> On Thu, Feb 18, 2010 at 4:22 AM, Alexey Dobriyan <adobriyan@gmail.com> wrote:
>> > I was stress-testing netns stuff in presence of removing modules.
>> >
>> > Kernel is 2.6.33-rc8-next-20100217+:
>> >
>>
>> I don't know if this kernel has Andi's patchset, which is:
>>
>> http://lkml.org/lkml/2010/1/4/506
>>
>> If yes, then please try Neil's patch:
>>
>> http://lkml.org/lkml/2010/2/12/181
>>
>> Thanks.
> No, both Andi's and my usermodehelper changes aren't going in until .34 IIRC,
> but that shouldn't matter, they weren't meant to fix hangs (not that they dont
> :) ).
>
> Looking at this, my guess is that your hang is in userspace, and that you have
> an old version of module-utils.  I fixed this with iptables awhile back.  What
> happens is that process 3737, the modprobe is removing modules, while the setkey
> utility is requesting kernel services that require those modules, so you are in
> fact trying to load and unload the same module(s) in parallel.  While thats not
> a huge deal, it results in the setkey utility forking another copy of modprobe
> (using callusermode_helper).  The two copies of modprobe actually take file
> locks on the module they are workign with, serializing them in user space.  If
> the setkey path and the modprobe path serialize at all in kernel space (by
> taking the module_mutex for instance), you get deadlock.
>
> I fixed this by making modprobe be non-blocking in user space (which is the
> default for insmod as well), and it fixed the problem.  The gory details are
> here:
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=16fcec35e7d7c4faaa4709f6434a4a25b06d25e3
>
> My guess is that if you get the latest module-utils you can make this go away.

I see, excellent! Thank you!

      reply	other threads:[~2010-02-23  6:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-17 20:22 Alexey Dobriyan
2010-02-22  0:23 ` Rusty Russell
2010-02-22  6:19 ` Américo Wang
2010-02-22 12:04   ` Neil Horman
2010-02-23  6:49     ` Américo Wang [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=2375c9f91002222249w55b2b06cq30b0236fa44b6cb@mail.gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=adobriyan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=rusty@rustcorp.com.au \
    /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

all inboxes | Powered by JetHome®