Re: Linux 4.10-rc7

From: Dave Jones
Date: Mon Feb 06 2017 - 01:01:29 EST


On Sun, Feb 05, 2017 at 03:41:54PM -0800, Linus Torvalds wrote:
> Hey, look at that - it's all been very quiet, and unless anything bad
> happens, we're all back to the regular schedule with this being the
> last rc.


..

> Christoph Hellwig (1):
> nfsd: special case truncates some more


This one smells funny to me.

[ 145.983182] =============================================
[ 145.983201] [ INFO: possible recursive locking detected ]
[ 145.983220] 4.10.0-rc7+ #1 Not tainted
[ 145.983236] ---------------------------------------------
[ 145.984868] nfsd/865 is trying to acquire lock:
[ 145.986497] (sb_writers#7){.+.+.+}, at: [<ffffffff9b1e0a25>] mnt_want_write+0x25/0x50
[ 145.988153]
but task is already holding lock:
[ 145.991350] (sb_writers#7){.+.+.+}, at: [<ffffffff9b1e0a25>] mnt_want_write+0x25/0x50
[ 145.992931]
other info that might help us debug this:
[ 145.995991] Possible unsafe locking scenario:

[ 145.998936] CPU0
[ 146.000358] ----
[ 146.001749] lock(sb_writers#7);
[ 146.003109] lock(sb_writers#7);
[ 146.004431]
*** DEADLOCK ***

[ 146.008179] May be due to missing lock nesting notation

[ 146.010541] 1 lock held by nfsd/865:
[ 146.011681] #0: (sb_writers#7){.+.+.+}, at: [<ffffffff9b1e0a25>] mnt_want_write+0x25/0x50
[ 146.012820]
stack backtrace:
[ 146.015033] CPU: 0 PID: 865 Comm: nfsd Not tainted 4.10.0-rc7+ #1
[ 146.016147] Call Trace:
[ 146.017225] dump_stack+0x68/0xa0
[ 146.018273] __lock_acquire+0x6ea/0x11d0
[ 146.019251] ? trace_hardirqs_on_caller+0xef/0x1b0
[ 146.020119] lock_acquire+0x109/0x270
[ 146.020957] ? mnt_want_write+0x25/0x50
[ 146.021770] __sb_start_write+0xd8/0x230
[ 146.022555] ? mnt_want_write+0x25/0x50
[ 146.023313] ? nfsd_permission+0x7f/0x110
[ 146.024042] mnt_want_write+0x25/0x50
[ 146.024745] vfs_truncate+0x4e/0x200
[ 146.025421] nfsd_setattr+0x13a/0x300
[ 146.026070] nfsd4_setattr+0x109/0x130
[ 146.026690] nfsd4_proc_compound+0x443/0x6e0
[ 146.027286] nfsd_dispatch+0x91/0x170
[ 146.027853] svc_process+0x6e6/0xa00
[ 146.028393] nfsd+0x193/0x2a0
[ 146.028903] ? nfsd+0x5/0x2a0
[ 146.029448] kthread+0x111/0x150
[ 146.029964] ? nfsd_destroy+0x190/0x190
[ 146.030474] ? __kthread_create_on_node+0x250/0x250
[ 146.030988] ret_from_fork+0x2e/0x40


I'll double check that it's that commit in the morning, but nfs+truncate seems to point
in this direction..

Dave