From patchwork Mon Aug 4 10:30:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kinglong Mee X-Patchwork-Id: 4669381 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 587CDC0338 for ; Mon, 4 Aug 2014 10:31:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 94A54201CD for ; Mon, 4 Aug 2014 10:31:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 93FB9200E6 for ; Mon, 4 Aug 2014 10:31:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751852AbaHDKbH (ORCPT ); Mon, 4 Aug 2014 06:31:07 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:39123 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751409AbaHDKbF (ORCPT ); Mon, 4 Aug 2014 06:31:05 -0400 Received: by mail-pa0-f41.google.com with SMTP id rd3so9808399pab.0 for ; Mon, 04 Aug 2014 03:31:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; bh=HnR/2ZB+gwkDP6u/m1SB5zLzhfGNFJMNpelOkpM28uo=; b=swHfLGzCMY2LaEfgaKaz3uapyZsjSWNmSok5kCFnghfUrTyA11ZRLHCFgZOU/uwSyP pE9velmuwOkqT8JGy27UQajnLbq9Mk4lNEBJMrRhlY7de64s6hEJjozX34VFknAw3mo5 kGcv7wOs7w7krd0P7VcnLbL3LcGezH4s+sYLE4vbEU+ktJC4VIapChWsie1fV2N6+EtO dIp3ihoiRmRYKzrHgPC0+eGf7nmmh3Opun143lVOX5n2wWEOLl42X65le9qH29TzT7kh z16NdCjmGc87dGGZ8BmwZZcJd5SphreLs9MnD8GTweNkBqwNdjdMAOJzOyWUiwmRN78R QrDg== X-Received: by 10.66.163.38 with SMTP id yf6mr23334054pab.46.1407148265549; Mon, 04 Aug 2014 03:31:05 -0700 (PDT) Received: from [192.168.0.100] ([110.190.119.243]) by mx.google.com with ESMTPSA id j6sm26095694pdr.9.2014.08.04.03.30.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Aug 2014 03:31:04 -0700 (PDT) Message-ID: <53DF60DA.9000100@gmail.com> Date: Mon, 04 Aug 2014 18:30:50 +0800 From: Kinglong Mee User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Trond Myklebust CC: "J. Bruce Fields" , Linux NFS Mailing List , kinglongmee@gmail.com Subject: [PATCH] SUNRPC: Change WARN_ON to printk for error message Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When testing nfs4.0 lock, I get WARN_ON message as below, [ 278.733391] ------------[ cut here ]------------ [ 278.734496] WARNING: CPU: 0 PID: 263 at /root/linux-nfs/net/sunrpc/sched.c:692 rpc_exit_task+0x85/0x90 [sunrpc]() [ 278.736771] Modules linked in: nfsv4(OE) nfs(OE) nfsd(E) bnep bluetooth ip6t_rpfilter ip6t_REJECT xt_conntrack cfg80211 rfkill ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw btrfs ppdev xfs microcode xor serio_raw libcrc32c pcspkr raid6_pq e1000 parport_pc parport i2c_piix4 i2c_core auth_rpcgss nfs_acl lockd sunrpc(OE) ata_generic pata_acpi [last unloaded: nfsd] [ 278.751462] CPU: 0 PID: 263 Comm: kworker/0:4 Tainted: G OE 3.16.0-rc2+ #28 [ 278.753364] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/31/2013 [ 278.755710] Workqueue: rpciod rpc_async_schedule [sunrpc] [ 278.757112] 0000000000000000 00000000f6173352 ffff880072e5fd30 ffffffff816eacfa [ 278.758811] 0000000000000000 ffff880072e5fd68 ffffffff8108bf3d ffff88005997f180 [ 278.760527] ffff88003ae44830 ffffffffa001a860 ffffffffa001a860 0000000000000000 [ 278.762271] Call Trace: [ 278.762802] [] dump_stack+0x45/0x56 [ 278.763906] [] warn_slowpath_common+0x7d/0xa0 [ 278.765419] [] ? rpc_destroy_wait_queue+0x20/0x20 [sunrpc] [ 278.767243] [] ? rpc_destroy_wait_queue+0x20/0x20 [sunrpc] [ 278.768758] [] warn_slowpath_null+0x1a/0x20 [ 278.770080] [] rpc_exit_task+0x85/0x90 [sunrpc] [ 278.771439] [] __rpc_execute+0x94/0x420 [sunrpc] [ 278.772829] [] rpc_async_schedule+0x26/0x30 [sunrpc] [ 278.774276] [] process_one_work+0x175/0x430 [ 278.775573] [] worker_thread+0x11d/0x530 [ 278.776824] [] ? rescuer_thread+0x300/0x300 [ 278.778069] [] kthread+0xd8/0xf0 [ 278.779114] [] ? insert_kthread_work+0x40/0x40 [ 278.780448] [] ret_from_fork+0x7c/0xb0 [ 278.781621] [] ? insert_kthread_work+0x40/0x40 [ 278.782972] ---[ end trace 3350394592832e42 ]--- task1: --> call_decode --> rpc_exit_task (-10011) --> nfs4_release_lockowner_done --> rpc_restart_call_prepare task->tk_action = call_start; task2: --> rpc_shutdown_client --> rpc_killall_tasks rovr->tk_flags |= RPC_TASK_KILLED; (set task1 to KILLED) task1: --> rpc_exit_task WARN_ON(RPC_ASSASSINATED(task)); Signed-off-by: Kinglong Mee --- net/sunrpc/sched.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index c0365c1..ed0f8e5 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c @@ -689,7 +689,9 @@ void rpc_exit_task(struct rpc_task *task) if (task->tk_ops->rpc_call_done != NULL) { task->tk_ops->rpc_call_done(task, task->tk_calldata); if (task->tk_action != NULL) { - WARN_ON(RPC_ASSASSINATED(task)); + if (RPC_ASSASSINATED(task)) + printk(KERN_ERR "RPC: dead task tried to" + " walk away.\n"); /* Always release the RPC slot and buffer memory */ xprt_release(task); rpc_reset_task_statistics(task);