From: Stanislav Kinsbursky <skinsbursky@parallels.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Mark Lord <kernel@teksavvy.com>, <linux-nfs@vger.kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: BUG at net/sunrpc/svc_xprt.c:921
Date: Mon, 21 Jan 2013 12:19:48 +0400 [thread overview]
Message-ID: <50FCFA24.6090109@parallels.com> (raw)
In-Reply-To: <20130118155631.GA5227@fieldses.org>
18.01.2013 19:56, J. Bruce Fields пишет:
> On Fri, Jan 18, 2013 at 10:48:02AM -0500, Mark Lord wrote:
>> On 13-01-18 12:37 AM, Stanislav Kinsbursky wrote:
>>>
>>> You have more than one NFS mount in different network namespaces, haven't you?
>>>
>>
>> No, I don't (knowingly) use (multiple) namespaces at all.
>
> Right, I don't think that's necessary. Stanislav, look at
> nfs_callback_down:
>
> nfs_callback_down_net(minorversion, cb_info->serv, net);
> cb_info->users--;
> if (cb_info->users == 0 && cb_info->task != NULL) {
> kthread_stop(cb_info->task);
> ...
>
> It's first destroying the service, then destroying the thread. That's
> the wrong order. So we could still have the thread running svc_recv()
> after the rpc service is destroyed.
>
Sad, but no, this can't be done that easy in the way you are proposing. Have a look at lock_down_net() - it works in the same manner.
Moreover, service shutdown was significantly reworked to support work across multiple namespaces. We, actually, came to this solution in one of our previous
discussions in the past because we were trying to reduce number of running threads and used memory for such non-heavily used services like lockd and nfs
callback. And existent approach works good enough except in-progress transports.
Now we can't just move shutdown thread after transports because other problems will arise (BUG_ON() in svc_destroy will trigger and that's just the beginning).
I.e. to make it possible to shutdown service before transports, service should be rewritten to work in network namespace context (but not across all namespaces).
> --b.
>
>> Usually I disable them in the kernel .config,
>> though it appears the currently running kernel has this:
>>
>> CONFIG_NAMESPACES=y
>> # CONFIG_UTS_NS is not set
>> # CONFIG_IPC_NS is not set
>> # CONFIG_PID_NS is not set
>> # CONFIG_NET_NS is not set
>>
>> The full .config was attached to the first post in this thread.
>>
>> Cheers
>>
--
Best regards,
Stanislav Kinsbursky
next prev parent reply other threads:[~2013-01-21 8:20 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 16:17 BUG at net/sunrpc/svc_xprt.c:921 Mark Lord
2013-01-14 20:37 ` J. Bruce Fields
2013-01-15 4:16 ` Mark Lord
2013-01-15 20:56 ` J. Bruce Fields
2013-01-16 5:20 ` Stanislav Kinsbursky
2013-01-16 22:51 ` Mark Lord
2013-01-16 22:58 ` Mark Lord
2013-01-17 5:05 ` Stanislav Kinsbursky
2013-01-17 13:03 ` J. Bruce Fields
2013-01-17 13:24 ` Stanislav Kinsbursky
2013-01-17 23:41 ` Mark Lord
2013-01-18 5:37 ` Stanislav Kinsbursky
2013-01-18 15:48 ` Mark Lord
2013-01-18 15:56 ` J. Bruce Fields
2013-01-21 8:19 ` Stanislav Kinsbursky [this message]
2013-01-20 22:51 ` BUG at net/sunrpc/svc_xprt.c:921 (another one) Mark Lord
2013-02-12 20:52 ` J. Bruce Fields
2013-02-13 15:00 ` Mark Lord
2013-02-15 19:22 ` J. Bruce Fields
2013-02-15 19:42 ` Tom Horsley
2013-02-15 19:46 ` J. Bruce Fields
2013-02-15 19:23 ` [PATCH 1/2] svcrpc: make svc_age_temp_xprts enqueue under sv_lock J. Bruce Fields
2013-02-15 19:23 ` [PATCH 2/2] svcrpc: fix rpc server shutdown races J. Bruce Fields
2013-02-15 19:33 ` BUG at net/sunrpc/svc_xprt.c:921 (another one) Paweł Sikora
2013-02-17 15:54 ` J. Bruce Fields
2013-02-18 7:42 ` Paweł Sikora
2013-01-17 13:11 ` BUG at net/sunrpc/svc_xprt.c:921 Mark Lord
2013-01-17 13:53 ` J. Bruce Fields
2013-01-17 23:40 ` Mark Lord
2013-02-25 20:45 ` Mark Lord
2013-02-25 20:52 ` J. Bruce Fields
-- strict thread matches above, loose matches on Subject: below --
2013-02-07 12:56 Tom Horsley
2013-02-08 20:58 ` J. Bruce Fields
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=50FCFA24.6090109@parallels.com \
--to=skinsbursky@parallels.com \
--cc=bfields@fieldses.org \
--cc=kernel@teksavvy.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@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;
as well as URLs for NNTP newsgroup(s).