[LU-7760] Incorrect pid printing in ptlrpc_send_new_req Created: 08/Feb/16  Updated: 19/Jul/17  Resolved: 19/Jul/17

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

Type: Bug Priority: Trivial
Reporter: Oleg Drokin Assignee: Sebastien Buisson (Inactive)
Resolution: Fixed Votes: 0
Labels: easy, hackathon2017

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

It appears that ptlrpc_send_new_req message prints pid as always 0:

00000100:00080000:5.0:1454959735.275832:0:27539:0:(client.c:1385:ptlrpc_send_new
_req()) @@@ req from PID 0 waiting for recovery: (FULL != DISCONN)  req@ffff8800
3f386b80 x1525630506782200/t0(0) o13->lustre-OST0000-osc-ffff8800cdc0f000@192.16
8.10.227@tcp:7/4 lens 224/368 e 0 to 0 dl 0 ref 1 fl Rpc:W/0/ffffffff rc 0/-1

This is because the message itself is printed before we set the value in the request:

                DEBUG_REQ(D_HA, req, "req from PID %d waiting for recovery: "
                          "(%s != %s)", lustre_msg_get_status(req->rq_reqmsg),
                          ptlrpc_import_state_name(req->rq_send_state),
                          ptlrpc_import_state_name(imp->imp_state));
                LASSERT(list_empty(&req->rq_list));
                list_add_tail(&req->rq_list, &imp->imp_delayed_list);
                atomic_inc(&req->rq_import->imp_inflight);
                spin_unlock(&imp->imp_lock);
                RETURN(0);
        }
...
        lustre_msg_set_status(req->rq_reqmsg, current_pid());

As such we should either move the set_status before that printing or just do current_pid() in that message which is likely even better.



 Comments   
Comment by Oleg Drokin [ 08/Feb/16 ]

I guess since current pid is part of the message header, we might not even need to print it at all?

Comment by Gerrit Updater [ 30/May/17 ]

Sebastien Buisson (sbuisson@ddn.com) uploaded a new patch: https://review.whamcloud.com/27336
Subject: LU-7760 ptlrpc: remove incorrect pid printing
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 4ed4cc995f466ab93dcefcf2822fb293734794eb

Comment by Gerrit Updater [ 19/Jul/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/27336/
Subject: LU-7760 ptlrpc: remove incorrect pid printing
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 3283170eeb05eb701197d981fa773b86f63c8a33

Comment by Peter Jones [ 19/Jul/17 ]

Landed for 2.11

Generated at Sat Feb 10 02:11:41 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.