[LU-15986] Race condition between _debug_req() and ptlrpc_req_drop_rs() Created: 30/Jun/22  Updated: 22/Nov/22  Resolved: 24/Sep/22

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

Type: Bug Priority: Critical
Reporter: Feng Lei Assignee: Feng Lei
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
Related
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Two execution paths about req->rq_repmsg:

Path 1 happens when server receives a resent request:

 ptlrpc_main()-> ptlrpc_server_handle_req_in()->ptlrpc_server_request_add()->ptlrpc_server_check_resend_in_progress()->_debug_req(tmp)

Path 2 happens when server sends reply and drop the rs:

 ptlrpc_server_finish_request()->ptlrpc_server_drop_request()->ptlrpc_server_free_request()->ptlrpc_req_drop_rs()

 req->rq_repmsg is not protected well in ptlrpc_req_drop_rs()



 Comments   
Comment by Gerrit Updater [ 30/Jun/22 ]

"Feng, Lei <flei@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/47839
Subject: LU-15986 ptlrpc: protect rq_repmsg in ptlrpc_req_drop_rs()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 05f38bf79b585f8c13d741d30f487437b413ad3b

Comment by Peter Jones [ 18/Aug/22 ]

flei are the test failures on the master patch due to the patch itself?

Comment by Feng Lei [ 22/Aug/22 ]

I don't think so. LU-16100 to track it.

Comment by Gerrit Updater [ 24/Sep/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/47839/
Subject: LU-15986 ptlrpc: protect rq_repmsg in ptlrpc_req_drop_rs()
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: aaef545cff2dd958418ec9fb364d4bbe1408edb9

Comment by Peter Jones [ 24/Sep/22 ]

Landed for 2.16

Comment by Gerrit Updater [ 15/Nov/22 ]

"Xing Huang <hxing@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49157
Subject: LU-15986 ptlrpc: protect rq_repmsg in ptlrpc_req_drop_rs()
Project: fs/lustre-release
Branch: b2_15
Current Patch Set: 1
Commit: 9aecd005de286162dc4ff9d3a5bc12b6076582f1

Comment by Gerrit Updater [ 15/Nov/22 ]

"Xing Huang <hxing@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49158
Subject: LU-15986 ptlrpc: protect rq_repmsg in ptlrpc_req_drop_rs()
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: 74ef48e7c6e86f2d4a3c5dcce5c8387f3f89e6e8

Comment by Gerrit Updater [ 22/Nov/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49157/
Subject: LU-15986 ptlrpc: protect rq_repmsg in ptlrpc_req_drop_rs()
Project: fs/lustre-release
Branch: b2_15
Current Patch Set:
Commit: b9df7a08de6d119302be7bbe6b53061caa3ad758

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