KERB V5 + SEGV_MAPERR

Cesar Garcia Cesar.Garcia at morganstanley.com
Wed Feb 6 08:42:47 EST 2002


The mutex keeps multiple threads from simultaneously entering
a mutexed code segment.

This problem has more to do with how errno is defined. Keep in mind
that most system calls (e.g., stat, fork, open, etc)  set errno on
failure (this is done implicitly, since errno is not passed in as
an argument to the system call).

In non-multithreaded apps, it's reasonable for errno to be defined
as a global variable, since it's not possible for multiple systems
calls to be invoked concurrently.

In multithreaded apps, this is a problem. Since your libs are not
build with -D_REENTRANT, the kerberos libs are referencing the
global errno, instead of the thread specific errno which stat is
actually using. Hence your problem.

>>>>> "Christopher" == Christopher Burke <craznar at hotmail.com> writes:

Christopher> Cesar.Garcia at morganstanley.com (Cesar Garcia) wrote in 
Christopher> news:15456.35709.443260.168630 at imus.ms.com:

>> 
>> I gather your application is multithreaded, or at least built
>> with threads in mind ...
>> 
>> You should build your kerberos libs with -D_REENTRANT.

Christopher> Yes my application is multi-threaded however I do have a mutex around the 
Christopher> entire call to the kerberos stuff ... shouldn't that help ?



Christopher> -- 
Christopher> ---
Christopher> /* Christopher Burke - Spam Mail to craznar at hotmail.com
Christopher> |* www.craznar.com - 
Christopher> \* Real mail to cburke(at)craznar(dot)com
Christopher> _______________________________________________
Christopher> Kerberos mailing list
Christopher> Kerberos at mit.edu
Christopher> http://mailman.mit.edu/mailman/listinfo/kerberos



More information about the Kerberos mailing list