[LU-4403] ASSERTION( lock->l_readers > 0 ) Created: 20/Dec/13  Updated: 04/Aug/14  Resolved: 08/Feb/14

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.4.1
Fix Version/s: Lustre 2.6.0, Lustre 2.5.2

Type: Bug Priority: Major
Reporter: Mahmoud Hanafi Assignee: Jinshan Xiong (Inactive)
Resolution: Fixed Votes: 0
Labels: llnl, mn4

Attachments: Text File mds.log     File mdt_thread_info.dump    
Severity: 3
Rank (Obsolete): 12085

 Description   

<0>LustreError: 5766:0:(ldlm_lock.c:851:ldlm_lock_decref_internal_nolock()) ASSERTION( lock->l_readers > 0 ) failed: ^M
<0>LustreError: 5766:0:(ldlm_lock.c:851:ldlm_lock_decref_internal_nolock()) LBUG^M
<4>Pid: 5766, comm: mdt00_020^M
<4>^M
<4>Call Trace:^M
<4> [<ffffffffa0414895>] libcfs_debug_dumpstack+0x55/0x80 [libcfs]^M
<4> [<ffffffffa0414e97>] lbug_with_loc+0x47/0xb0 [libcfs]^M
<4> [<ffffffffa06b03b2>] ldlm_lock_decref_internal_nolock+0xd2/0x180 [ptlrpc]^M
<4> [<ffffffffa06b4aad>] ldlm_lock_decref_internal+0x4d/0xaa0 [ptlrpc]^M
<4> [<ffffffffa054a315>] ? class_handle2object+0x95/0x190 [obdclass]^M
<4> [<ffffffffa06b5f69>] ldlm_lock_decref+0x39/0x90 [ptlrpc]^M
<4> [<ffffffffa0dd74a3>] mdt_save_lock+0x63/0x300 [mdt]^M
<4> [<ffffffffa06fd900>] ? lustre_swab_ldlm_reply+0x0/0x40 [ptlrpc]^M
<4> [<ffffffffa0dd779c>] mdt_object_unlock+0x5c/0x160 [mdt]^M
<4> [<ffffffffa0e05a4c>] mdt_object_open_unlock+0xac/0x110 [mdt]^M
<4> [<ffffffffa0e0c9b4>] mdt_reint_open+0xdd4/0x20e0 [mdt]^M
<4> [<ffffffffa0e0e34c>] mdt_reconstruct_open+0x68c/0xc30 [mdt]^M
<4> [<ffffffffa07226a6>] ? __req_capsule_get+0x166/0x700 [ptlrpc]^M
<4> [<ffffffffa06fb1ae>] ? lustre_pack_reply_flags+0xae/0x1f0 [ptlrpc]^M
<4> [<ffffffffa0e01195>] mdt_reconstruct+0x45/0x120 [mdt]^M
<4> [<ffffffffa0ddccfb>] mdt_reint_internal+0x6bb/0x780 [mdt]^M
<4> [<ffffffffa0ddd08d>] mdt_intent_reint+0x1ed/0x520 [mdt]^M
<4> [<ffffffffa0ddaf3e>] mdt_intent_policy+0x39e/0x720 [mdt]^M
<4> [<ffffffffa06b27e1>] ldlm_lock_enqueue+0x361/0x8d0 [ptlrpc]^M
<4> [<ffffffffa06d924f>] ldlm_handle_enqueue0+0x4ef/0x10b0 [ptlrpc]^M
<4> [<ffffffffa0ddb3c6>] mdt_enqueue+0x46/0xe0 [mdt]^M
<4> [<ffffffffa0de1ab7>] mdt_handle_common+0x647/0x16d0 [mdt]^M
<4> [<ffffffffa0e1b2b5>] mds_regular_handle+0x15/0x20 [mdt]^M
<4> [<ffffffffa070b428>] ptlrpc_server_handle_request+0x398/0xc60 [ptlrpc]^M
<4> [<ffffffffa04155de>] ? cfs_timer_arm+0xe/0x10 [libcfs]^M
<4> [<ffffffffa0426dbf>] ? lc_watchdog_touch+0x6f/0x170 [libcfs]^M
<4> [<ffffffffa0702789>] ? ptlrpc_wait_event+0xa9/0x290 [ptlrpc]^M
<4> [<ffffffff810557f3>] ? __wake_up+0x53/0x70^M
<4> [<ffffffffa070c7be>] ptlrpc_main+0xace/0x1700 [ptlrpc]^M
<4> [<ffffffffa070bcf0>] ? ptlrpc_main+0x0/0x1700 [ptlrpc]^M
<4> [<ffffffff8100c0ca>] child_rip+0xa/0x20^M
<4> [<ffffffffa070bcf0>] ? ptlrpc_main+0x0/0x1700 [ptlrpc]^M
<4> [<ffffffffa070bcf0>] ? ptlrpc_main+0x0/0x1700 [ptlrpc]^M
<4> [<ffffffff8100c0c0>] ? child_rip+0x0/0x20^M
<4>^M



 Comments   
Comment by Peter Jones [ 20/Dec/13 ]

Mike

Do you think that this might be related to LU-4135?

Peter

Comment by Di Wang [ 20/Dec/13 ]

IMHO, the fix in LU-4135 only fix the problem in master, which does not exist in b2_4. So this should be different issue, I will take a look now.

Comment by Di Wang [ 20/Dec/13 ]

It seems this is caused by the race between mdt_intent_fixup_resend and mdt_object_unlock, i.e. mdt_intent_fixup_resend might return a released lock here. Here is the patch http://review.whamcloud.com/8642

Comment by Mikhail Pershin [ 21/Dec/13 ]

Thanks Di!

Comment by Di Wang [ 31/Dec/13 ]

http://review.whamcloud.com/8680 patch for master.

Comment by Jay Lan (Inactive) [ 01/Jan/14 ]

We just hit the same problem half an hour ago. The MDS runs the lustre server with patch #8642 included.

Comment by Peter Jones [ 01/Jan/14 ]

Jay

How long has the patch been applied? Is it possible to ascertain yet whether the frequency of occurrence has been altered since it was applied?

Peter

Comment by Di Wang [ 01/Jan/14 ]

Jay,

Same stack trace? If not, please post here. Are there any other console error messages?

WangDi

Comment by Mahmoud Hanafi [ 01/Jan/14 ]

Here is the stack trace.

bp7-mds1 login: Lustre: MGS: haven't heard from client fd1923ac-e3da-a3a1-46c2-d0613e7a86a3 (at 10.151.0.150@o2ib) in 227 seconds. I think it's dead, and I am evicting it. exp ffff880696019800, cur 1388538333 expire 1388538183 last 1388538106^M
Lustre: Skipped 6 previous similar messages^M
CONSOLE MARK 201312311730
[-- MARK -- Tue Dec 31 18:00:00 2013]^M
CONSOLE MARK 201312311830
[-- MARK -- Tue Dec 31 19:00:00 2013]^M
LustreError: 5827:0:(ldlm_lock.c:851:ldlm_lock_decref_internal_nolock()) ASSERTION( lock->l_readers > 0 ) failed: ^M
LustreError: 5827:0:(ldlm_lock.c:851:ldlm_lock_decref_internal_nolock()) LBUG^M
Pid: 5827, comm: mdt01_041^M
^M
Call Trace:^M
[<ffffffffa0414895>] libcfs_debug_dumpstack+0x55/0x80 [libcfs]^M
[<ffffffffa0414e97>] lbug_with_loc+0x47/0xb0 [libcfs]^M
[<ffffffffa06b03b2>] ldlm_lock_decref_internal_nolock+0xd2/0x180 [ptlrpc]^M
[<ffffffffa06b4aad>] ldlm_lock_decref_internal+0x4d/0xaa0 [ptlrpc]^M
[<ffffffffa054a315>] ? class_handle2object+0x95/0x190 [obdclass]^M
[<ffffffffa06b5f69>] ldlm_lock_decref+0x39/0x90 [ptlrpc]^M
[<ffffffffa0dd74a3>] mdt_save_lock+0x63/0x300 [mdt]^M
[<ffffffffa06fd900>] ? lustre_swab_ldlm_reply+0x0/0x40 [ptlrpc]^M
[<ffffffffa0dd779c>] mdt_object_unlock+0x5c/0x160 [mdt]^M
[<ffffffffa0e05a5c>] mdt_object_open_unlock+0xac/0x110 [mdt]^M
[<ffffffffa0e0c9c4>] mdt_reint_open+0xdd4/0x20e0 [mdt]^M
[<ffffffffa0e0e35c>] mdt_reconstruct_open+0x68c/0xc30 [mdt]^M
[<ffffffffa07226a6>] ? __req_capsule_get+0x166/0x700 [ptlrpc]^M
[<ffffffffa06fb1ae>] ? lustre_pack_reply_flags+0xae/0x1f0 [ptlrpc]^M
[<ffffffffa0e011a5>] mdt_reconstruct+0x45/0x120 [mdt]^M
[<ffffffffa0ddcd0b>] mdt_reint_internal+0x6bb/0x780 [mdt]^M
[<ffffffffa0ddd09d>] mdt_intent_reint+0x1ed/0x520 [mdt]^M
[<ffffffffa0ddaf4e>] mdt_intent_policy+0x39e/0x720 [mdt]^M
[<ffffffffa06b27e1>] ldlm_lock_enqueue+0x361/0x8d0 [ptlrpc]^M
^M
Entering kdb (current=0xffff88067f709540, pid 5827) on processor 12 Oops: (null)^M

Comment by Mahmoud Hanafi [ 01/Jan/14 ]

One thing to note: when the MDS hits this lbug several OSS will crash here is their bt.
crash> bt
PID: 12506 TASK: ffff880efef7b540 CPU: 11 COMMAND: "ll_ost_io03_077"
#0 [ffff880efef7d150] machine_kexec at ffffffff81035d2b
#1 [ffff880efef7d1b0] crash_kexec at ffffffff810c0412
#2 [ffff880efef7d280] kdb_kdump_check at ffffffff81285507
#3 [ffff880efef7d290] kdb_main_loop at ffffffff812886f7
#4 [ffff880efef7d3a0] kdb_save_running at ffffffff8128285e
#5 [ffff880efef7d3b0] kdba_main_loop at ffffffff81463518
#6 [ffff880efef7d3f0] kdb at ffffffff812859f6
#7 [ffff880efef7d460] kdba_entry at ffffffff81462e37
#8 [ffff880efef7d470] notifier_call_chain at ffffffff81544b85
#9 [ffff880efef7d4b0] atomic_notifier_call_chain at ffffffff81544bea
#10 [ffff880efef7d4c0] notify_die at ffffffff8109c15e
#11 [ffff880efef7d4f0] __die at ffffffff81542a52
#12 [ffff880efef7d520] die at ffffffff8100f288
#13 [ffff880efef7d550] do_general_protection at ffffffff81542632
#14 [ffff880efef7d580] general_protection at ffffffff81541dc5
[exception RIP: lqe64_hash_keycmp+12]
RIP: ffffffffa0bf8f2c RSP: ffff880efef7d630 RFLAGS: 00010206
RAX: 000000000000114b RBX: ffff880fd044f680 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 5a5a5a5a5a5a5a5a RDI: ffff880f11a5ef60
RBP: ffff880efef7d630 R8: 0000000000000003 R9: 0000000000000001
R10: 0000000000000001 R11: 0000000000000000 R12: ffff880efef7d6c0
R13: ffff880f11a5ef60 R14: 0000000000000000 R15: 5a5a5a5a5a5a5a5a
ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018
#15 [ffff880efef7d638] cfs_hash_bd_lookup_intent at ffffffffa04269e5 [libcfs]
#16 [ffff880efef7d688] cfs_hash_dual_bd_lookup_locked at ffffffffa0426b67 [libcfs]
#17 [ffff880efef7d6b8] cfs_hash_lookup at ffffffffa0427da4 [libcfs]
#18 [ffff880efef7d708] lqe_locate at ffffffffa0bf94f7 [lquota]
#19 [ffff880efef7d748] qsd_op_begin at ffffffffa0c0c2bf [lquota]
#20 [ffff880efef7d7e8] osd_declare_qid at ffffffffa0d0ac76 [osd_ldiskfs]
#21 [ffff880efef7d848] osd_declare_inode_qid at ffffffffa0d0b03e [osd_ldiskfs]
#22 [ffff880efef7d8a8] osd_declare_write_commit at ffffffffa0cfc3d1 [osd_ldiskfs]
#23 [ffff880efef7d948] ofd_commitrw_write at ffffffffa0dc1a93 [ofd]
#24 [ffff880efef7d9d8] ofd_commitrw at ffffffffa0dc4abd [ofd]
#25 [ffff880efef7da68] obd_commitrw at ffffffffa0d791d8 [ost]
#26 [ffff880efef7dae8] ost_brw_write at ffffffffa0d831d1 [ost]
#27 [ffff880efef7dc78] ost_handle at ffffffffa0d8942b [ost]
#28 [ffff880efef7ddb8] ptlrpc_server_handle_request at ffffffffa0707428 [ptlrpc]
#29 [ffff880efef7deb8] ptlrpc_main at ffffffffa07087be [ptlrpc]
#30 [ffff880efef7df48] kernel_thread at ffffffff8100c0ca

Comment by Di Wang [ 01/Jan/14 ]

hmm, I think this OSS crash is a different issue, you probably need open a new ticket for this.

Comment by Di Wang [ 01/Jan/14 ]

Hmm, Does your lustre version includes the fix from LU-4179

  LU-4179 mdt: skip open lock enqueue during resent

    Skip open lock enqueue, if the open lock has been
    acquired(mdt_intent_fixup_resent) during resent.

    Signed-off-by: wang di <di.wang@intel.com>
    Change-Id: I625ca438e28520416ee2af884d0a9f9e6f21cf2e
    Reviewed-on: http://review.whamcloud.com/8173
    Tested-by: Jenkins
    Tested-by: Maloo <hpdd-maloo@intel.com>
    Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>

and

    LU-3273 mdt: Hold med_open_lock before walking med_open_head
    
    Fixed a bug where during replay mdt_mfd_open() calls mdt_handle2mfd()
    without acquiring the med_open_lock.
    We now take the med_open_lock before traversing med_open_head list.
    This bug was noticed during the analysis of LU-3233.
    
    Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
    Change-Id: Ib879f65d41d35f266897e8961dac78e6c4f0d9ec
    Reviewed-on: http://review.whamcloud.com/7272
    Tested-by: Hudson
    Tested-by: Maloo <whamcloud.maloo@gmail.com>
    Reviewed-by: John L. Hammond <john.hammond@intel.com>
    Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>

Thanks.

Comment by Jay Lan (Inactive) [ 01/Jan/14 ]

Peter, the patch was installed Saturday 12/28 afternoon. I do not know how frequent it crashed before. Mahmoud would know better.

Di, the source is at https://github.com/jlan/lustre-nas/commits/nas-2.4.0-1.
The relevant branch is nas-2.4.0-1. The build included commits up to LU-4403.

We do have LU-4179, but not LU-3273.

Comment by Di Wang [ 02/Jan/14 ]

Mahmoud, Could you please trace to the source code which line this "[<ffffffffa0e05a5c>] mdt_object_open_unlock+0xac/0x110 [mdt]" refers to?

Comment by Mahmoud Hanafi [ 02/Jan/14 ]

FILE: mdt_open.c
int mdt_reint_open(struct mdt_thread_info *info, struct mdt_lock_handle *lhc)
{
.
.
out_child:
mdt_object_open_unlock(info, child, lhc, ibits, result); <+++++++++++++++++++++++++++++++ THIS LINE 1733
mdt_object_put(info->mti_env, child);
out_parent:
mdt_object_unlock_put(info, parent, lh, result || !created);
out:
if (result)
lustre_msg_set_transno(req->rq_repmsg, 0);
return result;
}

crash> bt -l
PID: 5707 TASK: ffff880824046080 CPU: 16 COMMAND: "mdt00_005"
#0 [ffff88068a5a74c8] machine_kexec at ffffffff81035d2b
/usr/src/debug/kernel-lustre240-2.6.32-358.6.2.el6/linux-2.6.32-358.6.2.el6.20130607.x86_64/arch/x86/kernel/machine_kexec_64.c: 336
#1 [ffff88068a5a7528] crash_kexec at ffffffff810c0412
/usr/src/debug/kernel-lustre240-2.6.32-358.6.2.el6/linux-2.6.32-358.6.2.el6.20130607.x86_64/kernel/kexec.c: 1121
#2 [ffff88068a5a75f8] kdb_kdump_check at ffffffff81285507
/usr/src/debug/kernel-lustre240-2.6.32-358.6.2.el6/linux-2.6.32-358.6.2.el6.20130607.x86_64/kdb/kdbmain.c: 1214
#3 [ffff88068a5a7608] kdb_main_loop at ffffffff812886f7
/usr/src/debug/kernel-lustre240-2.6.32-358.6.2.el6/linux-2.6.32-358.6.2.el6.20130607.x86_64/kdb/kdbmain.c: 1322
#4 [ffff88068a5a7718] kdb_save_running at ffffffff8128285e
/usr/src/debug/kernel-lustre240-2.6.32-358.6.2.el6/linux-2.6.32-358.6.2.el6.20130607.x86_64/kdb/kdbsupport.c: 798
#5 [ffff88068a5a7728] kdba_main_loop at ffffffff81463518
/usr/src/debug/kernel-lustre240-2.6.32-358.6.2.el6/linux-2.6.32-358.6.2.el6.20130607.x86_64/arch/x86/kdb/kdba_support.c: 980
#6 [ffff88068a5a7768] kdb at ffffffff812859f6
/usr/src/debug/kernel-lustre240-2.6.32-358.6.2.el6/linux-2.6.32-358.6.2.el6.20130607.x86_64/kdb/kdbmain.c: 2165
#7 [ffff88068a5a77d8] panic at ffffffff8153e8fb
/usr/src/debug/kernel-lustre240-2.6.32-358.6.2.el6/linux-2.6.32-358.6.2.el6.20130607.x86_64/kernel/panic.c: 117
#8 [ffff88068a5a7858] lbug_with_loc at ffffffffa0414eeb [libcfs]
#9 [ffff88068a5a7878] ldlm_lock_decref_internal_nolock at ffffffffa06b03b2 [ptlrpc]
#10 [ffff88068a5a7898] ldlm_lock_decref_internal at ffffffffa06b4aad [ptlrpc]
#11 [ffff88068a5a78f8] ldlm_lock_decref at ffffffffa06b5f69 [ptlrpc]
#12 [ffff88068a5a7928] mdt_save_lock at ffffffffa0c6d4a3 [mdt]
/usr/src/debug/lustre-2.4.0/lustre/mdt/mdt_handler.c: 2711
#13 [ffff88068a5a7978] mdt_object_unlock at ffffffffa0c6d79c [mdt]
/usr/src/debug/lustre-2.4.0/lustre/mdt/mdt_handler.c: 2737
#14 [ffff88068a5a79a8] mdt_object_open_unlock at ffffffffa0c9ba5c [mdt]
/usr/src/debug/lustre-2.4.0/lustre/mdt/mdt_open.c: 1270
#15 [ffff88068a5a79f8] mdt_reint_open at ffffffffa0ca29c4 [mdt]
/usr/src/debug/lustre-2.4.0/lustre/mdt/mdt_open.c: 1734
#16 [ffff88068a5a7ae8] mdt_reconstruct_open at ffffffffa0ca435c [mdt]
/usr/src/debug/lustre-2.4.0/libcfs/include/libcfs/libcfs_debug.h: 211
#17 [ffff88068a5a7b78] mdt_reconstruct at ffffffffa0c971a5 [mdt]
/usr/src/debug/lustre-2.4.0/libcfs/include/libcfs/libcfs_debug.h: 211
#18 [ffff88068a5a7b98] mdt_reint_internal at ffffffffa0c72d0b [mdt]
/usr/src/debug/lustre-2.4.0/libcfs/include/libcfs/libcfs_debug.h: 211
#19 [ffff88068a5a7bd8] mdt_intent_reint at ffffffffa0c7309d [mdt]
/usr/src/debug/lustre-2.4.0/lustre/mdt/mdt_handler.c: 3828
#20 [ffff88068a5a7c28] mdt_intent_policy at ffffffffa0c70f4e [mdt]
/usr/src/debug/lustre-2.4.0/libcfs/include/libcfs/libcfs_debug.h: 211
#21 [ffff88068a5a7c68] ldlm_lock_enqueue at ffffffffa06b27e1 [ptlrpc]
#22 [ffff88068a5a7cc8] ldlm_handle_enqueue0 at ffffffffa06d924f [ptlrpc]
#23 [ffff88068a5a7d38] mdt_enqueue at ffffffffa0c713d6 [mdt]
/usr/src/debug/lustre-2.4.0/lustre/mdt/mdt_handler.c: 2283
#24 [ffff88068a5a7d58] mdt_handle_common at ffffffffa0c78787 [mdt]
/usr/src/debug/lustre-2.4.0/lustre/mdt/mdt_handler.c: 3040
#25 [ffff88068a5a7da8] mds_regular_handle at ffffffffa0cb12c5 [mdt]
/usr/src/debug/lustre-2.4.0/lustre/mdt/out_handler.c: 1031
#26 [ffff88068a5a7db8] ptlrpc_server_handle_request at ffffffffa070b428 [ptlrpc]
#27 [ffff88068a5a7eb8] ptlrpc_main at ffffffffa070c7be [ptlrpc]
#28 [ffff88068a5a7f48] kernel_thread at ffffffff8100c0ca
/usr/src/debug////////kernel-lustre240-2.6.32-358.6.2.el6/linux-2.6.32-358.6.2.el6.20130607.x86_64/arch/x86/kernel/entry_64.S: 1213

Comment by Di Wang [ 02/Jan/14 ]

Thanks! Mahmoud. It seems in 2.4, MDS will enqueue the open lock anyway, and if the client does not require the open lock, MDT will release the lock later. It is different as b2_1, which only enqueue the open lock if the client requires it. (probably brought in by layout lock patch?). Anyway, this change will add some "local" open lock to the export hash list, which will trigger this problem. I will post a patch soon.

Comment by Di Wang [ 02/Jan/14 ]

Ok, I just updated the patch.

b2_4 http://review.whamcloud.com/8642
master http://review.whamcloud.com/8680

Comment by Jay Lan (Inactive) [ 03/Jan/14 ]

Di, is LU-3273 related to this problem?

Comment by Di Wang [ 03/Jan/14 ]

Jay, probably no, the patch here should be enough for this problem. Btw: Did you create a new ticket for the crash you find on OSS?

Comment by Mahmoud Hanafi [ 06/Jan/14 ]

We installed the latest version of the patch. It still crashed 2 times after the update. We now know what is causing this. A user is using hdf5 to do parallel writes to 1 file from ~2000 process. I am working on getting a reproducer.

The new crashes were exactly the same.

Comment by Di Wang [ 07/Jan/14 ]

Interesting. Hmm, if you can reproduce this on a test system and collecting some debug log when crash happened, it would be very helpful. Thanks.

Comment by Mahmoud Hanafi [ 07/Jan/14 ]

Which debug log would you like for me to collect. Since the system drops to kdb as soon as we hit the LBUG we need a way to collect those logs.

Comment by Di Wang [ 07/Jan/14 ]

You can disable panic_on_lbug on MDS (lctl set_param panic_on_lbug=0), then if LBUG happens, the system will dump the debug log somewhere automatically (you can see this in console message). And also if you can set debug level to -1 (lctl set_param debug=-1) and debug size to 20 (lctl set_param debug_size=30) on MDS, that would make sure the debug log include enough information we need during LBUG, but this parameter changes(debug and debug_size) will slow down your system, please be aware of this.

Comment by Jinshan Xiong (Inactive) [ 07/Jan/14 ]

Hi Mahmoud,

will you please tell me what's the tip of your branch in your comment at:

"Mahmoud Hanafi added a comment - 02/Jan/14 9:05 AM"

Jinshan

Comment by Jinshan Xiong (Inactive) [ 07/Jan/14 ]

Just a quick update, will you try the patch below to see if I have some good luck here:

[jinxiong@intel nasa]$ git diff
diff --git a/lustre/mdt/mdt_open.c b/lustre/mdt/mdt_open.c
index 545507f..f2a23ee 100644
--- a/lustre/mdt/mdt_open.c
+++ b/lustre/mdt/mdt_open.c
@@ -1437,7 +1437,7 @@ int mdt_reint_open(struct mdt_thread_info *info, struct mdt_lock_handle *lhc)
         struct lu_fid           *child_fid = &info->mti_tmp_fid1;
         struct md_attr          *ma = &info->mti_attr;
         __u64                    create_flags = info->mti_spec.sp_cr_flags;
-       __u64                    ibits;
+       __u64                    ibits = 0;
         struct mdt_reint_record *rr = &info->mti_rr;
         struct lu_name          *lname;
         int                      result, rc;
Comment by Jinshan Xiong (Inactive) [ 07/Jan/14 ]

obviously ibits is not initialized in this case and it caused the lock in @lhc is dropped which we don't hold any references.

Comment by Di Wang [ 08/Jan/14 ]

Ah, good catch. Jinshan. Really missed this.

Comment by Mahmoud Hanafi [ 08/Jan/14 ]

I have attached mdt_thread_info structure from the dump. It may help...

Comment by Di Wang [ 08/Jan/14 ]

Mahmoud: please try the update patch http://review.whamcloud.com/#/c/8642/

Comment by Jinshan Xiong (Inactive) [ 08/Jan/14 ]

patch http://review.whamcloud.com/6511 already fixed this problem. Worth trying this alone if you guys have a chance.

Comment by Jinshan Xiong (Inactive) [ 14/Jan/14 ]

drop the priority as there is no response from customer meanwhile I believe we've found the root cause of this issue.

Comment by Jay Lan (Inactive) [ 14/Jan/14 ]

We had #8642 patch set 5 installed on Jan 8th. Yesterday morning the mds crashed (patch set 4) and booted up with patch set 5.

Today early morning the mds crashed again; however, it was caused by another bug in OSS and the OSS crash brought down the mds. So, we have patch set 5 running for > 1 day without hitting this problem. We will let it soak more time.

Comment by Jinshan Xiong (Inactive) [ 15/Jan/14 ]

thanks for the update Jay and good luck with patch set 5.

Comment by Mahmoud Hanafi [ 28/Jan/14 ]

Patch set 5 didn't fix the issue. We just hit this bug again.

LustreError: 45299:0:(ldlm_lock.c:851:ldlm_lock_decref_internal_nolock()) ASSERTION( lock->l_readers > 0 ) failed:
LustreError: 45299:0:(ldlm_lock.c:851:ldlm_lock_decref_internal_nolock()) LBUG
Pid: 45299, comm: mdt02_087

PID: 20719 TASK: ffff880368864aa0 CPU: 24 COMMAND: "mdt01_059"
#0 [ffff88036c5394c8] machine_kexec at ffffffff81035e8b
#1 [ffff88036c539528] crash_kexec at ffffffff810c0492
#2 [ffff88036c5395f8] kdb_kdump_check at ffffffff812858d7
#3 [ffff88036c539608] kdb_main_loop at ffffffff81288ac7
#4 [ffff88036c539718] kdb_save_running at ffffffff81282c2e
#5 [ffff88036c539728] kdba_main_loop at ffffffff81463988
#6 [ffff88036c539768] kdb at ffffffff81285dc6
#7 [ffff88036c5397d8] panic at ffffffff8153efbf
#8 [ffff88036c539858] lbug_with_loc at ffffffffa045deeb [libcfs]
#9 [ffff88036c539878] ldlm_lock_decref_internal_nolock at ffffffffa0706402 [ptlrpc]
#10 [ffff88036c539898] ldlm_lock_decref_internal at ffffffffa070aafd [ptlrpc]
#11 [ffff88036c5398f8] ldlm_lock_decref at ffffffffa070bfb9 [ptlrpc]
#12 [ffff88036c539928] mdt_save_lock at ffffffffa0e3c483 [mdt]
#13 [ffff88036c539978] mdt_object_unlock at ffffffffa0e3c77c [mdt]
#14 [ffff88036c5399a8] mdt_object_open_unlock at ffffffffa0e6acfc [mdt]
#15 [ffff88036c5399f8] mdt_reint_open at ffffffffa0e71d14 [mdt]
#16 [ffff88036c539ae8] mdt_reconstruct_open at ffffffffa0e736ac [mdt]
#17 [ffff88036c539b78] mdt_reconstruct at ffffffffa0e66445 [mdt]
#18 [ffff88036c539b98] mdt_reint_internal at ffffffffa0e41cfb [mdt]
#19 [ffff88036c539bd8] mdt_intent_reint at ffffffffa0e42090 [mdt]
#20 [ffff88036c539c28] mdt_intent_policy at ffffffffa0e3ff3e [mdt]
#21 [ffff88036c539c68] ldlm_lock_enqueue at ffffffffa0708831 [ptlrpc]
#22 [ffff88036c539cc8] ldlm_handle_enqueue0 at ffffffffa072f1ef [ptlrpc]
#23 [ffff88036c539d38] mdt_enqueue at ffffffffa0e403c6 [mdt]
#24 [ffff88036c539d58] mdt_handle_common at ffffffffa0e46ad7 [mdt]
#25 [ffff88036c539da8] mds_regular_handle at ffffffffa0e80615 [mdt]
#26 [ffff88036c539db8] ptlrpc_server_handle_request at ffffffffa07613c8 [ptlrpc]
#27 [ffff88036c539eb8] ptlrpc_main at ffffffffa076275e [ptlrpc]
#28 [ffff88036c539f48] kernel_thread at ffffffff8100c0ca

Comment by Jinshan Xiong (Inactive) [ 28/Jan/14 ]

Can you share me the following info:
1. Comparing to the previous patches, did it last longer after applying patch set 5?
2. what's the tip of the source tree you're running?

Jinshan

Comment by Jay Lan (Inactive) [ 28/Jan/14 ]

My bad. The patch set #5 was in my nas-2.4.0-1 branch, but not
in nas-2.4.1 branch. It was an earlier patch in nas-2.4.1 branch.

We just upgraded our server to 2.4.1 yesterday.

Comment by Peter Jones [ 08/Feb/14 ]

Patch landed for 2.6

Comment by javed shaikh (Inactive) [ 12/Feb/14 ]

just fyi, we were hit on 9th feb...i've attached the mds.log.
this is on lustre 2.4.2, haven't patched yet.

Comment by James Nunez (Inactive) [ 18/Apr/14 ]

Patch for b2_5 at http://review.whamcloud.com/#/c/9779/

Generated at Sat Feb 10 01:42:24 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.