SUNRPC: add transport details to timeout diagnostics
Subsystems (3)
PATCH 1/1 SUNRPC: add transport details to timeout diagnostics
The existing RPC timeout messages identify only the RPC program and server name. That makes it difficult to distinguish a server-side response stall from a transport that is disconnected, reconnecting, or using a different connection.
Include the RPC client id, transport id, current transport connection cookie, and RPC task owner in the ratelimited timeout messages. These fields provide a compact way to correlate a timeout message with rpcctl and other transport state.
For example, an NFS timeout reports:
nfs: server 192.168.50.1 clid=4 xprt=1 cc=1 owner=6245 not responding, timed out
--- net/sunrpc/clnt.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
net/sunrpc/clnt.c +13 -7
@@ -2534,17 +2534,21 @@ static void rpc_check_timeout(struct rpc_task *task) {struct rpc_clnt *clnt = task->tk_client; +struct rpc_rqst *req; +struct rpc_xprt *xprt;if (RPC_SIGNALLED (task))return ; -if (xprt_adjust_timeout (task->tk_rqstp) ==0 ) + req = task->tk_rqstp; +if (xprt_adjust_timeout (req) ==0 )return ; + xprt = req->rq_xprt;trace_rpc_timeout_status (task); task->tk_timeouts++; -if (RPC_IS_SOFTCONN (task) && !rpc_check_connected (task->tk_rqstp)) { +if (RPC_IS_SOFTCONN (task) && !rpc_check_connected (req)) {rpc_call_rpcerror (task, -ETIMEDOUT );return ; }
@@ -2556,14 +2560,15 @@ rpc_check_timeout(struct rpc_task *task)* connection gets terminally broken. */ if ((task->tk_flags &RPC_TASK_NO_RETRANS_TIMEOUT ) && -rpc_check_connected (task->tk_rqstp)) +rpc_check_connected (req))return ;if (clnt->cl_chatty) {pr_notice_ratelimited ( -"%s: server %s not responding, timed out\n" , +"%s: server %s clid=%u xprt=%u cc=%u owner=%d not responding, timed out\n" , clnt->cl_program->name, - task->tk_xprt->servername); + xprt->servername, clnt->cl_clid, xprt->id, +READ_ONCE (xprt->connect_cookie), task->tk_owner); }if (task->tk_flags &RPC_TASK_TIMEOUT )rpc_call_rpcerror (task, -ETIMEDOUT );
@@ -2576,9 +2581,10 @@ rpc_check_timeout(struct rpc_task *task) task->tk_flags |=RPC_CALL_MAJORSEEN ;if (clnt->cl_chatty) {pr_notice_ratelimited ( -"%s: server %s not responding, still trying\n" , +"%s: server %s clid=%u xprt=%u cc=%u owner=%d not responding, still trying\n" , clnt->cl_program->name, - task->tk_xprt->servername); + xprt->servername, clnt->cl_clid, xprt->id, +READ_ONCE (xprt->connect_cookie), task->tk_owner); } }rpc_force_rebind (clnt);
Signature · 1 line
2.47.3
PATCH 1/1 SUNRPC: add transport details to timeout diagnostics
Quoted 10 lines
The existing RPC timeout messages identify only the RPC program and server name. That makes it difficult to distinguish a server-side response stall from a transport that is disconnected, reconnecting, or using a different connection.
Include the RPC client id, transport id, current transport connection cookie, and RPC task owner in the ratelimited timeout messages. These fields provide a compact way to correlate a timeout message with rpcctl and other transport state.
Quoted 4 lines
For example, an NFS timeout reports:
nfs: server 192.168.50.1 clid=4 xprt=1 cc=1 owner=6245 not responding, timed out
Nice improvement, thanks!
Quoted 12 lines
Assisted-by Codex:gpt-5Signed-off-by Manjunath Patil <[email protected]>--- net/sunrpc/clnt.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)net/sunrpc/clnt.c +0
-0
net/sunrpc/clnt.c static void · line 2538
Quoted 5 lines
net/sunrpc/clnt.c +2
-0@@ -2534,17 +2534,21 @@ static void rpc_check_timeout(struct rpc_task *task) {struct rpc_clnt *clnt = task->tk_client; +struct rpc_rqst *req; +struct rpc_xprt *xprt;
nit: Would it work to assign req and task earlier (just readability?) Or is it not safe before checking RPC_SIGNALLED(task)?
struct rpc_clnt *clnt = task->tk_client; struct rpc_rqst *req = task->tk_rqstp; struct rpc_xprt *xprt = req->rq_xprt;
The rest LGTM.
Kind regards,
Petr
Quoted 50 lines
net/sunrpc/clnt.c +11
-7if (RPC_SIGNALLED (task))return ; -if (xprt_adjust_timeout (task->tk_rqstp) ==0 ) + req = task->tk_rqstp; +if (xprt_adjust_timeout (req) ==0 )return ; + xprt = req->rq_xprt;trace_rpc_timeout_status (task); task->tk_timeouts++; -if (RPC_IS_SOFTCONN (task) && !rpc_check_connected (task->tk_rqstp)) { +if (RPC_IS_SOFTCONN (task) && !rpc_check_connected (req)) {rpc_call_rpcerror (task, -ETIMEDOUT );return ; }@@ -2556,14 +2560,15 @@ rpc_check_timeout(struct rpc_task *task)* connection gets terminally broken. */ if ((task->tk_flags &RPC_TASK_NO_RETRANS_TIMEOUT ) && -rpc_check_connected (task->tk_rqstp)) +rpc_check_connected (req))return ;if (clnt->cl_chatty) {pr_notice_ratelimited ( -"%s: server %s not responding, timed out\n" , +"%s: server %s clid=%u xprt=%u cc=%u owner=%d not responding, timed out\n" , clnt->cl_program->name, - task->tk_xprt->servername); + xprt->servername, clnt->cl_clid, xprt->id, +READ_ONCE (xprt->connect_cookie), task->tk_owner); }if (task->tk_flags &RPC_TASK_TIMEOUT )rpc_call_rpcerror (task, -ETIMEDOUT );@@ -2576,9 +2581,10 @@ rpc_check_timeout(struct rpc_task *task) task->tk_flags |=RPC_CALL_MAJORSEEN ;if (clnt->cl_chatty) {pr_notice_ratelimited ( -"%s: server %s not responding, still trying\n" , +"%s: server %s clid=%u xprt=%u cc=%u owner=%d not responding, still trying\n" , clnt->cl_program->name, - task->tk_xprt->servername); + xprt->servername, clnt->cl_clid, xprt->id, +READ_ONCE (xprt->connect_cookie), task->tk_owner); } }rpc_force_rebind (clnt);
Quoted 46 lines · Petr Vorel
Quoted 1 line
The existing RPC timeout messages identify only the RPC program and >
server name. That makes it difficult to distinguish a server-side > response stall from a transport that is disconnected, reconnecting, > or using a different
Quoted 10 lines
The existing RPC timeout messages identify only the RPC program and server name. That makes it difficult to distinguish a server-side response stall from a transport that is disconnected, reconnecting, or using a different connection.
Include the RPC client id, transport id, current transport connection cookie, and RPC task owner in the ratelimited timeout messages. These fields provide a compact way to correlate a timeout message with rpcctl and other transport state.
Quoted 4 lines
For example, an NFS timeout reports:
nfs: server 192.168.50.1 clid=4 xprt=1 cc=1 owner=6245 not responding, timed out
Nice improvement, thanks!
Quoted 12 lines
Assisted-by Codex:gpt-5Signed-off-by Manjunath Patil <[email protected]>--- net/sunrpc/clnt.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)net/sunrpc/clnt.c +0
-0net/sunrpc/clnt.c static void · line 2538
Quoted 5 lines
net/sunrpc/clnt.c +2
-0@@ -2534,17 +2534,21 @@ static void rpc_check_timeout(struct rpc_task *task) {struct rpc_clnt *clnt = task->tk_client; +struct rpc_rqst *req; +struct rpc_xprt *xprt;nit: Would it work to assign req and task earlier (just readability?) Or is it not safe before checking
RPC_SIGNALLED(task)?struct rpc_clnt *clnt = task->tk_client; struct rpc_rqst *req = task->tk_rqstp; struct rpc_xprt *xprt = req->rq_xprt;
Quoted 5 lines
The rest LGTM.
Reviewed-by Petr Vorel <[email protected]>Kind regards,
Petr
Hi Petr,
Thanks for the review and the Reviewed-by tag.
I kept the assignments after RPC_SIGNALLED(task) intentionally, preserving the existing behavior where a signalled task returns before we dereference task->tk_rqstp. xprt is also needed only after xprt_adjust_timeout(req) reports an expired timeout.
I would prefer to retain the current ordering for those reasons. Also I am open if maintainers chose to alter it.
Thanks,
Manjunath
Quoted 53 lines
Quoted 52 lines
net/sunrpc/clnt.c +11
-7if (RPC_SIGNALLED (task))return ; -if (xprt_adjust_timeout (task->tk_rqstp) ==0 ) + req = task->tk_rqstp; +if (xprt_adjust_timeout (req) ==0 )return ; + xprt = req->rq_xprt;trace_rpc_timeout_status (task); task->tk_timeouts++; -if (RPC_IS_SOFTCONN (task) && !rpc_check_connected (task->tk_rqstp)) { +if (RPC_IS_SOFTCONN (task) && !rpc_check_connected (req)) {rpc_call_rpcerror (task, -ETIMEDOUT );return ; }@@ -2556,14 +2560,15 @@ rpc_check_timeout(struct rpc_task *task)* connection gets terminally broken. */ if ((task->tk_flags &RPC_TASK_NO_RETRANS_TIMEOUT ) && -rpc_check_connected (task->tk_rqstp)) +rpc_check_connected (req))return ;if (clnt->cl_chatty) {pr_notice_ratelimited ( -"%s: server %s not responding, timed out\n" , +"%s: server %s clid=%u xprt=%u cc=%u owner=%d not responding, timed out\n" , clnt->cl_program->name, - task->tk_xprt->servername); + xprt->servername, clnt->cl_clid, xprt->id, +READ_ONCE (xprt->connect_cookie), task->tk_owner); }if (task->tk_flags &RPC_TASK_TIMEOUT )rpc_call_rpcerror (task, -ETIMEDOUT );@@ -2576,9 +2581,10 @@ rpc_check_timeout(struct rpc_task *task) task->tk_flags |=RPC_CALL_MAJORSEEN ;if (clnt->cl_chatty) {pr_notice_ratelimited ( -"%s: server %s not responding, still trying\n" , +"%s: server %s clid=%u xprt=%u cc=%u owner=%d not responding, still trying\n" , clnt->cl_program->name, - task->tk_xprt->servername); + xprt->servername, clnt->cl_clid, xprt->id, +READ_ONCE (xprt->connect_cookie), task->tk_owner); } }rpc_force_rebind (clnt);
Quoted 51 lines · Petr Vorel
Quoted 47 lines
Quoted 1 line
The existing RPC timeout messages identify only the RPC program and >
server name. That makes it difficult to distinguish a server-side > response stall from a transport that is disconnected, reconnecting, > or using a different
Quoted 10 lines
The existing RPC timeout messages identify only the RPC program and server name. That makes it difficult to distinguish a server-side response stall from a transport that is disconnected, reconnecting, or using a different connection.
Include the RPC client id, transport id, current transport connection cookie, and RPC task owner in the ratelimited timeout messages. These fields provide a compact way to correlate a timeout message with rpcctl and other transport state.
Quoted 4 lines
For example, an NFS timeout reports:
nfs: server 192.168.50.1 clid=4 xprt=1 cc=1 owner=6245 not responding, timed out
Nice improvement, thanks!
Quoted 11 lines
Assisted-by Codex:gpt-5Signed-off-by Manjunath Patil <[email protected]>--- net/sunrpc/clnt.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)net/sunrpc/clnt.c +0
-0net/sunrpc/clnt.c static void · line 2538
Quoted 5 lines
net/sunrpc/clnt.c +2
-0@@ -2534,17 +2534,21 @@ static void rpc_check_timeout(struct rpc_task *task) {struct rpc_clnt *clnt = task->tk_client; +struct rpc_rqst *req; +struct rpc_xprt *xprt;nit: Would it work to assign req and task earlier (just readability?) Or is it not safe before checking
RPC_SIGNALLED(task)?struct rpc_clnt *clnt = task->tk_client; struct rpc_rqst *req = task->tk_rqstp; struct rpc_xprt *xprt = req->rq_xprt;
Quoted 7 lines
Quoted 5 lines
The rest LGTM.
Reviewed-by Petr Vorel <[email protected]>Kind regards,
PetrHi Petr,
Hi Manjunath,
Quoted 1 line
Thanks for the review and the Reviewed-by tag.
yw.
Quoted 4 lines
I kept the assignments after
RPC_SIGNALLED(task)intentionally, preserving the existing behavior where a signalled task returns before we dereferencetask->tk_rqstp. xprt is also needed only afterxprt_adjust_timeout(req)reports an expired timeout.
Understand, fair enough.
Quoted 2 lines
I would prefer to retain the current ordering for those reasons. Also I am open if maintainers chose to alter it.
+1
Kind regards,
Petr
Quoted 48 lines
Thanks, Manjunath
Quoted 45 lines
Quoted 45 lines
net/sunrpc/clnt.c +11
-7if (RPC_SIGNALLED (task))return ; -if (xprt_adjust_timeout (task->tk_rqstp) ==0 ) + req = task->tk_rqstp; +if (xprt_adjust_timeout (req) ==0 )return ; + xprt = req->rq_xprt;trace_rpc_timeout_status (task); task->tk_timeouts++; -if (RPC_IS_SOFTCONN (task) && !rpc_check_connected (task->tk_rqstp)) { +if (RPC_IS_SOFTCONN (task) && !rpc_check_connected (req)) {rpc_call_rpcerror (task, -ETIMEDOUT );return ; }@@ -2556,14 +2560,15 @@ rpc_check_timeout(struct rpc_task *task)* connection gets terminally broken. */ if ((task->tk_flags &RPC_TASK_NO_RETRANS_TIMEOUT ) && -rpc_check_connected (task->tk_rqstp)) +rpc_check_connected (req))return ;if (clnt->cl_chatty) {pr_notice_ratelimited ( -"%s: server %s not responding, timed out\n" , +"%s: server %s clid=%u xprt=%u cc=%u owner=%d not responding, timed out\n" , clnt->cl_program->name, - task->tk_xprt->servername); + xprt->servername, clnt->cl_clid, xprt->id, +READ_ONCE (xprt->connect_cookie), task->tk_owner); }if (task->tk_flags &RPC_TASK_TIMEOUT )rpc_call_rpcerror (task, -ETIMEDOUT );@@ -2576,9 +2581,10 @@ rpc_check_timeout(struct rpc_task *task) task->tk_flags |=RPC_CALL_MAJORSEEN ;if (clnt->cl_chatty) {pr_notice_ratelimited ( -"%s: server %s not responding, still trying\n" , +"%s: server %s clid=%u xprt=%u cc=%u owner=%d not responding, still trying\n" , clnt->cl_program->name, - task->tk_xprt->servername); + xprt->servername, clnt->cl_clid, xprt->id, +READ_ONCE (xprt->connect_cookie), task->tk_owner); } }rpc_force_rebind (clnt);
Quoted 56 lines · Petr Vorel
Quoted 1 line
On 8/20/26 4: 13 AM, Petr Vorel wrote: > > > The existing RPC timeout
messages identify only the RPC program and > > > server name. That makes it difficult to distinguish a server-side > > > response stall from
Quoted 51 lines · Petr Vorel
Quoted 50 lines
Quoted 1 line
The existing RPC timeout messages identify only the RPC program and >
server name. That makes it difficult to distinguish a server-side > response stall from a transport that is disconnected, reconnecting, > or using a different
Quoted 10 lines
The existing RPC timeout messages identify only the RPC program and server name. That makes it difficult to distinguish a server-side response stall from a transport that is disconnected, reconnecting, or using a different connection.
Include the RPC client id, transport id, current transport connection cookie, and RPC task owner in the ratelimited timeout messages. These fields provide a compact way to correlate a timeout message with rpcctl and other transport state.
Quoted 4 lines
For example, an NFS timeout reports:
nfs: server 192.168.50.1 clid=4 xprt=1 cc=1 owner=6245 not responding, timed out
Nice improvement, thanks!
Quoted 11 lines
Assisted-by Codex:gpt-5Signed-off-by Manjunath Patil <[email protected]>--- net/sunrpc/clnt.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)net/sunrpc/clnt.c +0
-0net/sunrpc/clnt.c static void · line 2538
Quoted 5 lines
net/sunrpc/clnt.c +2
-0@@ -2534,17 +2534,21 @@ static void rpc_check_timeout(struct rpc_task *task) {struct rpc_clnt *clnt = task->tk_client; +struct rpc_rqst *req; +struct rpc_xprt *xprt;nit: Would it work to assign req and task earlier (just readability?) Or is it not safe before checking
RPC_SIGNALLED(task)?struct rpc_clnt *clnt = task->tk_client; struct rpc_rqst *req = task->tk_rqstp; struct rpc_xprt *xprt = req->rq_xprt;The rest LGTM.
Reviewed-by Petr Vorel <[email protected]>
Hi Trond, Anna, and Chuck,
Could you please let me know the next steps for this patch submission? Should I wait longer for review, or are there any formatting or submission issues that I need to fix?
I also noticed that the Patchwork event shows the patch as "Not Applicable":
https://patchwork.kernel.org/api/1.2/events/?patch=14757794
Could you clarify what that means for this submission?
Thanks,
Manjunath
Quoted 76 lines
Quoted 4 lines
Quoted 2 lines
Kind regards,
PetrHi Petr,
Hi Manjunath,
Quoted 1 line
Thanks for the review and the Reviewed-by tag.
yw.
Quoted 4 lines
I kept the assignments after
RPC_SIGNALLED(task)intentionally, preserving the existing behavior where a signalled task returns before we dereferencetask->tk_rqstp. xprt is also needed only afterxprt_adjust_timeout(req)reports an expired timeout.Understand, fair enough.
Quoted 2 lines
I would prefer to retain the current ordering for those reasons. Also I am open if maintainers chose to alter it.
+1
Kind regards,
PetrQuoted 48 lines
Thanks, Manjunath
Quoted 45 lines
Quoted 45 lines
net/sunrpc/clnt.c +11
-7if (RPC_SIGNALLED (task))return ; -if (xprt_adjust_timeout (task->tk_rqstp) ==0 ) + req = task->tk_rqstp; +if (xprt_adjust_timeout (req) ==0 )return ; + xprt = req->rq_xprt;trace_rpc_timeout_status (task); task->tk_timeouts++; -if (RPC_IS_SOFTCONN (task) && !rpc_check_connected (task->tk_rqstp)) { +if (RPC_IS_SOFTCONN (task) && !rpc_check_connected (req)) {rpc_call_rpcerror (task, -ETIMEDOUT );return ; }@@ -2556,14 +2560,15 @@ rpc_check_timeout(struct rpc_task *task)* connection gets terminally broken. */ if ((task->tk_flags &RPC_TASK_NO_RETRANS_TIMEOUT ) && -rpc_check_connected (task->tk_rqstp)) +rpc_check_connected (req))return ;if (clnt->cl_chatty) {pr_notice_ratelimited ( -"%s: server %s not responding, timed out\n" , +"%s: server %s clid=%u xprt=%u cc=%u owner=%d not responding, timed out\n" , clnt->cl_program->name, - task->tk_xprt->servername); + xprt->servername, clnt->cl_clid, xprt->id, +READ_ONCE (xprt->connect_cookie), task->tk_owner); }if (task->tk_flags &RPC_TASK_TIMEOUT )rpc_call_rpcerror (task, -ETIMEDOUT );@@ -2576,9 +2581,10 @@ rpc_check_timeout(struct rpc_task *task) task->tk_flags |=RPC_CALL_MAJORSEEN ;if (clnt->cl_chatty) {pr_notice_ratelimited ( -"%s: server %s not responding, still trying\n" , +"%s: server %s clid=%u xprt=%u cc=%u owner=%d not responding, still trying\n" , clnt->cl_program->name, - task->tk_xprt->servername); + xprt->servername, clnt->cl_clid, xprt->id, +READ_ONCE (xprt->connect_cookie), task->tk_owner); } }rpc_force_rebind (clnt);
Chuck Lever
maintainerQuoted 5 lines · On Mon, Aug 31, 2026, at 3:33 PM, [email protected] wrote:
I also noticed that the Patchwork event shows the patch as "Not Applicable":
https://patchwork.kernel.org/api/1.2/events/?patch=14757794
Could you clarify what that means for this submission?
The kernel patchwork service applies only to NFSD. Your patch is for the Linux NFS client, so it’s “Not Applicable” to NFSD. The NFS client maintainers need to respond to your review request.
Quoted 64 lines · On 8/31/26 12:33 PM, [email protected] wrote:
Quoted 58 lines · Petr Vorel
> On 8/20/26 4: 13 AM, Petr Vorel wrote: > > > The existing RPC timeout messages identify only the RPC program and > > > server name. That makes it difficult to distinguish a server-side > > > response stall from
Quoted 54 lines · Petr Vorel
Quoted 1 line
> The existing RPC timeout messages identify only the RPC program
and >
Quoted 11 lines
server name. That makes it difficult to distinguish a server-side > response stall from a transport that is disconnected, reconnecting, or using a different
Quoted 6 lines
The existing RPC timeout messages identify only the RPC program and server name. That makes it difficult to distinguish a server-side response stall from a transport that is disconnected, reconnecting, or using a different connection.
Include the RPC client id, transport id, current transport
connection
Quoted 1 line
Quoted 1 line
cookie, and RPC task owner in the ratelimited timeout messages.
These
Quoted 37 lines
Quoted 7 lines
fields provide a compact way to correlate a timeout message with rpcctl and other transport state.
For example, an NFS timeout reports:
nfs: server 192.168.50.1 clid=4 xprt=1 cc=1 owner=6245 not responding, timed out
Nice improvement, thanks!
Quoted 11 lines
Assisted-by Codex:gpt-5Signed-off-by Manjunath Patil <[email protected]>---
net/sunrpc/clnt.c| 20 +++++++++++++-------1 file changed, 13 insertions(+), 7 deletions(-)net/sunrpc/clnt.c +0
-0net/sunrpc/clnt.c static void · line 2538
Quoted 5 lines
net/sunrpc/clnt.c +2
-0@@ -2534,17 +2534,21 @@ static void rpc_check_timeout(struct rpc_task *task) { struct rpc_clnt *clnt = task->tk_client; + struct rpc_rqst *req; + struct rpc_xprt *xprt;nit: Would it work to assign req and task earlier (just readability?) Or is it not safe before checking
RPC_SIGNALLED(task)?struct rpc_clnt *clnt =
task->tk_client;
struct rpc_rqst *req =task->tk_rqstp;
struct rpc_xprt *xprt =req->rq_xprt;The rest LGTM.
Reviewed-by Petr Vorel <[email protected]>Hi Trond, Anna, and Chuck,
Could you please let me know the next steps for this patch submission? Should I wait longer for review, or are there any formatting or submission issues that I need to fix?
Quoted 8 lines
I also noticed that the Patchwork event shows the patch as "Not Applicable":
https://patchwork.kernel.org/api/1.2/events/?patch=14757794
Could you clarify what that means for this submission?
Thanks,
Manjunath
Hi Trond and Anna,
I am following up on this SUNRPC client patch. Petr Vorel reviewed it, and his question about the placement of the request and transport assignments was resolved in the thread.
Chuck clarified that the Patchwork "Not Applicable" state reflects NFSD tracking and does not indicate a decision on this NFS client patch.
Could you let me know whether this patch is suitable for the NFS client queue, or if you would like any changes or additional testing? I am happy to send a revised version if needed.
Thanks,
Manjunath
Quoted 81 lines
Quoted 80 lines
Quoted 5 lines
Quoted 3 lines
Kind regards,
PetrHi Petr,
Hi Manjunath,
Quoted 1 line
Thanks for the review and the Reviewed-by tag.
yw.
Quoted 4 lines
I kept the assignments after
RPC_SIGNALLED(task)intentionally, preserving the existing behavior where a signalled task returns before we dereferencetask->tk_rqstp. xprt is also needed only afterxprt_adjust_timeout(req)reports an expired timeout.Understand, fair enough.
Quoted 2 lines
I would prefer to retain the current ordering for those reasons. Also I am open if maintainers chose to alter it.
+1
Kind regards,
PetrQuoted 51 lines
Thanks, Manjunath
Quoted 11 lines
net/sunrpc/clnt.c static void
Quoted 10 lines
net/sunrpc/clnt.c +3
-2if (RPC_SIGNALLED(task)) return; - if (xprt_adjust_timeout(task->tk_rqstp) == 0) + req = task->tk_rqstp; + if (xprt_adjust_timeout(req) == 0) return; + xprt = req->rq_xprt; trace_rpc_timeout_status(task); task->tk_timeouts++; - if (RPC_IS_SOFTCONN(task) && !rpc_check_connected(task-
tk_rqstp)) {Quoted 15 lines
Quoted 7 lines
net/sunrpc/clnt.c +1
-0+ if (RPC_IS_SOFTCONN(task) && !rpc_check_connected(req)) { rpc_call_rpcerror(task, -ETIMEDOUT); return; }@@ -2556,14 +2560,15 @@ rpc_check_timeout(struct rpc_task *task)* connection gets terminally broken. */ Quoted 8 lines
if ((
task->tk_flags&RPC_TASK_NO_RETRANS_TIMEOUT) && -rpc_check_connected(task->tk_rqstp))
+rpc_check_connected(req))
return;
if (clnt->cl_chatty) { pr_notice_ratelimited(
- "%s: server %s not responding, timed out\n", + "%s: server %s clid=%u xprt=%u cc=%u owner=%dnot responding, timed out\n",
Quoted 5 lines
Quoted 5 lines
clnt->cl_program->name,
-task->tk_xprt->servername);
+xprt->servername,clnt->cl_clid,xprt->id, +READ_ONCE(xprt->connect_cookie),task->tk_owner); }Quoted 8 lines
Quoted 8 lines
if (
task->tk_flags&RPC_TASK_TIMEOUT)rpc_call_rpcerror(task, -ETIMEDOUT);net/sunrpc/clnt.c +0
-0@@ -2576,9 +2581,10 @@ rpc_check_timeout(struct rpc_task *task) task->tk_flags |= RPC_CALL_MAJORSEEN; if (clnt->cl_chatty) {pr_notice_ratelimited(
- "%s: server %s not responding, still trying\n", + "%s: server %s clid=%u xprt=%u cc=%u owner=%dnot responding, still trying\n",
Quoted 7 lines
Quoted 7 lines
clnt->cl_program->name,
-task->tk_xprt->servername);
+xprt->servername,clnt->cl_clid,xprt->id, +READ_ONCE(xprt->connect_cookie),task->tk_owner); }
}
rpc_force_rebind(clnt);
Anna Schumaker
maintainerHi Manjunath,
Quoted 70 lines · Manjunath Patil
The existing RPC timeout messages identify only the RPC program and server name. That makes it difficult to distinguish a server-side response stall from a transport that is disconnected, reconnecting, or using a different connection.
Include the RPC client id, transport id, current transport connection cookie, and RPC task owner in the ratelimited timeout messages. These fields provide a compact way to correlate a timeout message with rpcctl and other transport state.
For example, an NFS timeout reports:
nfs: server 192.168.50.1 clid=4 xprt=1 cc=1 owner=6245 not responding, timed out
Assisted-by Codex:gpt-5Signed-off-by Manjunath Patil <[email protected]>--- net/sunrpc/clnt.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)net/sunrpc/clnt.c +10
-5@@ -2534,17 +2534,21 @@ static void rpc_check_timeout(struct rpc_task *task) {struct rpc_clnt *clnt = task->tk_client; +struct rpc_rqst *req; +struct rpc_xprt *xprt;if (RPC_SIGNALLED (task))return ; -if (xprt_adjust_timeout (task->tk_rqstp) ==0 ) + req = task->tk_rqstp; +if (xprt_adjust_timeout (req) ==0 )return ; + xprt = req->rq_xprt;trace_rpc_timeout_status (task); task->tk_timeouts++; -if (RPC_IS_SOFTCONN (task) && !rpc_check_connected (task->tk_rqstp)) { +if (RPC_IS_SOFTCONN (task) && !rpc_check_connected (req)) {rpc_call_rpcerror (task, -ETIMEDOUT );return ; }@@ -2556,14 +2560,15 @@ rpc_check_timeout(struct rpc_task *task)* connection gets terminally broken. */ if ((task->tk_flags &RPC_TASK_NO_RETRANS_TIMEOUT ) && -rpc_check_connected (task->tk_rqstp)) +rpc_check_connected (req))return ;if (clnt->cl_chatty) {pr_notice_ratelimited ( -"%s: server %s not responding, timed out\n" , + "%s: server %s clid=%u xprt=%u cc=%u owner=%d not responding, timed out\n", clnt->cl_program->name, - task->tk_xprt->servername); + xprt->servername, clnt->cl_clid, xprt->id, +READ_ONCE (xprt->connect_cookie), task->tk_owner); }if (task->tk_flags &RPC_TASK_TIMEOUT )net/sunrpc/clnt.c +0
-0rpc_call_rpcerror (task, -ETIMEDOUT );
net/sunrpc/clnt.c rpc_check_timeout(struct rpc_task *task) · line 2585
Quoted 6 lines
net/sunrpc/clnt.c +1
-1@@ -2576,9 +2581,10 @@ rpc_check_timeout(struct rpc_task *task) task->tk_flags |=RPC_CALL_MAJORSEEN ; if (clnt->cl_chatty) { pr_notice_ratelimited( - "%s: server %s not responding, still trying\n", + "%s: server %s clid=%u xprt=%u cc=%u owner=%d not responding, still trying\n",
More observability around this makes sense. Any reason you're adding to the notice here and not making it a new tracepoint for the extra information? I'm worried people might have tooling around watching for unresponsive servers and this might break whatever regexes they're using to look for this.
Anna
Quoted 9 lines
net/sunrpc/clnt.c +2
-1clnt->cl_program->name, - task->tk_xprt->servername); + xprt->servername, clnt->cl_clid, xprt->id, + READ_ONCE(xprt->connect_cookie), task->tk_owner); } }
rpc_force_rebind(clnt);Signature · 1 line
2.47.3
Quoted 85 lines · Anna Schumaker
Hi Manjunath,
Quoted 70 lines · Manjunath Patil
The existing RPC timeout messages identify only the RPC program and server name. That makes it difficult to distinguish a server-side response stall from a transport that is disconnected, reconnecting, or using a different connection.
Include the RPC client id, transport id, current transport connection cookie, and RPC task owner in the ratelimited timeout messages. These fields provide a compact way to correlate a timeout message with rpcctl and other transport state.
For example, an NFS timeout reports:
nfs: server 192.168.50.1 clid=4 xprt=1 cc=1 owner=6245 not responding, timed out
Assisted-by Codex:gpt-5Signed-off-by Manjunath Patil <[email protected]>--- net/sunrpc/clnt.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)net/sunrpc/clnt.c +10
-5@@ -2534,17 +2534,21 @@ static void rpc_check_timeout(struct rpc_task *task) {struct rpc_clnt *clnt = task->tk_client; +struct rpc_rqst *req; +struct rpc_xprt *xprt;if (RPC_SIGNALLED (task))return ; -if (xprt_adjust_timeout (task->tk_rqstp) ==0 ) + req = task->tk_rqstp; +if (xprt_adjust_timeout (req) ==0 )return ; + xprt = req->rq_xprt;trace_rpc_timeout_status (task); task->tk_timeouts++; -if (RPC_IS_SOFTCONN (task) && !rpc_check_connected (task->tk_rqstp)) { +if (RPC_IS_SOFTCONN (task) && !rpc_check_connected (req)) {rpc_call_rpcerror (task, -ETIMEDOUT );return ; }@@ -2556,14 +2560,15 @@ rpc_check_timeout(struct rpc_task *task)* connection gets terminally broken. */ if ((task->tk_flags &RPC_TASK_NO_RETRANS_TIMEOUT ) && -rpc_check_connected (task->tk_rqstp)) +rpc_check_connected (req))return ;if (clnt->cl_chatty) {pr_notice_ratelimited ( -"%s: server %s not responding, timed out\n" , + "%s: server %s clid=%u xprt=%u cc=%u owner=%d not responding, timed out\n", clnt->cl_program->name, - task->tk_xprt->servername); + xprt->servername, clnt->cl_clid, xprt->id, +READ_ONCE (xprt->connect_cookie), task->tk_owner); }if (task->tk_flags &RPC_TASK_TIMEOUT )rpc_call_rpcerror(task, -ETIMEDOUT);net/sunrpc/clnt.c rpc_check_timeout(struct rpc_task *task) · line 2585
Quoted 6 lines
net/sunrpc/clnt.c +1
-1@@ -2576,9 +2581,10 @@ rpc_check_timeout(struct rpc_task *task) task->tk_flags |=RPC_CALL_MAJORSEEN ; if (clnt->cl_chatty) { pr_notice_ratelimited( - "%s: server %s not responding, still trying\n", + "%s: server %s clid=%u xprt=%u cc=%u owner=%d not responding, still trying\n",More observability around this makes sense. Any reason you're adding to the notice here and not making it a new tracepoint for the extra information? I'm worried people might have tooling around watching for unresponsive servers and this might break whatever regexes they're using to look for this.
Quoted 1 line
Anna
Hi Anna,
We added these identifiers to the ratelimited notice so they would be available in ordinary production logs after an intermittent NFS outage. A tracepoint would help only if tracing had been enabled and retained beforehand. In our investigation, the existing notice identified the server but not which RPC client, transport, or connection generation was involved.
I understand the concern about log parsers. The patch retains the notice's opening and closing phrases, though some parsers may still depend on its exact format. I considered a separate log line, but that would add noise to production logs.
Thanks,
Manjunath
Quoted 10 lines
Quoted 10 lines
net/sunrpc/clnt.c +2
-1clnt->cl_program->name, - task->tk_xprt->servername); + xprt->servername, clnt->cl_clid, xprt->id, + READ_ONCE(xprt->connect_cookie), task->tk_owner); } }
rpc_force_rebind(clnt);Signature · 1 line
2.47.3