Bug 88321

Summary: WARNING: CPU: 1 PID: 6784 at fs/dcache.c:1318 umount_check+0x77/0x7b()
Product: File System Reporter: Dwayne Hart (dwayne)
Component: ext4Assignee: fs_ext4 (fs_ext4)
Status: NEW ---    
Severity: high CC: ingvarthorvald, nickkrause, szg00000, tytso
Priority: P1    
Hardware: Intel   
OS: Linux   
Kernel Version: 3.17.1 Subsystem:
Regression: No Bisected commit-id:

Description Dwayne Hart 2014-11-16 17:19:19 UTC
Using a modified 3.17.1 kernel. Please see BUG 86661 (https://bugzilla.kernel.org/show_bug.cgi?id=86661) for the modifications implemented. We recently encountered the following information from the kernel ring buffer:

[Fri Oct 31 19:15:13 2014] WARNING: CPU: 1 PID: 6784 at fs/dcache.c:1318 umount_check+0x77/0x7b()
[Fri Oct 31 19:15:13 2014] Modules linked in:
[Fri Oct 31 19:15:13 2014] CPU: 1 PID: 6784 Comm: umount.nfs4 Not tainted 3.17.1-gentoo20141023m-00002-gbe4fcc3 #2
[Fri Oct 31 19:15:13 2014] Hardware name: System manufacturer System Product Name/P6X58-E PRO, BIOS 0504    07/28/2011
[Fri Oct 31 19:15:13 2014]  0000000000000526 ffff88031c70fcc8 ffffffff81800a85 0000000000000000
[Fri Oct 31 19:15:13 2014]  0000000000000000 ffff88031c70fd08 ffffffff8103c4f3 ffff88031c70fd30
[Fri Oct 31 19:15:13 2014]  ffffffff81125a28 ffff880316e7d010 0000000000015c80 ffff880326786901
[Fri Oct 31 19:15:13 2014] Call Trace:
[Fri Oct 31 19:15:13 2014]  [<ffffffff81800a85>] dump_stack+0x46/0x58
[Fri Oct 31 19:15:13 2014]  [<ffffffff8103c4f3>] warn_slowpath_common+0x7c/0x96
[Fri Oct 31 19:15:13 2014]  [<ffffffff81125a28>] ? umount_check+0x77/0x7b
[Fri Oct 31 19:15:13 2014]  [<ffffffff8103c522>] warn_slowpath_null+0x15/0x17
[Fri Oct 31 19:15:13 2014]  [<ffffffff81125a28>] umount_check+0x77/0x7b
[Fri Oct 31 19:15:13 2014]  [<ffffffff811248c6>] d_walk+0x115/0x2d4
[Fri Oct 31 19:15:13 2014]  [<ffffffff81126484>] ? do_one_tree+0x22/0x36
[Fri Oct 31 19:15:13 2014]  [<ffffffff811259b1>] ? d_instantiate_unique+0x68/0x68
[Fri Oct 31 19:15:13 2014]  [<ffffffff81126484>] do_one_tree+0x22/0x36
[Fri Oct 31 19:15:13 2014]  [<ffffffff8112697d>] shrink_dcache_for_umount+0x59/0x6b
[Fri Oct 31 19:15:13 2014]  [<ffffffff8111537e>] generic_shutdown_super+0x1e/0xed
[Fri Oct 31 19:15:13 2014]  [<ffffffff811154c0>] kill_anon_super+0xe/0x19
[Fri Oct 31 19:15:13 2014]  [<ffffffff8121e439>] nfs_kill_super+0x12/0x1e
[Fri Oct 31 19:15:13 2014]  [<ffffffff81115a02>] deactivate_locked_super+0x36/0x4b
[Fri Oct 31 19:15:13 2014]  [<ffffffff811160f1>] deactivate_super+0x3a/0x3e
[Fri Oct 31 19:15:13 2014]  [<ffffffff8112d0d4>] mntput_no_expire+0x1b0/0x1d2
[Fri Oct 31 19:15:13 2014]  [<ffffffff8112e4b3>] ? SyS_umount+0x395/0x3aa
[Fri Oct 31 19:15:13 2014]  [<ffffffff8112e4b3>] SyS_umount+0x395/0x3aa
[Fri Oct 31 19:15:13 2014]  [<ffffffff81808412>] ? system_call_fastpath+0x16/0x1b
[Fri Oct 31 19:15:13 2014]  [<ffffffff810f072a>] ? vm_munmap+0x4e/0x5e
[Fri Oct 31 19:15:13 2014]  [<ffffffff8112cf24>] ? mnt_get_count+0x53/0x53
[Fri Oct 31 19:15:13 2014]  [<ffffffff81808412>] system_call_fastpath+0x16/0x1b
[Fri Oct 31 19:15:13 2014] ---[ end trace f8d9e04a1786ebb6 ]---
Comment 1 nickkrause 2016-04-02 15:56:20 UTC
In the function nfs_kill_super for the file fs/nfs/super.c from the root of the kernel directory can you add:
nfs_put_client(server->nfs_client)
before:
generic_shutdown_super(s);
and see if that fixes your issue.
Comment 2 Theodore Tso 2016-04-02 17:55:12 UTC
Please note that Nick Krause was banned from the Linux Kernel list because he has a tendency to guess, and while it was one thing to be wasting kernel developers' time, it was quite another when he was giving bad advice to users who were looking for help.

Having looked at the warning issued on line fs/dcache:1318, which is due to a dentry in the file system to be unmounted was still being used.  The nfs_put_client() call has nothing to do with dentries.

If you want to try Nick's suggestion, please feel free.  But it's not likely to fix things, and it might make things worse.
Comment 3 [account disabled by the administrator] 2016-08-20 23:06:37 UTC
See if you can reproduce this on a newer kernel. Seems that this was fixed somewhere as the call to kill_anon_super no longer shows up in nfs_kill_super.