[prev in list] [next in list] [prev in thread] [next in thread] 

List:       krb5-bugs
Subject:    [krbdev.mit.edu #8027] Client RPC timeout during kadmin listprincs command
From:       "Greg Hudson via RT" <rt-comment () krbdev ! mit ! edu>
Date:       2015-02-26 19:50:27
Message-ID: rt-8027-42373.11.9192991320139 () krbdev ! mit ! edu
[Download RAW message or body]

It might be best to avoid quoting large portions of the existing 
thread when replying to krb5-bugs messages; it harder to read the web 
display of the ticket.

I took a look at the relevant code today.  My findings are:

* clnt_tcp.c always calls select() with a non-null timeout parameter.  
So it would be easier to raise the timeout value to a large number 
than it would be to eliminate the timeout entirely.

* The currently operative timeout comes from the "TIMEOUT" variable 
(not a macro, despite the all-caps name) in 
lib/kadm5/clnt/client_rpc.c.

* This value could be overridden by calling clnt_control() with 
CLSET_TIMEOUT on the client handle in client_init.c.

* As a side note, the generic clnt_create() calls clnt_control() with 
CLSET_TIMEOUT on the resulting handle, which is mystifying since it 
defeats the purpose of remembering whether the caller wanted to 
override the default timeout or not.  Other RPC implementations 
(libtirpc, OpenSolaris) don't appear to do this.  This doesn't really 
matter since we don't use clnt_create() in kadmin; we call 
clnttcp_create() directly.

* The hardcoded timeout used to be 25 seconds.  We changed it to 120 
seconds (in both client_rpc.c and clnt_generic.c) in release 1.7.

My plan is:

* In one commit, add a call to clnt_control() in client_init.c 
changing the timeout to 3600 seconds.

* In a second commit, revert the TMIEOUT variable in client_rpc.c to 
25 (to match what rpcgen originally regenerated) and remove the calls 
to clnt_control() in clnt_generic.c.  This won't have any significant 
practical effect and is just for hygiene.
_______________________________________________
krb5-bugs mailing list
krb5-bugs@mit.edu
https://mailman.mit.edu/mailman/listinfo/krb5-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic