Red Hat Bugzilla – Bug 65544
clnt_call() returns Failure in multithread environment on RH7.2
Last modified: 2016-11-24 09:51:50 EST
Description of Problem:
I have a multi-threaded client, in which I create
CLIENT handle in the first thread, and then use
clnt_call in other child-threads to access server.
If the clnt_create() and clnt_call() are invoked in the same thread then
clnt_call() returns success.
On Linux RH7.1 there is no problem. but it's giving problem on RH7.2 (2.4.7-10
#1 Thu Sep 6 17:21:28 EDT 2001 i586).
Version-Release number of selected component (if applicable):
Call clnt_create() in one thread and get the CLIENT pointer then call clnt_call
() in another thread by passing the same CLIENT pointer. It returns Failure.
Steps to Reproduce:
clnt_call() returns FAILURE.
clnt_call() should return SUCCESS.
clnt_call is not a kernel function.
Also it's recommended to upgrade to at least kernel 2.4.9-31 which is released
*** Bug 65545 has been marked as a duplicate of this bug. ***
I have create an attachment for the bug #65545 and the details of the
attachment is as follows.
+Created an attachment (id=58665)
+new.tar file has the sample to reproduce the Bug.
Just follow the steps below to reproduce the Bug:
1. run "compile" - to compile the sample.
2. run "dateproc & " - to run the RPC server
3. run "rdate hostname" - to run the client. (Hostname must the machine name
where the dateproc server is running.
You will get an error saying that clnt_call() failed.
Since this is related to mutlithreading, I suspect this is of kernel problem.
*** Bug 65880 has been marked as a duplicate of this bug. ***
Not kernel definitely
Still weird in 8.0..
This is intentional. The RPC interfaces are misdesigned. To allow using the
code in multi-threaded environments the relevant data is thread local. Yes,
this is incompatible from what was in 7.1 but that's life. RPC in
multi-threaded apps ebfore 7.2 was completely unsupported.