[LU-13494] osp_invalidate_request() races with osp_update_fini() Created: 30/Apr/20  Updated: 21/Mar/23  Resolved: 21/Mar/23

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

Type: Bug Priority: Minor
Reporter: Alex Zhuravlev Assignee: Alex Zhuravlev
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-15201 osp_invalidate() calling into mutex w... Open
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   
BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
...
RIP: 0010:osp_invalidate_request+0x74/0x3e0 [osp]
Code: 00 48 8b 43 08 48 8d 7c 24 20 4c 8d 6d 10 8b 70 18 e8 f0 51 39 ff 85 c0 0f 88 5d 01 00 00 4c 89 ef e8 60 bc 97 e0 48 8b 45 00 <48> 8b 30 4c 8d b8 60 ff ff ff 48 39 c5 49 89 c6 48 8d 8e 60 ff ff
RSP: 0018:ffff88023d453df8 EFLAGS: 00010286
RAX: 0000000000000000 RBX: ffff88021b36e000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffffa0e1a4e0 RDI: 0000000000000282
RBP: ffff88024ccf6c00 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000000 R12: ffff88023d453e08
R13: ffff88024ccf6c10 R14: ffffffff00000100 R15: 00000000000007cf
FS:  0000000000000000(0000) GS:ffff88024f200000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000024cfdd000 CR4: 00000000000006b0
Call Trace:
 osp_import_event+0x337/0x340 [osp]
 ptlrpc_invalidate_import+0x29b/0x980 [ptlrpc]
 ? wait_woken+0x90/0x90
 ptlrpc_invalidate_import_thread+0x3e/0x1c0 [ptlrpc]
 kthread+0x105/0x140
 ? ptlrpc_import_recovery_state_machine+0x960/0x960 [ptlrpc]
 ? kthread_flush_work_fn+0x10/0x10
 ret_from_fork+0x24/0x30

that's because import invalidation runs in a dedicated context and not synchronize with main cleanup thread calling into osp_update_fini()



 Comments   
Comment by Gerrit Updater [ 09/Nov/21 ]

"Alex Zhuravlev <bzzz@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45499
Subject: LU-13494 osp: wait for import invalidation
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 42a7119ff22a3b39d280bd7370c79669cb0d24c6

Comment by Gerrit Updater [ 21/Mar/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/45499/
Subject: LU-13494 osp: wait for import invalidation
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 0682d7d6bc64bb75777f05ffb423779bbe781063

Comment by Peter Jones [ 21/Mar/23 ]

Landed for 2.16

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