Return-Path: Received: from cn.fujitsu.com ([222.73.24.84]:49326 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1757163Ab0LNIyp (ORCPT ); Tue, 14 Dec 2010 03:54:45 -0500 Message-ID: <4D0731C1.5090100@cn.fujitsu.com> Date: Tue, 14 Dec 2010 16:58:41 +0800 From: Mi Jinlong To: NFSv3 list CC: Trond Myklebust , "J. Bruce Fields" , Jeff Layton , Chuck Lever Subject: kernel panic when mount NFSv4 Content-Type: text/plain; charset=ISO-2022-JP Sender: linux-nfs-owner@vger.kernel.org List-ID: MIME-Version: 1.0 Hi, When testing NFSv4 at RHEL6 with kernel 2.6.32, I got a kernel panic at NFS client's __rpc_create_common function. The panic place is: rpc_mkpipe __rpc_lookup_create() <=== find pipefile *idmap* __rpc_mkpipe() <=== pipefile is *idmap* __rpc_create_common() ****** BUG_ON(!d_unhashed(dentry)); ****** *panic* It means that the dentry's d_flags have be set DCACHE_UNHASHED, but it should not be set here. Is someone known this bug? or give me some idea? A reproduce program is append, but it can't reproduce the bug every time. the export is: "/nfsroot *(rw,no_root_squash,fsid=0,insecure)" And the panic message is append. ============================================================================ #!/bin/sh LOOPTOTAL=768 LOOPCOUNT=0 ret=0 while [ $LOOPCOUNT -ne $LOOPTOTAL ] do ((LOOPCOUNT += 1)) service nfs restart /usr/sbin/rpc.idmapd mount -t nfs4 127.0.0.1:/ /mnt|| return 1; ls -l /var/lib/nfs/rpc_pipefs/nfs/*/ umount /mnt echo $LOOPCOUNT done =============================================================================== Code: af 60 01 00 00 89 fa 89 f0 e8 64 cf 89 f0 e8 5c 7c 64 cf 31 c0 8b 5c 24 10 8b 74 24 14 8b 7c 24 18 8b 6c 24 1c 83 c4 20 c3 <0f> 0b eb fc 8b 46 28 c7 44 24 08 20 de ee f0 c7 44 24 04 56 ea EIP:[] __rpc_create_common+0x8a/0xc0 [sunrpc] SS:ESP 0068:eccb5d28 ---[ end trace 8f5606cd08928ed2]--- Kernel panic - not syncing: Fatal exception Pid:7131, comm: mount.nfs4 Tainted: G D -------------------2.6.32 #1 Call Trace: [] ? panic+0x42/0xed [] ? oops_end+0xbc/0xd0 [] ? do_invalid_op+0x0/0x90 [] ? do_invalid_op+0x7f/0x90 [] ? __rpc_create_common+0x8a/0xc0[sunrpc] [] ? rpc_free_task+0x33/0x70[sunrpc] [] ? prc_call_sync+0x48/0x60[sunrpc] [] ? rpc_ping+0x4e/0x60[sunrpc] [] ? rpc_create+0x38f/0x4f0[sunrpc] [] ? error_code+0x73/0x78 [] ? __rpc_create_common+0x8a/0xc0[sunrpc] [] ? d_lookup+0x2a/0x40 [] ? rpc_mkpipe+0x111/0x1b0[sunrpc] [] ? nfs_create_rpc_client+0xb4/0xf0[nfs] [] ? nfs_fscache_get_client_cookie+0x1d/0x50[nfs] [] ? nfs_idmap_new+0x7b/0x140[nfs] [] ? strlcpy+0x3a/0x60 [] ? nfs4_set_client+0xea/0x2b0[nfs] [] ? nfs4_create_server+0xac/0x1b0[nfs] [] ? krealloc+0x40/0x50 [] ? nfs4_remote_get_sb+0x6b/0x250[nfs] [] ? kstrdup+0x3c/0x60 [] ? vfs_kern_mount+0x69/0x170 [] ? nfs_do_root_mount+0x6c/0xa0[nfs] [] ? nfs4_try_mount+0x37/0xa0[nfs] [] ? nfs4_validate_text_mount_data+-x7d/0xf0[nfs] [] ? nfs4_get_sb+0x92/0x2f0 [] ? vfs_kern_mount+0x69/0x170 [] ? get_fs_type+0x32/0xb0 [] ? do_kern_mount+0x3f/0xe0 [] ? do_mount+0x2ef/0x740 [] ? copy_mount_options+0xb0/0x120 [] ? sys_mount+0x6e/0xa0