Bug 65880 - multithreaded clnt_call failure on RH7.2
Summary: multithreaded clnt_call failure on RH7.2
Status: CLOSED DUPLICATE of bug 65544
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
(Show other bugs)
Version: 7.2
Hardware: i586 Linux
high
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-06-03 18:05 UTC by Konda Reddy
Modified: 2016-11-24 15:01 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 18:49:00 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
This file is a tar file and it contains the sample to reproduce the problem (110.00 KB, patch)
2002-06-03 18:07 UTC, Konda Reddy
no flags Details | Diff

Description Konda Reddy 2002-06-03 18:05:46 UTC
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 secondary thread to access server. clnt_call
() return failure.
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 (kernel 
level- 2.4.9-31 - i586). 

Version-Release number of selected component (if applicable):
Redhat 7.2

How Reproducible:
The problem is reproducible in a simple multi threaded RPC program.

I am attaching new.tar file. Just run compile script to compile the programs.
Steps to Reproduce:
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 be the machine name 
where the dateproc server is running.


Actual Results:
clnt_call() Returns Failure.

Expected Results:
It should return SUCCESS.

Additional Information:
Here is the results when I run the sample:
[no-view] KONDAR@tintin> dateproc &
[1] 13294
[no-view] KONDAR@tintin> rdate tintin
Before clnt_create  in main thread 
clnt_call  failed  at   date_clnt.c[22]
tintin: RPC: Can't encode arguments
time on host tintin = 1023127658
time on host tintin = Mon Jun  3 23:37:38 2002

Comment 1 Konda Reddy 2002-06-03 18:07:48 UTC
Created attachment 59405 [details]
This file is a tar file and it contains the sample to reproduce the problem

Comment 2 Jakub Jelinek 2002-06-04 09:15:37 UTC
Older glibc's didn't support multithreaded RPC properly.
In recent glibc's, each thread has its own RPC state, so you have to clnt_create
in the thread you want to use it.

Comment 3 Konda Reddy 2002-06-04 09:43:48 UTC
Hi Jakub,

Is there any alternative way to use CLIENT handle created in other threads ?

Basically, In my application I create CLIENT handle in main thread and keep on 
calling clnt_call() in secondary thread in regular interval. This is to make 
sure that the server is alive.

It would be nice if you could suggest something here. I am really stuck with 
problem :-(

Thanks,
Konda.

Comment 4 Konda Reddy 2002-06-04 12:43:54 UTC
If that is the case, how it is working fine with RedHat 7.1 ?

My application is huge one and I am just porting it from Redhat 7.1 to 7.2 and 
I hit this problem.


Comment 5 Alan Cox 2002-12-15 20:48:43 UTC

*** This bug has been marked as a duplicate of 65544 ***

Comment 6 Red Hat Bugzilla 2006-02-21 18:49:00 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.


Note You need to log in before you can comment on or make changes to this bug.