[LU-6271] (osc_cache.c:3150:discard_cb()) ASSERTION( (!(page->cp_type == CPT_CACHEABLE) || (!PageDirty(cl_page_vmpage(page)))) ) failed: Created: 23/Feb/15  Updated: 28/Jun/20  Resolved: 25/Oct/15

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.7.0
Fix Version/s: Lustre 2.8.0

Type: Bug Priority: Blocker
Reporter: Cliff White (Inactive) Assignee: Jinshan Xiong (Inactive)
Resolution: Fixed Votes: 0
Labels: patch
Environment:

Hyperon


Attachments: Text File iwc189.lbug.log.txt.gz     File iwc260.log.gz     Text File l-23.LU-6271.txt.gz     Text File lustre-log.iwc37.txt     File r2i1n4.messages.gz     File server_messages.tar.gz    
Issue Links:
Blocker
is blocking LU-6843 Support RHEL7 on b2_5_fe Resolved
Duplicate
is duplicated by LU-7066 osc_cache.c:2944:osc_cache_writeback_... Resolved
Related
is related to LU-12142 Hang in OSC on eviction - threads stu... Resolved
Severity: 3
Rank (Obsolete): 17581

 Description   

While performing failover testing:

LustreError: 167-0: lustre-OST0000-osc-ffff88083b339000: This client was evicted by lustre-OST0000; in progress operations using this service will fail.
Feb 23 09:22:48 iwc260 kernel: LustreError: 51585:0:(ldlm_resource.c:777:ldlm_resource_complain()) lustre-OST0000-osc-ffff88083b339000: namespace resource [0x2d097bb:0x0:0x0].0 (ffff88106a992e40) refcount nonzero (1) after lock cleanup; forcing cleanup.
Feb 23 09:22:48 iwc260 kernel: LustreError: 51585:0:(ldlm_resource.c:1374:ldlm_resource_dump()) --- Resource: [0x2d097bb:0x0:0x0].0 (ffff88106a992e40) refcount = 3
Feb 23 09:22:48 iwc260 kernel: LustreError: 51585:0:(ldlm_resource.c:1377:ldlm_resource_dump()) Granted locks (in reverse order):
Feb 23 09:22:48 iwc260 kernel: LustreError: 51585:0:(ldlm_resource.c:1380:ldlm_resource_dump()) ### ### ns: lustre-OST0000-osc-ffff88083b339000 lock: ffff88106a60d540/0xa1f402a8812988f4 lrc: 3/0,1 mode: PW/PW res: [0x2d097bb:0x0:0x0].0 rrc: 3 type: EXT [0->18446744073709551615] (req 0->8191) flags: 0x126400020000 nid: local remote: 0x72a9f4c80e66e07b expref: -99 pid: 51570 timeout: 0 lvb_type: 1
Feb 23 09:22:48 iwc260 kernel: Lustre: lustre-OST0000-osc-ffff88083b339000: Connection restored to lustre-OST0000 (at 192.168.120.13@o2ib)
Feb 23 09:22:49 iwc260 kernel: LustreError: 90252:0:(osc_cache.c:3150:discard_cb()) ASSERTION( (!(page->cp_type == CPT_CACHEABLE) || (!PageDirty(cl_page_vmpage(page)))) ) failed:
Feb 23 09:22:49 iwc260 kernel: LustreError: 90252:0:(osc_cache.c:3150:discard_cb()) ASSERTION( (!(page->cp_type == CPT_CACHEABLE) || (!PageDirty(cl_page_vmpage(page)))) ) failed:
Feb 23 09:22:49 iwc260 kernel: LustreError: 90252:0:(osc_cache.c:3150:discard_cb()) LBUG
Feb 23 09:22:49 iwc260 kernel: LustreError: 90252:0:(osc_cache.c:3150:discard_cb()) LBUG
Feb 23 09:22:49 iwc260 kernel: Pid: 90252, comm: ldlm_bl_36
Feb 23 09:22:49 iwc260 kernel:
Feb 23 09:22:49 iwc260 kernel: Call Trace:
Feb 23 09:22:49 iwc260 kernel: [<ffffffffa0435895>] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
Feb 23 09:22:49 iwc260 kernel: [<ffffffffa0435e97>] lbug_with_loc+0x47/0xb0 [libcfs]
Feb 23 09:22:49 iwc260 kernel: [<ffffffffa0b2ba56>] discard_cb+0x156/0x190 [osc]
Feb 23 09:22:49 iwc260 kernel: [<ffffffffa0b2bdcc>] osc_page_gang_lookup+0x1ac/0x330 [osc]
Feb 23 09:22:49 iwc260 kernel: [<ffffffffa0b2b900>] ? discard_cb+0x0/0x190 [osc]
Feb 23 09:22:49 iwc260 kernel: [<ffffffffa0b2c094>] osc_lock_discard_pages+0x144/0x240 [osc]
Feb 23 09:22:49 iwc260 kernel: [<ffffffffa04461c1>] ? libcfs_debug_msg+0x41/0x50 [libcfs]
Feb 23 09:22:49 iwc260 kernel: [<ffffffffa0b2b900>] ? discard_cb+0x0/0x190 [osc]
Feb 23 09:22:49 iwc260 kernel: [<ffffffffa0b2298b>] osc_lock_flush+0x8b/0x260 [osc]
Feb 23 09:22:49 iwc260 kernel: [<ffffffffa0b22e08>] osc_ldlm_blocking_ast+0x2a8/0x3c0 [osc]
Feb 23 09:22:49 iwc260 kernel: [<ffffffffa0761a6c>] ldlm_cancel_callback+0x6c/0x170 [ptlrpc]
Feb 23 09:22:49 iwc260 kernel: [<ffffffffa077450a>] ldlm_cli_cancel_local+0x8a/0x470 [ptlrpc]
Feb 23 09:22:49 iwc260 kernel: [<ffffffffa0779120>] ldlm_cli_cancel+0x60/0x360 [ptlrpc]
Feb 23 09:22:49 iwc260 kernel: [<ffffffffa0b22c3b>] osc_ldlm_blocking_ast+0xdb/0x3c0 [osc]
Feb 23 09:22:49 iwc260 kernel: [<ffffffffa04461c1>] ? libcfs_debug_msg+0x41/0x50 [libcfs]
Feb 23 09:22:49 iwc260 kernel: [<ffffffffa077cb60>] ldlm_handle_bl_callback+0x130/0x400 [ptlrpc]
Feb 23 09:22:49 iwc260 kernel: [<ffffffffa077d0c1>] ldlm_bl_thread_main+0x291/0x3f0 [ptlrpc]
Feb 23 09:22:49 iwc260 kernel: [<ffffffff81061d00>] ? default_wake_function+0x0/0x20
Feb 23 09:22:49 iwc260 kernel: [<ffffffffa077ce30>] ? ldlm_bl_thread_main+0x0/0x3f0 [ptlrpc]
Feb 23 09:22:49 iwc260 kernel: [<ffffffff8109abf6>] kthread+0x96/0xa0
Feb 23 09:22:49 iwc260 kernel: [<ffffffff8100c20a>] child_rip+0xa/0x20
Feb 23 09:22:49 iwc260 kernel: [<ffffffff8109ab60>] ? kthread+0x0/0xa0
Feb 23 09:22:49 iwc260 kernel: [<ffffffff8100c200>] ? child_rip+0x0/0x20


 Comments   
Comment by Jodi Levi (Inactive) [ 23/Feb/15 ]

John,
Could you please have a look and comment on this one?
Thank you!

Comment by John Hammond [ 23/Feb/15 ]

Hi Cliff, could you please include the exact version you were testing along with a description of your failover testing?

Comment by Cliff White (Inactive) [ 24/Feb/15 ]

We are running 2.6.94 lustre-master build 2856.
Failover testing consists of

  • power an OSS node off.
  • mount the devices from the dead OSS on the failover node.
  • sleep for awhile
  • power up the dead OSS
  • failback the devices.
    This is done 'manually' via a script, as we do not have HA software installed.
Comment by John Hammond [ 24/Feb/15 ]

What were the clients running?

Comment by Cliff White (Inactive) [ 24/Feb/15 ]

They were running the client bits from the same build

Comment by John Hammond [ 24/Feb/15 ]

What application(s) were they running?

Comment by Cliff White (Inactive) [ 24/Feb/15 ]

They were running the SWL workload which is a mix of standard tests, including IOR, mutest, simul and others.

Comment by Jinshan Xiong (Inactive) [ 01/Mar/15 ]

Does the workload include Direct IO and how often can it be reproduced?

Comment by Jinshan Xiong (Inactive) [ 01/Mar/15 ]

I took a look at the log. From the log, it looks like the write back was not triggered at all. The client was discarding the pages starting from index 4608, and the assertion was hit when it tried to discard page 5120. The log is too short and some key information is missing because I want to know the lock range, type, and what pages were actually written back.

Cliff, can you rerun the test case, with a little bit more debug buffer size, say 100M, and enable cache on the client and then reproduce this issue? As follows:

lctl set_param debug_size=100M
lctl set_param debug=+cache
Comment by Jinshan Xiong (Inactive) [ 02/Mar/15 ]

BTW, do the test programs use group lock?

Comment by Cliff White (Inactive) [ 02/Mar/15 ]

Our normal default is
lctl set_param panic_on_lbug=0;lctl set_param debug_mb=512M

So, no idea why the info you want is not in that log. I am past that build in the test cycle, I will repeat the test when I get the next build test cycle.

Comment by Li Dongyang (Inactive) [ 22/May/15 ]

We encountered the same problem at NCI, when the OSTs evicted the clients, many clients LBUGed with the same context above. Now we can reproduce this with a simple setup:
on the client, have a script monitor and keep the number of write processes, e.g. IOR. on the OSTs, have another script does the eviction constantly with an interval, e.g. 10 seconds.

The client always LBUG with the ldlm_resource_dump message. If message appears then it's close. sometimes it takes resource dump messages for a LBUG.

Comment by Gerrit Updater [ 22/May/15 ]

Li Dongyang (dongyang.li@anu.edu.au) uploaded a new patch: http://review.whamcloud.com/14915
Subject: LU-6271 ldlm: cleanup locks before activating import
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: aeff14823489ef3c53982d440a1df2c583c802d6

Comment by Jinshan Xiong (Inactive) [ 27/May/15 ]

The lock being canceled belongs to the previous instance of import. The dirty pages are actually protected by a new lock. They shouldn't be written back at this time at all. I'm working on a patch

Comment by Li Dongyang (Inactive) [ 28/May/15 ]

Hi Jinshan,
IMHO the client should clean up everything in cleanup_resource() before reconnecting. Doing this can also avoid the annoying ldlm_resource_complain messages. On our login nodes where users are doing many IOs to their files, once it got evicted from the OST, the cpu will spin for a long time dumping the locks and the box is not responsive at all.

Comment by Gerrit Updater [ 28/May/15 ]

Jinshan Xiong (jinshan.xiong@intel.com) uploaded a new patch: http://review.whamcloud.com/14989
Subject: LU-6271 osc: handle osc eviction correctly
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 8c01bf6f3c689f40f5863b30478c1f61947e316f

Comment by Jinshan Xiong (Inactive) [ 28/May/15 ]

Hi Dongyang,

Will you try the patch 14989 and see how it goes?

Jinshan

Comment by Li Dongyang (Inactive) [ 28/May/15 ]

Hi Jinshan,

<3>LustreError: 31958:0:(ldlm_resource.c:776:ldlm_resource_complain()) testfs-OST0000-osc-ffff880139269c00: namespace resource [0x22:0x0:0x0].0 (ffff880101507840) refcount nonzero (1) after lock cleanup; forcing cleanup.
<3>LustreError: 31958:0:(ldlm_resource.c:1369:ldlm_resource_dump()) --- Resource: [0x22:0x0:0x0].0 (ffff880101507840) refcount = 2
<3>LustreError: 31958:0:(ldlm_resource.c:1372:ldlm_resource_dump()) Granted locks (in reverse order):
<3>LustreError: 31958:0:(ldlm_resource.c:1375:ldlm_resource_dump()) ### ### ns: testfs-OST0000-osc-ffff880139269c00 lock: ffff8800bbb524c0/0x51b0732653777408 lrc: 4/0,1 mode: PW/PW res: [0x22:0x0:0x0].0 rrc: 2 type: EXT [0->18446744073709551615] (req 0->1048575) flags: 0x126400000000 nid: local remote: 0xdc8209701f2ad6da expref: -99 pid: 31677 timeout: 0 lvb_type: 1
<3>LustreError: 28596:0:(osc_cache.c:3155:discard_cb()) page@ffff88010c35d400[3 ffff88003780db38 1 0 1 ffff8800be860220 (null)]
<3>
<3>LustreError: 28596:0:(osc_cache.c:3155:discard_cb()) vvp-page@ffff88010c35d468(0:0) vm@ffffea00044f7068 40000000000879 3:0 ffff88010c35d400 5888 lru
<3>
<3>LustreError: 28596:0:(osc_cache.c:3155:discard_cb()) lov-page@ffff88010c35d4a8, raid0
<3>
<3>LustreError: 28596:0:(osc_cache.c:3155:discard_cb()) osc-page@ffff88010c35d510 5888: 1< 0x845fed 258 0 + - > 2< 24117248 0 4096 0x0 0x520 | (null) ffff88013c46a568 ffff880037882d90 > 3< + ffff88010bcd7500 1 0 0 > 4< 0 1 8 18446744073665499136 - | + - + - > 5< + - + - | 0 - | 2560 - ->
<3>
<3>LustreError: 28596:0:(osc_cache.c:3155:discard_cb()) end page@ffff88010c35d400
<3>
<3>LustreError: 28596:0:(osc_cache.c:3155:discard_cb()) discard dirty page?
<3>LustreError: 28596:0:(osc_cache.c:2466:osc_teardown_async_page()) extent ffff880112ed9288@{[5888 -> 6143/6143], [2|0|+|locking|wi|ffff880037882d90], [1048576|256|+|-|ffff8801386b9880|256|ffff88013c193500]} trunc at 5888.
<3>LustreError: 28596:0:(osc_cache.c:2466:osc_teardown_async_page()) ### extent: ffff880112ed9288
<3> ns: testfs-OST0000-osc-ffff880139269c00 lock: ffff8801386b9880/0x51b07326537775eb lrc: 35/0,3 mode: PW/PW res: [0x22:0x0:0x0].0 rrc: 2 type: EXT [0->18446744073709551615] (req 23068672->24117247) flags: 0x20000000000 nid: local remote: 0xdc8209701f2ad6fd expref: -99 pid: 31718 timeout: 0 lvb_type: 1
<3>LustreError: 28596:0:(osc_page.c:313:osc_page_delete()) page@ffff88010c35d400[3 ffff88003780db38 4 0 1 (null) (null)]
<3>
<3>LustreError: 28596:0:(osc_page.c:313:osc_page_delete()) vvp-page@ffff88010c35d468(0:0) vm@ffffea00044f7068 40000000000879 3:0 ffff88010c35d400 5888 lru
<3>
<3>LustreError: 28596:0:(osc_page.c:313:osc_page_delete()) lov-page@ffff88010c35d4a8, raid0
<3>
<3>LustreError: 28596:0:(osc_page.c:313:osc_page_delete()) osc-page@ffff88010c35d510 5888: 1< 0x845fed 258 0 + - > 2< 24117248 0 4096 0x0 0x520 | (null) ffff88013c46a568 ffff880037882d90 > 3< + ffff88010bcd7500 0 0 0 > 4< 0 1 8 18446744073644531712 + | + - + - > 5< + - + - | 0 - | 7680 - ->
<3>
<3>LustreError: 28596:0:(osc_page.c:313:osc_page_delete()) end page@ffff88010c35d400
<3>
<3>LustreError: 28596:0:(osc_page.c:313:osc_page_delete()) Trying to teardown failed: -16
<0>LustreError: 28596:0:(osc_page.c:314:osc_page_delete()) ASSERTION( 0 ) failed: 
<0>LustreError: 28596:0:(osc_page.c:314:osc_page_delete()) LBUG
<4>Pid: 28596, comm: ldlm_bl_00
<4>
<4>Call Trace:
<4> [<ffffffffa0251875>] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
<4> [<ffffffffa0251e77>] lbug_with_loc+0x47/0xb0 [libcfs]
<4> [<ffffffffa09386a6>] osc_page_delete+0x446/0x4e0 [osc]
<4> [<ffffffffa03b05bd>] cl_page_delete0+0x7d/0x210 [obdclass]
<4> [<ffffffffa03b078d>] cl_page_delete+0x3d/0x110 [obdclass]
<4> [<ffffffffa085f63d>] ll_invalidatepage+0x8d/0x160 [lustre]
<4> [<ffffffffa086ee65>] vvp_page_discard+0xc5/0x160 [lustre]
<4> [<ffffffffa03aef18>] cl_page_invoid+0x68/0x160 [obdclass]
<4> [<ffffffffa03af023>] cl_page_discard+0x13/0x20 [obdclass]
<4> [<ffffffffa0943cb8>] discard_cb+0x88/0x1e0 [osc]
<4> [<ffffffffa094414c>] osc_page_gang_lookup+0x1ac/0x330 [osc]
<4> [<ffffffffa0943c30>] ? discard_cb+0x0/0x1e0 [osc]
<4> [<ffffffffa0943c30>] ? discard_cb+0x0/0x1e0 [osc]
<4> [<ffffffffa0952108>] osc_cache_flush+0x178/0x410 [osc]
<4> [<ffffffffa093aa68>] osc_ldlm_blocking_ast+0x2a8/0x3c0 [osc]
<4> [<ffffffffa053a4cc>] ldlm_cancel_callback+0x6c/0x170 [ptlrpc]
<4> [<ffffffffa054c35a>] ldlm_cli_cancel_local+0x8a/0x470 [ptlrpc]
<4> [<ffffffffa0550f80>] ldlm_cli_cancel+0x60/0x360 [ptlrpc]
<4> [<ffffffffa093a89b>] osc_ldlm_blocking_ast+0xdb/0x3c0 [osc]
<4> [<ffffffffa05549c0>] ldlm_handle_bl_callback+0x130/0x400 [ptlrpc]
<4> [<ffffffffa0554f21>] ldlm_bl_thread_main+0x291/0x3f0 [ptlrpc]
<4> [<ffffffff81064b90>] ? default_wake_function+0x0/0x20
<4> [<ffffffffa0554c90>] ? ldlm_bl_thread_main+0x0/0x3f0 [ptlrpc]
<4> [<ffffffff8109e66e>] kthread+0x9e/0xc0
<4> [<ffffffff8100c20a>] child_rip+0xa/0x20
<4> [<ffffffff8109e5d0>] ? kthread+0x0/0xc0
<4> [<ffffffff8100c200>] ? child_rip+0x0/0x20
<4>
<0>Kernel panic - not syncing: LBUG
<4>Pid: 28596, comm: ldlm_bl_00 Not tainted 2.6.32-504.12.2.el6.x86_64 #1
<4>Call Trace:
<4> [<ffffffff8152933c>] ? panic+0xa7/0x16f
<4> [<ffffffffa0251ecb>] ? lbug_with_loc+0x9b/0xb0 [libcfs]
<4> [<ffffffffa09386a6>] ? osc_page_delete+0x446/0x4e0 [osc]
<4> [<ffffffffa03b05bd>] ? cl_page_delete0+0x7d/0x210 [obdclass]
<4> [<ffffffffa03b078d>] ? cl_page_delete+0x3d/0x110 [obdclass]
<4> [<ffffffffa085f63d>] ? ll_invalidatepage+0x8d/0x160 [lustre]
<4> [<ffffffffa086ee65>] ? vvp_page_discard+0xc5/0x160 [lustre]
<4> [<ffffffffa03aef18>] ? cl_page_invoid+0x68/0x160 [obdclass]
<4> [<ffffffffa03af023>] ? cl_page_discard+0x13/0x20 [obdclass]
<4> [<ffffffffa0943cb8>] ? discard_cb+0x88/0x1e0 [osc]
<4> [<ffffffffa094414c>] ? osc_page_gang_lookup+0x1ac/0x330 [osc]
<4> [<ffffffffa0943c30>] ? discard_cb+0x0/0x1e0 [osc]
<4> [<ffffffffa0943c30>] ? discard_cb+0x0/0x1e0 [osc]
<4> [<ffffffffa0952108>] ? osc_cache_flush+0x178/0x410 [osc]
<4> [<ffffffffa093aa68>] ? osc_ldlm_blocking_ast+0x2a8/0x3c0 [osc]
<4> [<ffffffffa053a4cc>] ? ldlm_cancel_callback+0x6c/0x170 [ptlrpc]
<4> [<ffffffffa054c35a>] ? ldlm_cli_cancel_local+0x8a/0x470 [ptlrpc]
<4> [<ffffffffa0550f80>] ? ldlm_cli_cancel+0x60/0x360 [ptlrpc]
<4> [<ffffffffa093a89b>] ? osc_ldlm_blocking_ast+0xdb/0x3c0 [osc]
<4> [<ffffffffa05549c0>] ? ldlm_handle_bl_callback+0x130/0x400 [ptlrpc]
<4> [<ffffffffa0554f21>] ? ldlm_bl_thread_main+0x291/0x3f0 [ptlrpc]
<4> [<ffffffff81064b90>] ? default_wake_function+0x0/0x20
<4> [<ffffffffa0554c90>] ? ldlm_bl_thread_main+0x0/0x3f0 [ptlrpc]
<4> [<ffffffff8109e66e>] ? kthread+0x9e/0xc0
<4> [<ffffffff8100c20a>] ? child_rip+0xa/0x20
<4> [<ffffffff8109e5d0>] ? kthread+0x0/0xc0
<4> [<ffffffff8100c200>] ? child_rip+0x0/0x20

Could you have a look at patch 14915 please? We have been testing it for a long time before submitting it.

Comment by Antoine Percher [ 20/Jul/15 ]

HI,
At Cea with lustre 2.7, we meet the same LBUG
(osc_cache.c:3150:discard_cb()) ASSERTION( (!(page->cp_type == CPT_CACHEABLE) || (!PageDirty(cl_page_vmpage(page)))) ) failed:
In my case the ldlm thread has the same stack and I have another user thread who are currently writing on the
concerning file and the stack was :

      cl_sync_io_wait()
      cl_io_submit_sync()
      ll_page_sync-io()
      ll_write_begin()
      generic_file_buffered_write()
      __generic_file_aio_write()
      vvp_io_write_start()
      cl_io_start()
      cl_io_loop()
      ll_file_io_generic()
      ll_file_aio-write()
      ll_file_write()
      vfs_write()
      sys_write()
      system_call_fastpath()

This thread do a write in 1024 (0x400) pages, and the page concerning by the LBug is a page
who are in this write()
The writing thread waiting the sync of the last page 1024 (0x400)
If I understand well patch 14915 need some additional work, could you confirm ?
Antoine

Comment by Jinshan Xiong (Inactive) [ 20/Jul/15 ]

Hi Antoine,

Did you notice that this OSC had ever been evicted from your occurrence?

Comment by Bruno Faccini (Inactive) [ 21/Jul/15 ]

Hello Jinshan,
Talking about this problem with Antoine today, I think that the answer is yes, but it need to be double-checked by Antoine on-site.

Comment by Antoine Percher [ 22/Jul/15 ]

Hi,
Yes, for this client, the 3 osts concerning by the current I/Os has evicted and reconnected just before the assert. And for me that is a "short eviction" due to huge I/O between these OSTs and this client.
Antoine

Comment by Li Dongyang (Inactive) [ 28/Jul/15 ]

Here is a demo code to show how to reproduce the problem with grouplock:

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>

#include <lustre/lustre_user.h>

int main(int argc, char *argv[])
{
        int fd;
        int rc;
        int gid;
        char *buf;
        int i;

        fd = open(<file>, O_RDWR|O_CREAT|O_TRUNC);
        gid = atoi(argv[1]);
        rc = ioctl(fd, LL_IOC_GROUP_LOCK, gid);
        printf("ioctl %d\n", rc);
        if (rc) 
                return rc;
        buf = malloc(1<<20);
        memset(buf, 1, 1<<20);
        while (1)
                write(fd, buf, 1<<20);
        return 0;
}

Run this with a parameter as gid, then evict the client from the OST.

Comment by Jinshan Xiong (Inactive) [ 29/Jul/15 ]

I just update http://review.whamcloud.com/14989 it should be good for general IO but group lock is not yet supported. Please verify if this is the case on your side.

Comment by Cliff White (Inactive) [ 29/Jul/15 ]

We have hit this on lola, with 2.7.0

fff8807e5361e40) refcount = 3
LustreError: 118965:0:(ldlm_resource.c:1377:ldlm_resource_dump()) Granted locks (in reverse order):
Lustre: soaked-OST000f-osc-ffff88082297e800: Connection restored to soaked-OST000f (at 192.168.1.105@o2ib10)
LustreError: 73177:0:(osc_cache.c:3150:discard_cb()) ASSERTION( (!(page->cp_type == CPT_CACHEABLE) || (!PageDirty(cl_page_vmpage(page)))) ) failed:
LustreError: 73177:0:(osc_cache.c:3150:discard_cb()) LBUG
Pid: 73177, comm: ldlm_bl_100

Call Trace:
 [<ffffffffa046c895>] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
 [<ffffffffa046ce97>] lbug_with_loc+0x47/0xb0 [libcfs]
 [<ffffffffa0ba8046>] discard_cb+0x156/0x190 [osc]
 [<ffffffffa0ba83bc>] osc_page_gang_lookup+0x1ac/0x330 [osc]
 [<ffffffffa0ba7ef0>] ? discard_cb+0x0/0x190 [osc]
 [<ffffffffa0ba8684>] osc_lock_discard_pages+0x144/0x240 [osc]
 [<ffffffffa0ba7ef0>] ? discard_cb+0x0/0x190 [osc]  
 [<ffffffffa0b9ef7b>] osc_lock_flush+0x8b/0x260 [osc]
 [<ffffffffa0b9f3f8>] osc_ldlm_blocking_ast+0x2a8/0x3c0 [osc]
 [<ffffffffa0764a6c>] ldlm_cancel_callback+0x6c/0x170 [ptlrpc]
 [<ffffffffa077732a>] ldlm_cli_cancel_local+0x8a/0x470 [ptlrpc]
 [<ffffffffa077bf40>] ldlm_cli_cancel+0x60/0x360 [ptlrpc]
 [<ffffffffa0b9f22b>] osc_ldlm_blocking_ast+0xdb/0x3c0 [osc]
 [<ffffffffa077f980>] ldlm_handle_bl_callback+0x130/0x400 [ptlrpc]
 [<ffffffffa077fee1>] ldlm_bl_thread_main+0x291/0x3f0 [ptlrpc]
 [<ffffffff81064be0>] ? default_wake_function+0x0/0x20
 [<ffffffffa077fc50>] ? ldlm_bl_thread_main+0x0/0x3f0 [ptlrpc]
 [<ffffffff8109e78e>] kthread+0x9e/0xc0
 [<ffffffff8100c28a>] child_rip+0xa/0x20
 [<ffffffff8109e6f0>] ? kthread+0x0/0xc0
 [<ffffffff8100c280>] ? child_rip+0x0/0x20

Comment by Cliff White (Inactive) [ 29/Jul/15 ]

Lustre Log from LBUG

Comment by Li Dongyang (Inactive) [ 02/Aug/15 ]

Hi Jinshan,
The client is stuck after eviction with 14989 patched:

PID: 15242  TASK: ffff880037cd3520  CPU: 0   COMMAND: "ll_imp_inval"
 #0 [ffff88003de53b60] schedule at ffffffff81529ab0
 #1 [ffff88003de53c38] osc_object_invalidate at ffffffffa103a695 [osc]
 #2 [ffff88003de53cb8] osc_ldlm_resource_invalidate at ffffffffa102b769 [osc]
 #3 [ffff88003de53cf8] cfs_hash_for_each_relax at ffffffffa09726ab [libcfs]
 #4 [ffff88003de53d88] cfs_hash_for_each_nolock at ffffffffa09745ac [libcfs]
 #5 [ffff88003de53db8] osc_import_event at ffffffffa1036556 [osc]
 #6 [ffff88003de53e08] ptlrpc_invalidate_import at ffffffffa0c9d7a1 [ptlrpc]
 #7 [ffff88003de53ec8] ptlrpc_invalidate_import_thread at ffffffffa0ca0608 [ptlrpc]
 #8 [ffff88003de53ee8] kthread at ffffffff8109e78e
 #9 [ffff88003de53f48] kernel_thread at ffffffff8100c28a

I've updated http://review.whamcloud.com/#/c/14915/ now we skip the grouplocks during cleanup so we can reconnect to the servers, purge the extents of the grouplock,
and if we see any IO from the grouplock fd, just return -ENOLCK.
The grouplock still needs to be released manually by the user. It's not ideal but at least the client is not crashing any more.

Comment by Jinshan Xiong (Inactive) [ 24/Aug/15 ]

In that case, let's land the patch 14915 at least it's working.

Comment by Jinshan Xiong (Inactive) [ 24/Aug/15 ]

Hi Dongyang,

Do you have a program to reproduce the problem?

Jinshan

Comment by Di Wang [ 31/Aug/15 ]

We also found this problem on hyperion test. Here is the debug log.

Comment by Andreas Dilger [ 01/Sep/15 ]

Are the two patches here complimentary (i.e. both should land) or is only one of the two patches needed?

Comment by Jinshan Xiong (Inactive) [ 02/Sep/15 ]

Hi Andreas, the two patches are exclusive. I would rather land http://review.whamcloud.com/14989, but it's fine for me to land http://review.whamcloud.com/#/c/14915 if you think it is a better solution.

Comment by Li Dongyang (Inactive) [ 03/Sep/15 ]

Hi Jinshan,
was sick in the past week, sorry for the late reply.
The reproducer is pretty simple:
On the client, have some threads doing write to a file, ior would do, and start e.g. 20 of them.
On the OSS evict the client over and over again, say 10 sec.
Upon eviction on the client the processes will die as a result, just bump the number up back to 20.

Keep it running for a while, and it will hit the problem pretty quick.
BTW with patch set 4 from http://review.whamcloud.com/14989 the client still stuck at one point:
crash> bt 11413
PID: 11413 TASK: ffff88003b1e0ab0 CPU: 0 COMMAND: "ll_imp_inval"
#0 [ffff88003bd59b60] schedule at ffffffff81529ab0
#1 [ffff88003bd59c38] osc_object_invalidate at ffffffffa090468c [osc]
#2 [ffff88003bd59cb8] osc_ldlm_resource_invalidate at ffffffffa08f5769 [osc]
#3 [ffff88003bd59cf8] cfs_hash_for_each_relax at ffffffffa022865b [libcfs]
#4 [ffff88003bd59d88] cfs_hash_for_each_nolock at ffffffffa022a53c [libcfs]
#5 [ffff88003bd59db8] osc_import_event at ffffffffa0900546 [osc]
#6 [ffff88003bd59e08] ptlrpc_invalidate_import at ffffffffa055fcb1 [ptlrpc]
#7 [ffff88003bd59ec8] ptlrpc_invalidate_import_thread at ffffffffa0562b18 [ptlrpc]
#8 [ffff88003bd59ee8] kthread at ffffffff8109e78e
#9 [ffff88003bd59f48] kernel_thread at ffffffff8100c28a

Seems it won't reconnect to the OSS.

Thanks

Comment by Jinshan Xiong (Inactive) [ 08/Sep/15 ]

Hi Dongyang,

I have been running this test program for over 10 hours on my testing node but I didn't reproduce this problem. I did this test on my VM nodes so this may be one of reasons why I couldn't reproduce it. Will you please reproduce it again and collect lustre logs and output of dmesg when you see the problem? Also it will be helpful to take a crashdump and then upload it, along with lustre modules, to our ftp site at: ftp.whamcloud.com so that I can take a look.

Thanks in advance,
Jinshan

Comment by Li Dongyang (Inactive) [ 15/Sep/15 ]

Hi Jinshan,
I finally got some time to generate the dump for you. I'm using patchset 5 of http://review.whamcloud.com/#/c/14989/ on top of master.
While I was trying to reproduce the problem, I got a client crash. I don't know if it's related but I got the dump as well.

I tried to upload them to ftp.whamcloud.com/uploads. the LU-6271_pkgs.tar.gz was uploaded fine, which has all the lustre modules and debuginfo I used to reproduce the problem.
But when I tried to upload other 2 tarballs(crashdump of the crash and stuck), the transfer stalled despite multiple retries.
Is there another way to upload those files to you?

Thanks
Dongyang

Comment by Jinshan Xiong (Inactive) [ 15/Sep/15 ]

Another way would be to upload it to dropbox or google drive and share it to me. Please encrypt it if the crash dump has sensitive data and email me the password.

Comment by James A Simmons [ 15/Sep/15 ]

We just ran into this during our are large scale testing on titan today.

Comment by Gerrit Updater [ 16/Sep/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/14989/
Subject: LU-6271 osc: handle osc eviction correctly
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 8f01f8b51d114b0d2d54a5ab7db3161782e52447

Comment by Li Dongyang (Inactive) [ 16/Sep/15 ]

I reckon it is too soon to land http://review.whamcloud.com/14989/
With the patch the client still crashes when I run the reproducer, for example:
<3>LustreError: 15348:0:(ldlm_resource.c:835:ldlm_resource_complain()) testfs-OST0000-osc-ffff880037fea000: namespace resource [0x302:0x0:0x0].0 (ffff88003deae500) refcount no
nzero (1) after lock cleanup; forcing cleanup.
<3>LustreError: 15348:0:(ldlm_resource.c:1450:ldlm_resource_dump()) — Resource: [0x302:0x0:0x0].0 (ffff88003deae500) refcount = 2
<3>LustreError: 15348:0:(ldlm_resource.c:1453:ldlm_resource_dump()) Granted locks (in reverse order):
<3>LustreError: 15348:0:(ldlm_resource.c:1456:ldlm_resource_dump()) ### ### ns: testfs-OST0000-osc-ffff880037fea000 lock: ffff880037e29940/0xaa5a0b4e389da92d lrc: 4/0,1 mode:
PW/PW res: [0x302:0x0:0x0].0 rrc: 2 type: EXT [0->18446744073709551615] (req 0->1048575) flags: 0x126400000000 nid: local remote: 0x59a587f3f1d1130e expref: -99 pid: 15181 tim
eout: 0 lvb_type: 1
<3>LustreError: 15348:0:(ldlm_resource.c:1450:ldlm_resource_dump()) — Resource: [0x302:0x0:0x0].0 (ffff88003deae500) refcount = 2
<3>LustreError: 15348:0:(ldlm_resource.c:1453:ldlm_resource_dump()) Granted locks (in reverse order):
<3>LustreError: 12670:0:(osc_cache.c:3141:discard_cb()) page@ffff880038c3fa00[3 ffff88003ac29b38 1 0 1 ffff88003a78ebb8 (null)]
<3>
<3>LustreError: 12670:0:(osc_cache.c:3141:discard_cb()) vvp-page@ffff880038c3fa68(0:0) vm@ffffea000071dfb8 2000000000087f 2:0 ffff880038c3fa00 21504 lru
<3>
<3>LustreError: 12670:0:(osc_cache.c:3141:discard_cb()) lov-page@ffff880038c3faa8, raid0
<3>
<3>LustreError: 12670:0:(osc_cache.c:3141:discard_cb()) osc-page@ffff880038c3fb10 21504: 1< 0x845fed 258 0 + - > 2< 88080384 0 4096 0x0 0x520 | (null) ffff88003ac58500 ffff880
03cfdbe60 > 3< 1 0 0 > 4< 0 10 8 18446744073619427328 + | + - + - > 5< + - + - | 0 - | 6663 - ->
<3>
<3>LustreError: 12670:0:(osc_cache.c:3141:discard_cb()) end page@ffff880038c3fa00
<3>
<3>LustreError: 12670:0:(osc_cache.c:3141:discard_cb()) discard dirty page?
<3>LustreError: 12670:0:(osc_cache.c:2454:osc_teardown_async_page()) extent ffff88003da0eb10@

{[21504 -> 21759/21759], [2|0|-|cache|wi|ffff88003cfdbe60], [1048576|256|+|-|ffff8 8003c75d680|256|(null)]}

trunc at 21504.
<3>LustreError: 12670:0:(osc_cache.c:2454:osc_teardown_async_page()) ### extent: ffff88003da0eb10
<3> ns: testfs-OST0000-osc-ffff880037fea000 lock: ffff88003c75d680/0xaa5a0b4e389daa3e lrc: 68/0,6 mode: PW/PW res: [0x302:0x0:0x0].0 rrc: 2 type: EXT [0->18446744073709551615]
(req 70254592->71303167) flags: 0x20000000000 nid: local remote: 0x59a587f3f1d11323 expref: -99 pid: 15246 timeout: 0 lvb_type: 1
<3>LustreError: 12670:0:(osc_page.c:307:osc_page_delete()) page@ffff880038c3fa00[3 ffff88003ac29b38 4 0 1 (null) (null)]
<3>
<3>LustreError: 12670:0:(osc_page.c:307:osc_page_delete()) vvp-page@ffff880038c3fa68(0:0) vm@ffffea000071dfb8 2000000000087f 2:0 ffff880038c3fa00 21504 lru
<3>
<3>LustreError: 12670:0:(osc_page.c:307:osc_page_delete()) lov-page@ffff880038c3faa8, raid0
<3>
<3>LustreError: 12670:0:(osc_page.c:307:osc_page_delete()) osc-page@ffff880038c3fb10 21504: 1< 0x845fed 258 0 + - > 2< 88080384 0 4096 0x0 0x520 | (null) ffff88003ac58500 ffff
88003cfdbe60 > 3< 0 0 0 > 4< 0 9 8 18446744073619361792 + | + - + - > 5< + - + - | 0 - | 6679 - ->
<3>
<3>LustreError: 12670:0:(osc_page.c:307:osc_page_delete()) end page@ffff880038c3fa00
<3>
<3>LustreError: 12670:0:(osc_page.c:307:osc_page_delete()) Trying to teardown failed: -16
<0>LustreError: 12670:0:(osc_page.c:308:osc_page_delete()) ASSERTION( 0 ) failed:
<0>LustreError: 12670:0:(osc_page.c:308:osc_page_delete()) LBUG
<4>Pid: 12670, comm: ldlm_bl_00
<4>
<4>Call Trace:
<4> [<ffffffffa021d875>] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
<4> [<ffffffffa021de77>] lbug_with_loc+0x47/0xb0 [libcfs]
<4> [<ffffffffa090dbfe>] osc_page_delete+0x46e/0x4e0 [osc]
<4> [<ffffffffa037e9dd>] cl_page_delete0+0x7d/0x210 [obdclass]
<4> [<ffffffffa037ebad>] cl_page_delete+0x3d/0x110 [obdclass]
<4> [<ffffffffa0837d0d>] ll_invalidatepage+0x8d/0x160 [lustre]
<4> [<ffffffffa0846da5>] vvp_page_discard+0xc5/0x160 [lustre]
<4> [<ffffffffa037cfd8>] cl_page_invoid+0x68/0x160 [obdclass]
<4> [<ffffffffa037d0e3>] cl_page_discard+0x13/0x20 [obdclass]
<4> [<ffffffffa0919678>] discard_cb+0x88/0x1e0 [osc]
<4> [<ffffffffa091946e>] osc_page_gang_lookup+0x1ae/0x330 [osc]
<4> [<ffffffffa09195f0>] ? discard_cb+0x0/0x1e0 [osc]
<4> [<ffffffffa0919914>] osc_lock_discard_pages+0x144/0x240 [osc]
<4> [<ffffffffa09195f0>] ? discard_cb+0x0/0x1e0 [osc]
<4> [<ffffffffa090ff7b>] osc_lock_flush+0x8b/0x260 [osc]
<4> [<ffffffffa09103f8>] osc_ldlm_blocking_ast+0x2a8/0x3c0 [osc]
<4> [<ffffffffa050e9dc>] ldlm_cancel_callback+0x6c/0x170 [ptlrpc]
<4> [<ffffffffa052190a>] ldlm_cli_cancel_local+0x8a/0x470 [ptlrpc]
<4> [<ffffffffa0526540>] ldlm_cli_cancel+0x60/0x360 [ptlrpc]
<4> [<ffffffffa091022b>] osc_ldlm_blocking_ast+0xdb/0x3c0 [osc]
<4> [<ffffffffa052a440>] ldlm_handle_bl_callback+0x130/0x400 [ptlrpc]
<4> [<ffffffffa052af24>] ldlm_bl_thread_main+0x484/0x700 [ptlrpc]
<4> [<ffffffff810672b0>] ? default_wake_function+0x0/0x20
<4> [<ffffffffa052aaa0>] ? ldlm_bl_thread_main+0x0/0x700 [ptlrpc]
<4> [<ffffffff810a101e>] kthread+0x9e/0xc0
<4> [<ffffffff8100c28a>] child_rip+0xa/0x20
<4> [<ffffffff810a0f80>] ? kthread+0x0/0xc0
<4> [<ffffffff8100c280>] ? child_rip+0x0/0x20
<4>
<0>Kernel panic - not syncing: LBUG
<4>Pid: 12670, comm: ldlm_bl_00 Not tainted 2.6.32-573.3.1.el6.x86_64 #1
<4>Call Trace:
<4> [<ffffffff81537c54>] ? panic+0xa7/0x16f
<4> [<ffffffffa021decb>] ? lbug_with_loc+0x9b/0xb0 [libcfs]
<4> [<ffffffffa090dbfe>] ? osc_page_delete+0x46e/0x4e0 [osc]
<4> [<ffffffffa037e9dd>] ? cl_page_delete0+0x7d/0x210 [obdclass]
<4> [<ffffffffa037ebad>] ? cl_page_delete+0x3d/0x110 [obdclass]
<4> [<ffffffffa0837d0d>] ? ll_invalidatepage+0x8d/0x160 [lustre]
<4> [<ffffffffa0846da5>] ? vvp_page_discard+0xc5/0x160 [lustre]
<4> [<ffffffffa037cfd8>] ? cl_page_invoid+0x68/0x160 [obdclass]
<4> [<ffffffffa037d0e3>] ? cl_page_discard+0x13/0x20 [obdclass]
<4> [<ffffffffa0919678>] ? discard_cb+0x88/0x1e0 [osc]
<4> [<ffffffffa091946e>] ? osc_page_gang_lookup+0x1ae/0x330 [osc]
<4> [<ffffffffa09195f0>] ? discard_cb+0x0/0x1e0 [osc]
<4> [<ffffffffa0919914>] ? osc_lock_discard_pages+0x144/0x240 [osc]
<4> [<ffffffffa09195f0>] ? discard_cb+0x0/0x1e0 [osc]
<4> [<ffffffffa090ff7b>] ? osc_lock_flush+0x8b/0x260 [osc]
<4> [<ffffffffa09103f8>] ? osc_ldlm_blocking_ast+0x2a8/0x3c0 [osc]
<4> [<ffffffffa050e9dc>] ? ldlm_cancel_callback+0x6c/0x170 [ptlrpc]
<4> [<ffffffffa052190a>] ? ldlm_cli_cancel_local+0x8a/0x470 [ptlrpc]
<4> [<ffffffffa0526540>] ? ldlm_cli_cancel+0x60/0x360 [ptlrpc]
<4> [<ffffffffa091022b>] ? osc_ldlm_blocking_ast+0xdb/0x3c0 [osc]
<4> [<ffffffffa052a440>] ? ldlm_handle_bl_callback+0x130/0x400 [ptlrpc]
<4> [<ffffffffa052af24>] ? ldlm_bl_thread_main+0x484/0x700 [ptlrpc]
<4> [<ffffffff810672b0>] ? default_wake_function+0x0/0x20
<4> [<ffffffffa052aaa0>] ? ldlm_bl_thread_main+0x0/0x700 [ptlrpc]
<4> [<ffffffff810a101e>] ? kthread+0x9e/0xc0
<4> [<ffffffff8100c28a>] ? child_rip+0xa/0x20
<4> [<ffffffff810a0f80>] ? kthread+0x0/0xc0
<4> [<ffffffff8100c280>] ? child_rip+0x0/0x20

and another one, however don't know if it's related.
<3>LustreError: 4278:0:(ldlm_resource.c:835:ldlm_resource_complain()) testfs-OST0001-osc-ffff88003c715c00: namespace resource [0x302:0x0:0x0].0 (ffff880037015800) refcount non
zero (1) after lock cleanup; forcing cleanup.
<3>LustreError: 4278:0:(ldlm_resource.c:1450:ldlm_resource_dump()) — Resource: [0x302:0x0:0x0].0 (ffff880037015800) refcount = 2
<3>LustreError: 4278:0:(ldlm_resource.c:1453:ldlm_resource_dump()) Granted locks (in reverse order):
<3>LustreError: 4278:0:(ldlm_resource.c:1456:ldlm_resource_dump()) ### ### ns: testfs-OST0001-osc-ffff88003c715c00 lock: ffff880037269380/0x532f2161a177e283 lrc: 19/0,1 mode:
PW/PW res: [0x302:0x0:0x0].0 rrc: 2 type: EXT [0->18446744073709551615] (req 0->1048575) flags: 0x126400000000 nid: local remote: 0x59a587f3f1d100b5 expref: -99 pid: 4040 time
out: 0 lvb_type: 1
<3>LustreError: 790:0:(osc_io.c:1010:osc_req_attr_set()) page@ffff880022f02600[2 ffff88003be7db38 2 0 1 (null) ffff88003df849c0]
<3>
<3>LustreError: 789:0:(osc_io.c:1010:osc_req_attr_set()) page@ffff88003dfc8000[2 ffff88003be7db38 2 0 1 (null) ffff88003b3982c0]
<3>
<3>LustreError: 789:0:(osc_io.c:1010:osc_req_attr_set()) vvp-page@ffff88003dfc8068(0:0) vm@ffffea0000785428 2000000000282c 2:0 ffff88003dfc8000 19200 lru
<3>
<3>LustreError: 789:0:(osc_io.c:1010:osc_req_attr_set()) lov-page@ffff88003dfc80a8, raid0
<3>
<3>LustreError: 789:0:(osc_io.c:1010:osc_req_attr_set()) osc-page@ffff88003dfc8110 19200: 1< 0x845fed 258 0 + + > 2< 78643200 0 4096 0x5 0x520 | (null) ffff88003d970540 ffff88
003bc81e20 > 3< 1 12 0 > 4< 0 7 8 18446744073678077952 - | - - - - > 5< - - - - | 0 - | 0 - ->
<3>
<3>LustreError: 789:0:(osc_io.c:1010:osc_req_attr_set()) end page@ffff88003dfc8000
<3>
<3>LustreError: 789:0:(osc_io.c:1010:osc_req_attr_set()) uncovered page!
<3>LustreError: 789:0:(ldlm_resource.c:1450:ldlm_resource_dump()) — Resource: [0x302:0x0:0x0].0 (ffff880037015800) refcount = 3
<4>Pid: 789, comm: ptlrpcd_00_00
<4>
<4>Call Trace:
<4> [<ffffffffa021d875>] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
<4> [<ffffffffa09133fa>] osc_req_attr_set+0x55a/0x720 [osc]
<4> [<ffffffffa0383829>] cl_req_attr_set+0xc9/0x220 [obdclass]
<4> [<ffffffffa0904082>] osc_build_rpc+0x882/0x12d0 [osc]
<4> [<ffffffffa091f623>] osc_io_unplug0+0x1133/0x1af0 [osc]
<4> [<ffffffffa0918428>] ? osc_ap_completion+0x1a8/0x550 [osc]
<4> [<ffffffffa0917a3e>] ? osc_extent_put+0xbe/0x260 [osc]
<4> [<ffffffffa0374f75>] ? lu_object_put+0x135/0x3b0 [obdclass]
<4> [<ffffffffa09224b0>] osc_io_unplug+0x10/0x20 [osc]
<4> [<ffffffffa0905593>] brw_interpret+0xac3/0x2320 [osc]
<4> [<ffffffffa0546ee2>] ? ptlrpc_unregister_bulk+0xa2/0xac0 [ptlrpc]
<4> [<ffffffffa053f4bc>] ? ptlrpc_unregister_reply+0x6c/0x810 [ptlrpc]
<4> [<ffffffffa053e2a4>] ? ptlrpc_send_new_req+0x154/0x980 [ptlrpc]
<4> [<ffffffffa0540551>] ptlrpc_check_set+0x331/0x1be0 [ptlrpc]
<4> [<ffffffffa056e443>] ptlrpcd_check+0x3d3/0x610 [ptlrpc]
<4> [<ffffffffa056e8fa>] ptlrpcd+0x27a/0x500 [ptlrpc]
<4> [<ffffffff810672b0>] ? default_wake_function+0x0/0x20
<4> [<ffffffffa056e680>] ? ptlrpcd+0x0/0x500 [ptlrpc]
<4> [<ffffffff810a101e>] kthread+0x9e/0xc0
<4> [<ffffffff8100c28a>] child_rip+0xa/0x20
<4> [<ffffffff810a0f80>] ? kthread+0x0/0xc0
<4> [<ffffffff8100c280>] ? child_rip+0x0/0x20
<4>
<0>LustreError: 789:0:(osc_io.c:1020:osc_req_attr_set()) LBUG
<4>Pid: 789, comm: ptlrpcd_00_00
<4>
<4>Call Trace:
<4> [<ffffffffa021d875>] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
<4> [<ffffffffa021de77>] lbug_with_loc+0x47/0xb0 [libcfs]
<4> [<ffffffffa0913410>] osc_req_attr_set+0x570/0x720 [osc]
<4> [<ffffffffa0383829>] cl_req_attr_set+0xc9/0x220 [obdclass]
<4> [<ffffffffa0904082>] osc_build_rpc+0x882/0x12d0 [osc]
<4> [<ffffffffa091f623>] osc_io_unplug0+0x1133/0x1af0 [osc]
<4> [<ffffffffa0918428>] ? osc_ap_completion+0x1a8/0x550 [osc]
<4> [<ffffffffa0917a3e>] ? osc_extent_put+0xbe/0x260 [osc]
<4> [<ffffffffa0374f75>] ? lu_object_put+0x135/0x3b0 [obdclass]
<4> [<ffffffffa09224b0>] osc_io_unplug+0x10/0x20 [osc]
<4> [<ffffffffa0905593>] brw_interpret+0xac3/0x2320 [osc]
<4> [<ffffffffa0546ee2>] ? ptlrpc_unregister_bulk+0xa2/0xac0 [ptlrpc]
<4> [<ffffffffa053f4bc>] ? ptlrpc_unregister_reply+0x6c/0x810 [ptlrpc]
<4> [<ffffffffa053e2a4>] ? ptlrpc_send_new_req+0x154/0x980 [ptlrpc]
<4> [<ffffffffa0540551>] ptlrpc_check_set+0x331/0x1be0 [ptlrpc]
<4> [<ffffffffa056e443>] ptlrpcd_check+0x3d3/0x610 [ptlrpc]
<4> [<ffffffffa056e8fa>] ptlrpcd+0x27a/0x500 [ptlrpc]
<4> [<ffffffff810672b0>] ? default_wake_function+0x0/0x20
<4> [<ffffffffa056e680>] ? ptlrpcd+0x0/0x500 [ptlrpc]
<4> [<ffffffff810a101e>] kthread+0x9e/0xc0
<4> [<ffffffff8100c28a>] child_rip+0xa/0x20
<4> [<ffffffff810a0f80>] ? kthread+0x0/0xc0
<4> [<ffffffff8100c280>] ? child_rip+0x0/0x20

Comment by Gerrit Updater [ 16/Sep/15 ]

Jinshan Xiong (jinshan.xiong@intel.com) uploaded a new patch: http://review.whamcloud.com/16456
Subject: LU-6271 osc: further OSC cleanup after eviction
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 9dd22234a098bb2bea26c4694d91edc928e027ac

Comment by Jinshan Xiong (Inactive) [ 16/Sep/15 ]

Hi Dongyang,

Please try patch 16456 and see if it can fix the problem.

Jinshan

Comment by Li Dongyang (Inactive) [ 18/Sep/15 ]

Hi Jinshan,
I'm using master which has 14989 landed already, plus patch set 3 of 16456:
The client crashed 5mins after I started the reproducer:
Sep 18 13:29:00 client kernel: LustreError: 16824:0:(ldlm_resource.c:887:ldlm_resource_complain()) testfs-OST0000-osc-ffff8800375c4000: namespace resource [0x303:0x0:0x0].0 (ffff88003d2abcc0) refcount nonzero (1) after lock cleanup; forcing cleanup.
Sep 18 13:29:00 client kernel: LustreError: 16824:0:(ldlm_resource.c:1502:ldlm_resource_dump()) — Resource: [0x303:0x0:0x0].0 (ffff88003d2abcc0) refcount = 3
Sep 18 13:29:00 client kernel: LustreError: 16824:0:(ldlm_resource.c:1505:ldlm_resource_dump()) Granted locks (in reverse order):
Sep 18 13:29:00 client kernel: LustreError: 16824:0:(ldlm_resource.c:1508:ldlm_resource_dump()) ### ### ns: testfs-OST0000-osc-ffff8800375c4000 lock: ffff88000b69d380/0x2104da78ff029aa9 lrc: 8/0,1 mode: PW/PW res: [0x303:0x0:0x0].0 rrc: 3 type: EXT [0->18446744073709551615] (req 0->1048575) flags: 0x126400000000 nid: local remote: 0x59a587f3f1d1d697 expref: -99 pid: 16588 timeout: 0 lvb_type: 1
Sep 18 13:29:00 client kernel: LustreError: 16824:0:(ldlm_resource.c:1502:ldlm_resource_dump()) — Resource: [0x303:0x0:0x0].0 (ffff88003d2abcc0) refcount = 2
Sep 18 13:29:00 client kernel: LustreError: 16824:0:(ldlm_resource.c:1505:ldlm_resource_dump()) Granted locks (in reverse order):
Sep 18 13:29:01 client kernel: LustreError: 13392:0:(osc_cache.c:3134:discard_cb()) page@ffff88003d5a7600[3 ffff88003a513b38 1 0 1 ffff88003a5d6b78]
Sep 18 13:29:01 client kernel:
Sep 18 13:29:01 client kernel: LustreError: 13392:0:(osc_cache.c:3134:discard_cb()) vvp-page@ffff88003d5a7650(0:0) vm@ffffea00004439e0 2000000000087d 3:0 ffff88003d5a7600 25088 lru
Sep 18 13:29:01 client kernel:
Sep 18 13:29:01 client kernel: LustreError: 13392:0:(osc_cache.c:3134:discard_cb()) lov-page@ffff88003d5a7690, raid0
Sep 18 13:29:01 client kernel:
Sep 18 13:29:01 client kernel: LustreError: 13392:0:(osc_cache.c:3134:discard_cb()) osc-page@ffff88003d5a76f8 25088: 1< 0x845fed 258 0 + - > 2< 102760448 0 4096 0x0 0x520 | (null) ffff88003c479500 ffff88003a517e20 > 3< 1 0 0 > 4< 0 9 8 18446744073642434560 + | + - + - > 5< + - + - | 0 - | 5635 - ->
Sep 18 13:29:01 client kernel:
Sep 18 13:29:01 client kernel: LustreError: 13392:0:(osc_cache.c:3134:discard_cb()) end page@ffff88003d5a7600
Sep 18 13:29:01 client kernel:
Sep 18 13:29:01 client kernel: LustreError: 13392:0:(osc_cache.c:3134:discard_cb()) discard dirty page?
Sep 18 13:29:01 client kernel: LustreError: 13392:0:(osc_cache.c:2447:osc_teardown_async_page()) extent ffff880039a18720@

{[25088 -> 25341/25343], [2|0|+|locking|wi|ffff88003a517e20], [1040384|254|+|-|ffff88000b69d580|256|ffff8800372b3520]}

trunc at 25088.
Sep 18 13:29:01 client kernel: LustreError: 13392:0:(osc_cache.c:2447:osc_teardown_async_page()) ### extent: ffff880039a18720
Sep 18 13:29:01 client kernel: ns: testfs-OST0000-osc-ffff8800375c4000 lock: ffff88000b69d580/0x2104da78ff029c0e lrc: 41/0,3 mode: PW/PW res: [0x303:0x0:0x0].0 rrc: 2 type: EXT [0->18446744073709551615] (req 102760448->103809023) flags: 0x20000000000 nid: local remote: 0x59a587f3f1d1d6ac expref: -99 pid: 16683 timeout: 0 lvb_type: 1
Sep 18 13:29:01 client kernel: LustreError: 13392:0:(osc_page.c:307:osc_page_delete()) page@ffff88003d5a7600[3 ffff88003a513b38 4 0 1 (null)]
Sep 18 13:29:01 client kernel:
Sep 18 13:29:01 client kernel: LustreError: 13392:0:(osc_page.c:307:osc_page_delete()) vvp-page@ffff88003d5a7650(0:0) vm@ffffea00004439e0 2000000000087d 3:0 ffff88003d5a7600 25088 lru
Sep 18 13:29:01 client kernel:
Sep 18 13:29:01 client kernel: LustreError: 13392:0:(osc_page.c:307:osc_page_delete()) lov-page@ffff88003d5a7690, raid0
Sep 18 13:29:01 client kernel:
Sep 18 13:29:01 client kernel: LustreError: 13392:0:(osc_page.c:307:osc_page_delete()) osc-page@ffff88003d5a76f8 25088: 1< 0x845fed 258 0 + - > 2< 102760448 0 4096 0x0 0x520 | (null) ffff88003c479500 ffff88003a517e20 > 3< 0 0 0 > 4< 0 9 8 18446744073642434560 + | + - + - > 5< + - + - | 0 - | 5635 - ->
Sep 18 13:29:01 client kernel:
Sep 18 13:29:01 client kernel: LustreError: 13392:0:(osc_page.c:307:osc_page_delete()) end page@ffff88003d5a7600
Sep 18 13:29:01 client kernel:
Sep 18 13:29:01 client kernel: LustreError: 13392:0:(osc_page.c:307:osc_page_delete()) Trying to teardown failed: -16
Sep 18 13:29:01 client kernel: LustreError: 13392:0:(osc_page.c:308:osc_page_delete()) ASSERTION( 0 ) failed:

Message from syslogd@client at Sep 18 13:29:01 ...
kernel:LustreError: 13392:0:(osc_page.c:308:osc_page_delete()) ASSERTION( 0 ) failed:
Sep 18 13:29:01 client kernel: LustreError: 13392:0:(osc_page.c:308:osc_page_delete()) LBUG
Sep 18 13:29:01 client kernel: Pid: 13392, comm: ldlm_bl_00
Sep 18 13:29:01 client kernel:
Sep 18 13:29:01 client kernel: Call Trace:
Sep 18 13:29:01 client kernel: [<ffffffffa10ad875>] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
Sep 18 13:29:01 client kernel: [<ffffffffa10ade77>] lbug_with_loc+0x47/0xb0 [libcfs]
Sep 18 13:29:01 client kernel: [<ffffffffa178bf9e>] osc_page_delete+0x46e/0x4e0 [osc]
Sep 18 13:29:01 client kernel: [<ffffffffa12019cd>] cl_page_delete0+0x7d/0x210 [obdclass]
Sep 18 13:29:01 client kernel: [<ffffffffa1201b9d>] cl_page_delete+0x3d/0x110 [obdclass]
Sep 18 13:29:01 client kernel: [<ffffffffa16b6d2d>] ll_invalidatepage+0x8d/0x160 [lustre]
Sep 18 13:29:01 client kernel: [<ffffffffa16c5d85>] vvp_page_discard+0xc5/0x160 [lustre]
Sep 18 13:29:01 client kernel: [<ffffffffa11fffc8>] cl_page_invoid+0x68/0x160 [obdclass]
Sep 18 13:29:01 client kernel: [<ffffffffa12000d3>] cl_page_discard+0x13/0x20 [obdclass]
Sep 18 13:29:01 client kernel: [<ffffffffa1797158>] discard_cb+0x88/0x1e0 [osc]
Sep 18 13:29:01 client kernel: [<ffffffffa1796f4e>] osc_page_gang_lookup+0x1ae/0x330 [osc]
Sep 18 13:29:01 client kernel: [<ffffffffa17970d0>] ? discard_cb+0x0/0x1e0 [osc]
Sep 18 13:29:01 client kernel: [<ffffffffa17973f4>] osc_lock_discard_pages+0x144/0x240 [osc]
Sep 18 13:29:01 client kernel: [<ffffffffa17970d0>] ? discard_cb+0x0/0x1e0 [osc]
Sep 18 13:29:01 client kernel: [<ffffffffa178e45b>] osc_lock_flush+0x8b/0x260 [osc]
Sep 18 13:29:01 client kernel: [<ffffffffa178e8d8>] osc_ldlm_blocking_ast+0x2a8/0x3c0 [osc]
Sep 18 13:29:01 client kernel: [<ffffffffa138ea57>] ldlm_cancel_callback+0x87/0x280 [ptlrpc]
Sep 18 13:29:01 client kernel: [<ffffffff81060530>] ? __dequeue_entity+0x30/0x50
Sep 18 13:29:01 client kernel: [<ffffffff8100969d>] ? __switch_to+0x7d/0x340
Sep 18 13:29:01 client kernel: [<ffffffffa13a184a>] ldlm_cli_cancel_local+0x8a/0x470 [ptlrpc]
Sep 18 13:29:01 client kernel: [<ffffffffa13a6480>] ldlm_cli_cancel+0x60/0x360 [ptlrpc]
Sep 18 13:29:01 client kernel: [<ffffffffa178e70b>] osc_ldlm_blocking_ast+0xdb/0x3c0 [osc]
Sep 18 13:29:01 client kernel: [<ffffffffa13aa380>] ldlm_handle_bl_callback+0x130/0x400 [ptlrpc]
Sep 18 13:29:01 client kernel: [<ffffffffa13aae64>] ldlm_bl_thread_main+0x484/0x700 [ptlrpc]
Sep 18 13:29:01 client kernel: [<ffffffff810672b0>] ? default_wake_function+0x0/0x20
Sep 18 13:29:01 client kernel: [<ffffffffa13aa9e0>] ? ldlm_bl_thread_main+0x0/0x700 [ptlrpc]
Sep 18 13:29:01 client kernel: [<ffffffff810a101e>] kthread+0x9e/0xc0
Sep 18 13:29:01 client kernel: [<ffffffff8100c28a>] child_rip+0xa/0x20

Comment by Jinshan Xiong (Inactive) [ 18/Sep/15 ]

Hi Dongyang,

it certainly lasted longer on my VM node

Please upload your reproducer and I will restart working on this issue once I get access to a real hardware.

Thanks,

Comment by Li Dongyang (Inactive) [ 18/Sep/15 ]

Hi Jinshan,
Hardware shouldn't matter as I'm reproducing it on my VMs.
Here are the scripts I used.
On client, I'm using IOR and when IOR dies because of eviction, just bring up new ones:

#!/bin/sh
while true
do
	num=$(ps aux | grep IOR | wc -l)
	while [ $num -lt 20 ]
	do
		/root/IOR/src/C/IOR -b 8g -w -e -E -t 1m -v -k -o /mnt/testfile &
		num=$(ps aux | grep IOR | wc -l)
	done
	sleep 1
done

Here I got 20 of them running at the same time.

On the OSS:

#!/bin/sh
while true
do	
	for ost in /proc/fs/lustre/obdfilter/*
	do
		if [ -n $(cat $ost/exports/<your client nid>/uuid) ]
		then
			echo $(cat $ost/exports/<your client nid>/uuid) > $ost/evict_client
		fi
	done
	sleep 10
done

As you can see I'm evicting the client over and over, and I'm using 10secs as the interval. Again you can change this.

Thanks
Dongyang

Comment by Jinshan Xiong (Inactive) [ 18/Sep/15 ]

I did very similar thing with iozone but they wrote to different files, let me try your reproducer.

Comment by Jinshan Xiong (Inactive) [ 18/Sep/15 ]

Please check the new patch and see if it can fix the problem.

Comment by Li Dongyang (Inactive) [ 22/Sep/15 ]

OK I've been running the scripts with patchset 5 of 16456 for some time, seems the general IO is fine.
But when I tried the group lock, the client crashed immediately after eviction:

<0>LustreError: 1697:0:(osc_cache.c:2907:osc_cache_writeback_range()) ASSERTION( !ext->oe_hp ) failed: 
<0>LustreError: 1697:0:(osc_cache.c:2907:osc_cache_writeback_range()) LBUG
<4>Pid: 1697, comm: ldlm_bl_11
<4>
<4>Call Trace:
<4> [<ffffffffa021d875>] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
<4> [<ffffffffa021de77>] lbug_with_loc+0x47/0xb0 [libcfs]
<4> [<ffffffffa0922085>] osc_cache_writeback_range+0x1275/0x1280 [osc]
<4> [<ffffffffa090b545>] osc_lock_flush+0x175/0x260 [osc]
<4> [<ffffffffa090b8d8>] osc_ldlm_blocking_ast+0x2a8/0x3c0 [osc]
<4> [<ffffffffa050ba57>] ldlm_cancel_callback+0x87/0x280 [ptlrpc]
<4> [<ffffffff81060530>] ? __dequeue_entity+0x30/0x50
<4> [<ffffffff8100969d>] ? __switch_to+0x7d/0x340
<4> [<ffffffffa051e84a>] ldlm_cli_cancel_local+0x8a/0x470 [ptlrpc]
<4> [<ffffffffa05234bc>] ldlm_cli_cancel+0x9c/0x3e0 [ptlrpc]
<4> [<ffffffffa090b70b>] osc_ldlm_blocking_ast+0xdb/0x3c0 [osc]
<4> [<ffffffff810672c2>] ? default_wake_function+0x12/0x20
<4> [<ffffffffa0527400>] ldlm_handle_bl_callback+0x130/0x400 [ptlrpc]
<4> [<ffffffffa0527ee4>] ldlm_bl_thread_main+0x484/0x700 [ptlrpc]
<4> [<ffffffff810672b0>] ? default_wake_function+0x0/0x20
<4> [<ffffffffa0527a60>] ? ldlm_bl_thread_main+0x0/0x700 [ptlrpc]
<4> [<ffffffff810a101e>] kthread+0x9e/0xc0
<4> [<ffffffff8100c28a>] child_rip+0xa/0x20
<4> [<ffffffff810a0f80>] ? kthread+0x0/0xc0
<4> [<ffffffff8100c280>] ? child_rip+0x0/0x20
<4>
<0>Kernel panic - not syncing: LBUG
<4>Pid: 1697, comm: ldlm_bl_11 Not tainted 2.6.32-573.3.1.el6.x86_64 #1
<4>Call Trace:
<4> [<ffffffff81537c54>] ? panic+0xa7/0x16f
<4> [<ffffffffa021decb>] ? lbug_with_loc+0x9b/0xb0 [libcfs]
<4> [<ffffffffa0922085>] ? osc_cache_writeback_range+0x1275/0x1280 [osc]
<4> [<ffffffffa090b545>] ? osc_lock_flush+0x175/0x260 [osc]
<4> [<ffffffffa090b8d8>] ? osc_ldlm_blocking_ast+0x2a8/0x3c0 [osc]
<4> [<ffffffffa050ba57>] ? ldlm_cancel_callback+0x87/0x280 [ptlrpc]
<4> [<ffffffff81060530>] ? __dequeue_entity+0x30/0x50
<4> [<ffffffff8100969d>] ? __switch_to+0x7d/0x340
<4> [<ffffffffa051e84a>] ? ldlm_cli_cancel_local+0x8a/0x470 [ptlrpc]
<4> [<ffffffffa05234bc>] ? ldlm_cli_cancel+0x9c/0x3e0 [ptlrpc]
<4> [<ffffffffa090b70b>] ? osc_ldlm_blocking_ast+0xdb/0x3c0 [osc]
<4> [<ffffffff810672c2>] ? default_wake_function+0x12/0x20
<4> [<ffffffffa0527400>] ? ldlm_handle_bl_callback+0x130/0x400 [ptlrpc]
<4> [<ffffffffa0527ee4>] ? ldlm_bl_thread_main+0x484/0x700 [ptlrpc]
<4> [<ffffffff810672b0>] ? default_wake_function+0x0/0x20
<4> [<ffffffffa0527a60>] ? ldlm_bl_thread_main+0x0/0x700 [ptlrpc]
<4> [<ffffffff810a101e>] ? kthread+0x9e/0xc0
<4> [<ffffffff8100c28a>] ? child_rip+0xa/0x20
<4> [<ffffffff810a0f80>] ? kthread+0x0/0xc0
<4> [<ffffffff8100c280>] ? child_rip+0x0/0x20
Comment by Jinshan Xiong (Inactive) [ 22/Sep/15 ]

Hi Dongyang, please upload your test cases.

Comment by Li Dongyang (Inactive) [ 23/Sep/15 ]

Hi Jinshan,
See my comment earlier on 28/Jul/15 8:39 PM.

Comment by Jinshan Xiong (Inactive) [ 24/Sep/15 ]

Thanks. Please check if the latest patch can fix the problem

Comment by Li Dongyang (Inactive) [ 24/Sep/15 ]

With patch set 6 pf 16456, the client won't crash with the gplck reproducer and single eviction.
However, the client crashes if:
1. run the gplck reproducer, evict the client once.
2. after client reconnects, don't kill the gplck, run another instance of gplck with a different gid.
3. evict the client again, the client crashes with the same stack trace ASSERTION( !ext->oe_hp ) failed

This makes me think that the problem should be fixed in the ldlm layer like http://review.whamcloud.com/#/c/14915/
not in the osc layer.
Thanks
Dongyang

Comment by Jinshan Xiong (Inactive) [ 24/Sep/15 ]

Hi Dongyang, the problem may be fixed in patch set 7 but feel free to use patch 14915 on your own site.

Comment by Jinshan Xiong (Inactive) [ 24/Sep/15 ]

this problem can only happen at eviction so even patch 14989 is good enough for daily use.

Comment by Jinshan Xiong (Inactive) [ 24/Sep/15 ]

Hi Dongyang, I took a look at your latest patch 14915 and I suggest you shouldn't apply this patch to your own site because it's not production ready yet.

Comment by Gerrit Updater [ 01/Oct/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16456/
Subject: LU-6271 osc: further OSC cleanup after eviction
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: e8b421531c166b91ab5c1f417570c544bcdd050c

Comment by Gerrit Updater [ 06/Oct/15 ]

Jinshan Xiong (jinshan.xiong@intel.com) uploaded a new patch: http://review.whamcloud.com/16727
Subject: LU-6271 osc: check oo_npages inside spin lock
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: e220fbbfa93069a783430d15a26dc3518006bc1c

Comment by Gerrit Updater [ 24/Oct/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16727/
Subject: LU-6271 osc: faulty assertion in osc_object_prune()
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: c5e84d53198142919b526fd304c6782005e38bdb

Comment by Peter Jones [ 25/Oct/15 ]

Landed for 2.8

Comment by Ian Costello [ 16/Nov/15 ]

This bug is not resolved. At a customer site today, one of the issues reported with the patch series was reproduced:

Here is the gathered information from one of the engineers:

Nov 13 21:22:32 r2i1n4 kernel: [41261.553520] LustreError: 11-0: work-OST0018-osc-ffff880f4a556c00: Communicating with 10.148.254.146@o2ib, operation obd_ping failed with -107.
Nov 13 21:22:32 r2i1n4 kernel: [41261.553537] Lustre: work-OST0018-osc-ffff880f4a556c00: Connection to work-OST0018 (at 10.148.254.146@o2ib) was lost; in progress operations using this service will wait for recovery to complete
Nov 13 21:22:32 r2i1n4 kernel: [41261.553744] LustreError: 167-0: work-OST0018-osc-ffff880f4a556c00: This client was evicted by work-OST0018; in progress operations using this service will fail.

Nov 13 21:22:19 oss3 kernel: LustreError: 0:0:(ldlm_lockd.c:344:waiting_locks_callback()) ### lock callback timer expired after 100s: evicting client at 10.148.4.3@o2ib ns: filter-work-OST0018_UUID lock: ffff881bf46fa1c0/0x1b850f2869999e97 lrc: 3/0,0 mode: PW/PW res: [0xcc6a24:0x0:0x0].0 rrc: 31 type: EXT [0->18446744073709551615] (req 0->18446744073709551615) flags: 0x60000080010020 nid: 10.148.4.3@o2ib remote: 0x7a3c9c39e0502fcc expref: 5 pid: 20187 timeout: 4335795111 lvb_type: 0

r2i1n4:~ # lctl dl
0 UP mgc MGC10.148.254.141@o2ib 2dc4c54f-dab6-1190-fca7-d7747093f936 5

35 UP osc work-OST0017-osc-ffff880f4a556c00 9d007967-5de8-eb2e-eaf9-99d4b17d74e6 5
36 IN osc work-OST0018-osc-ffff880f4a556c00 9d007967-5de8-eb2e-eaf9-99d4b17d74e6 5
37 UP osc work-OST0019-osc-ffff880f4a556c00 9d007967-5de8-eb2e-eaf9-99d4b17d74e6 5

r2i1n4:~ # lctl --device 36 activate
error: activate: failed: Invalid argument

r2i1n4:~ # cat /proc/fs/lustre/osc/work-OST0018-osc-ffff880f4a556c00/import
import:
name: work-OST0018-osc-ffff880f4a556c00
target: work-OST0018_UUID
state: EVICTED
instance: 21
connect_flags: [ write_grant, server_lock, version, request_portal, truncate_lock, max_byte_per_rpc, early_lock_cancel, adaptive_timeouts, alt_checksum_algorithm, fid_is_enabled, version_recovery, full20, layout_lock, 64bithash, object_max_bytes, jobstats, einprogress, lvb_type]
import_flags: [ invalid, replayable, pingable, connect_tried ]
connection:
failover_nids: [ 10.148.254.146@o2ib, 10.148.254.147@o2ib ]
current_connection: 10.148.254.146@o2ib
connection_attempts: 2
generation: 2
in-progress_invalidations: 1
rpcs:
inflight: 0
unregistering: 0
timeouts: 0
avg_waittime: 803 usec
service_estimates:
services: 1 sec
network: 1 sec
transactions:
last_replay: 0
peer_committed: 90194391109
last_checked: 90194391109
read_data_averages:
bytes_per_rpc: 19550
usec_per_rpc: 938
MB_per_sec: 20.84
write_data_averages:
bytes_per_rpc: 508
usec_per_rpc: 5386
MB_per_sec: 0.09

r2i1n4:~ # ps -ef | grep ll_imp_inval
root 832 2 0 Nov13 ? 00:00:00 [ll_imp_inval]
root 25849 25765 0 14:18 pts/0 00:00:00 grep ll_imp_inval

Nov 16 14:22:19 r2i1n4 kernel: [274907.717827] ll_imp_inval S ffff881ffc253b00 0 832 2 0x00000000
Nov 16 14:22:19 r2i1n4 kernel: [274907.717832] ffff881ffc34dc50 0000000000000046 ffff881ffc34c010 0000000000010900
Nov 16 14:22:19 r2i1n4 kernel: [274907.717838] 0000000000010900 0000000000010900 0000000000010900 ffff881ffc34dfd8
Nov 16 14:22:19 r2i1n4 kernel: [274907.717845] ffff881ffc34dfd8 0000000000010900 ffff881fd7ffa580 ffff881020f2c300
Nov 16 14:22:19 r2i1n4 kernel: [274907.717852] Call Trace:
Nov 16 14:22:19 r2i1n4 kernel: [274907.717879] [<ffffffffa0bcf361>] osc_object_invalidate+0x1c1/0x280 [osc]
Nov 16 14:22:19 r2i1n4 kernel: [274907.717907] [<ffffffffa0bb5bae>] osc_ldlm_resource_invalidate+0xae/0x170 [osc]
Nov 16 14:22:19 r2i1n4 kernel: [274907.717930] [<ffffffffa0716d68>] cfs_hash_for_each_relax+0x178/0x340 [libcfs]
Nov 16 14:22:19 r2i1n4 kernel: [274907.717971] [<ffffffffa0718fc0>] cfs_hash_for_each_nolock+0x70/0x1c0 [libcfs]
Nov 16 14:22:19 r2i1n4 kernel: [274907.718008] [<ffffffffa0bc989c>] osc_import_event+0xfac/0x1420 [osc]
Nov 16 14:22:19 r2i1n4 kernel: [274907.718064] [<ffffffffa0a88592>] ptlrpc_invalidate_import+0x292/0x890 [ptlrpc]
Nov 16 14:22:19 r2i1n4 kernel: [274907.718151] [<ffffffffa0a8a702>] ptlrpc_invalidate_import_thread+0x42/0x2e0 [ptlrpc]
Nov 16 14:22:19 r2i1n4 kernel: [274907.718197] [<ffffffff810843f6>] kthread+0x96/0xa0
Nov 16 14:22:19 r2i1n4 kernel: [274907.718205] [<ffffffff8146f364>] kernel_thread_helper+0x4/0x10

Comment by Ian Costello [ 16/Nov/15 ]

client messages

Comment by Ian Costello [ 16/Nov/15 ]

server message

Comment by Ian Costello [ 16/Nov/15 ]

uploaded 2 logs file detailing the problem, customer is running the ddn-ieel branch 2.5.39-ddn7.

Comment by Ian Costello [ 16/Nov/15 ]

In short, clients were evicted suddenly and the OSTs stayed INACTIVE for those clients until the clients were restarted forcibly.

Comment by Ian Costello [ 16/Nov/15 ]

NOTE: the 2.5.39-ddn7 has the patches:

20401c7 LU-6271 osc: faulty assertion in osc_object_prune()
b08341e LU-6271 osc: further OSC cleanup after eviction
42e9257 LU-6271 osc: handle osc eviction correctly

I think we should seriously consider using patch (written by Dongyang Li):
http://review.whamcloud.com/#/c/14915/

I am going to test the above patch at NCI, where we are able to reproduce the crash and inactive OST (due to client eviction)...

Comment by Jinshan Xiong (Inactive) [ 17/Nov/15 ]

From the log, obviously the root cause was a deadlock problem. It has nothing to do with these patches.

Nov 16 14:22:19 r2i1n4 kernel: [274907.716536] shald_dpd.out   D ffff88201d872010     0   825    772 0x00000000
Nov 16 14:22:19 r2i1n4 kernel: [274907.716541]  ffff88201d873c30 0000000000000082 ffff88201d872010 0000000000010900
Nov 16 14:22:19 r2i1n4 kernel: [274907.716548]  0000000000010900 0000000000010900 0000000000010900 ffff88201d873fd8
Nov 16 14:22:19 r2i1n4 kernel: [274907.716554]  ffff88201d873fd8 0000000000010900 ffff881fbd5ac440 ffff881020932600
Nov 16 14:22:19 r2i1n4 kernel: [274907.716561] Call Trace:
Nov 16 14:22:19 r2i1n4 kernel: [274907.716568]  [<ffffffff814651a8>] __mutex_lock_slowpath+0xf8/0x150
Nov 16 14:22:19 r2i1n4 kernel: [274907.716575]  [<ffffffff81464c3a>] mutex_lock+0x1a/0x40
Nov 16 14:22:19 r2i1n4 kernel: [274907.716585]  [<ffffffff810fd10a>] generic_file_aio_write+0x3a/0xb0
Nov 16 14:22:19 r2i1n4 kernel: [274907.716622]  [<ffffffffa0d51e2e>] vvp_io_write_start+0x12e/0x530 [lustre]
Nov 16 14:22:19 r2i1n4 kernel: [274907.716707]  [<ffffffffa088d539>] cl_io_start+0x69/0x140 [obdclass]
Nov 16 14:22:19 r2i1n4 kernel: [274907.716790]  [<ffffffffa0890993>] cl_io_loop+0xa3/0x190 [obdclass]
Nov 16 14:22:19 r2i1n4 kernel: [274907.716860]  [<ffffffffa0cf0cc7>] ll_file_io_generic+0x757/0x830 [lustre]
Nov 16 14:22:19 r2i1n4 kernel: [274907.716892]  [<ffffffffa0d01e14>] ll_file_aio_write+0x1b4/0x5d0 [lustre]
Nov 16 14:22:19 r2i1n4 kernel: [274907.716926]  [<ffffffffa0d02415>] ll_file_write+0x1e5/0x270 [lustre]
Nov 16 14:22:19 r2i1n4 kernel: [274907.716942]  [<ffffffff8115ed4e>] vfs_write+0xce/0x140
Nov 16 14:22:19 r2i1n4 kernel: [274907.716951]  [<ffffffff8115eec3>] sys_write+0x53/0xa0
Nov 16 14:22:19 r2i1n4 kernel: [274907.716958]  [<ffffffff8146e1f2>] system_call_fastpath+0x16/0x1b
Nov 16 14:22:19 r2i1n4 kernel: [274907.716971]  [<00007fffec69579d>] 0x7fffec69579c
Nov 16 14:22:19 r2i1n4 kernel: [274907.717055] shald_dpd.out   D ffff88201dc04010     0   826    772 0x00000000
Nov 16 14:22:19 r2i1n4 kernel: [274907.717060]  ffff88201dc05b70 0000000000000086 ffff88201dc04010 0000000000010900
Nov 16 14:22:19 r2i1n4 kernel: [274907.717067]  0000000000010900 0000000000010900 0000000000010900 ffff88201dc05fd8
Nov 16 14:22:19 r2i1n4 kernel: [274907.717073]  ffff88201dc05fd8 0000000000010900 ffff881fd7fce600 ffffffff81a11020
Nov 16 14:22:19 r2i1n4 kernel: [274907.717080] Call Trace:
Nov 16 14:22:19 r2i1n4 kernel: [274907.717087]  [<ffffffff814651a8>] __mutex_lock_slowpath+0xf8/0x150
Nov 16 14:22:19 r2i1n4 kernel: [274907.717094]  [<ffffffff81464c3a>] mutex_lock+0x1a/0x40
Nov 16 14:22:19 r2i1n4 kernel: [274907.717121]  [<ffffffffa0d1adb0>] ll_setattr_raw+0x2c0/0xb60 [lustre]
Nov 16 14:22:19 r2i1n4 kernel: [274907.717143]  [<ffffffff81178faf>] notify_change+0x19f/0x2f0
Nov 16 14:22:19 r2i1n4 kernel: [274907.717151]  [<ffffffff8115d517>] do_truncate+0x57/0x80
Nov 16 14:22:19 r2i1n4 kernel: [274907.717160]  [<ffffffff8116c053>] do_last+0x603/0x800
Nov 16 14:22:19 r2i1n4 kernel: [274907.717168]  [<ffffffff8116ceb9>] path_openat+0xd9/0x420
Nov 16 14:22:19 r2i1n4 kernel: [274907.717175]  [<ffffffff8116d33c>] do_filp_open+0x4c/0xc0
Nov 16 14:22:19 r2i1n4 kernel: [274907.717183]  [<ffffffff8115de5f>] do_sys_open+0x17f/0x250
Nov 16 14:22:19 r2i1n4 kernel: [274907.717191]  [<ffffffff8146e1f2>] system_call_fastpath+0x16/0x1b
Nov 16 14:22:19 r2i1n4 kernel: [274907.717202]  [<00007fffeb9057bd>] 0x7fffeb9057bc
Nov 16 14:22:19 r2i1n4 kernel: [274907.717285] shald_dpd.out   D 0000000000000000     0   827    772 0x00000000
Nov 16 14:22:19 r2i1n4 kernel: [274907.717290]  ffff881fbd5afa60 0000000000000086 ffff881fbd5ae010 0000000000010900
Nov 16 14:22:19 r2i1n4 kernel: [274907.717297]  0000000000010900 0000000000010900 0000000000010900 ffff881fbd5affd8
Nov 16 14:22:19 r2i1n4 kernel: [274907.717303]  ffff881fbd5affd8 0000000000010900 ffff881fa07c20c0 ffff881020fa2080
Nov 16 14:22:19 r2i1n4 kernel: [274907.717310] Call Trace:
Nov 16 14:22:19 r2i1n4 kernel: [274907.717318]  [<ffffffff814661a5>] rwsem_down_failed_common+0xb5/0x160
Nov 16 14:22:19 r2i1n4 kernel: [274907.717329]  [<ffffffff81264533>] call_rwsem_down_write_failed+0x13/0x20
Nov 16 14:22:19 r2i1n4 kernel: [274907.717337]  [<ffffffff814654bc>] down_write+0x1c/0x20
Nov 16 14:22:19 r2i1n4 kernel: [274907.717370]  [<ffffffffa0d51159>] vvp_io_setattr_start+0x129/0x170 [lustre]
Nov 16 14:22:19 r2i1n4 kernel: [274907.717447]  [<ffffffffa088d539>] cl_io_start+0x69/0x140 [obdclass]
Nov 16 14:22:19 r2i1n4 kernel: [274907.717528]  [<ffffffffa0890993>] cl_io_loop+0xa3/0x190 [obdclass]
Nov 16 14:22:19 r2i1n4 kernel: [274907.717605]  [<ffffffffa0d4905f>] cl_setattr_ost+0x24f/0x2b0 [lustre]
Nov 16 14:22:19 r2i1n4 kernel: [274907.717663]  [<ffffffffa0d1b2e4>] ll_setattr_raw+0x7f4/0xb60 [lustre]
Nov 16 14:22:19 r2i1n4 kernel: [274907.717683]  [<ffffffff81178faf>] notify_change+0x19f/0x2f0
Nov 16 14:22:19 r2i1n4 kernel: [274907.717692]  [<ffffffff8115d517>] do_truncate+0x57/0x80
Nov 16 14:22:19 r2i1n4 kernel: [274907.717699]  [<ffffffff8116c053>] do_last+0x603/0x800
Nov 16 14:22:19 r2i1n4 kernel: [274907.717708]  [<ffffffff8116ceb9>] path_openat+0xd9/0x420
Nov 16 14:22:19 r2i1n4 kernel: [274907.717715]  [<ffffffff8116d33c>] do_filp_open+0x4c/0xc0
Nov 16 14:22:19 r2i1n4 kernel: [274907.717723]  [<ffffffff8115de5f>] do_sys_open+0x17f/0x250
Nov 16 14:22:19 r2i1n4 kernel: [274907.717731]  [<ffffffff8146e1f2>] system_call_fastpath+0x16/0x1b 

You could try patch 14915 but most likely you're going to end up with the same problem.

Comment by Jinshan Xiong (Inactive) [ 17/Nov/15 ]

From the backtrace, the truncate process was waiting for i_alloc_sem while holding inode mutex but nobody should have held i_alloc_sem from the stack. Unfortunately I don't have a sle11-sp3 kernel source code on hand otherwise I could take a look.

One alternative way is to get a kernel dump when you see this problem and search the variable address of alloc_sem probably you can find it on some proc's stack.

Comment by Peter Jones [ 17/Nov/15 ]

To nip this in the bud - it seems like any ongoing work should move to a new ticket...

Comment by Jinshan Xiong (Inactive) [ 17/Nov/15 ]

To nip this in the bud - it seems like any ongoing work should move to a new ticket...

To be clear, the customer was using a build with their own patches, there is no evidence that this issue can be seen on master.

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