[OpenAFS-devel] libadmin, rx and AFS_PTHREAD_ENV on linux.

Jeffrey Hutzelman jhutz@cmu.edu
Wed, 16 Mar 2005 19:22:09 -0500


On Thursday, March 10, 2005 02:59:39 PM -0500 Derrick J Brashear 
<shadow@dementia.org> wrote:

> On Thu, 3 Mar 2005, Ken Aaker wrote:
>
>> | Another thing I ran into using libadmin looks like it was caused by
>> a locking problem in the rx library running in a pthread user
>> environment.
>>
>> In a call to util_CMListCellsBegin that's I get a hard loop in
>> rxi_WriteProc(), that seems to be because the rxi_AllocSendPacket()
>> function never succeeds.
>
> That's.... odd. I see no reason it should not succeed.
>
>> I assume the next step is to try turning on AFS_PTHREAD_ENV? It doesn't
>> seem to be turned on, and when I step through the rx functions with the
>> debugger, the lock statments seem to missing.
>
> Yes, I suspect there's a reason it won't just work but it's probably a
> start.


You must pick exactly one of LWP or pthreads, and make sure that you use 
the correct set of libraries.

libafsadminutil.a is a pthread-using library
librx.a is an LWP-using rx
They cannot be used together.

If your program uses pthreads, use libafsadminutil.a and libafsrpc.a
If your program uses LWP, use the appropriate LWP libraries for whatever 
you are trying to do (libprot, libvldb, libvolser, etc) along with librx 
and liblwp.


-- Jeffrey T. Hutzelman (N3NHS) <jhutz+@cmu.edu>
   Sr. Research Systems Programmer
   School of Computer Science - Research Computing Facility
   Carnegie Mellon University - Pittsburgh, PA