Kerberos failing pthreads assert when running in php+Apache2? (Mac OS X 10.4.5)

Ken Raeburn raeburn at MIT.EDU
Wed Mar 15 14:40:14 EST 2006

On Mar 15, 2006, at 11:44, Jonathan Williams wrote:
> I've been using a port of phpkrb5 (PHP3/4) to PHP5 (http://
> ~12 K, run `phpize` to
> make all the Makefiles, etc.). This is *REALLY SIMPLE* code.
> One of Apple's most recent updates to Tiger seems to have caused
> Kerberos within the Apache2 context to fail a pthreads assertation.
> (However, applications using mod_auth_kerberos for HTTP
> Authentication are working fine still.)

 From the fact that you mention disabling thread support in Kerberos,  
I assume you're building and installing a copy of krb5 from MIT,  
rather than using the version of KfM included with the operating system?

It occurs to me that the problems you describe could arise if two  
versions of the Kerberos libraries were loaded into the same address  
space, and symbol name resolution pointed some of the MIT functions  
at support symbols provided by the KfM framework.  I.e., we call a  
routine for initializing a mutex, the routine is in one library  
version and initializes that library's copy of the mutex, then we  
directly examine the mutex, but we get pointed to the other copy of  
the mutex in the other library.

If you built krb5 from MIT, I assume you wound up linking static  
libraries into your PHP module rather than linking against dynamic  
libraries, since our last release should only build static libraries  
for the Mac?

Is it possible that both the Kerberos framework and your freshly  
built krb5 library are being loaded into the same process?  (What is  
mod_auth_kerberos using?)  Ideally, that ought to work okay, if  
dynamic objects are loaded in a way that keeps the namespaces  
separated.  But I don't have a convenient apache+php build setup  
lying around to test what might be happening in your case.


More information about the Kerberos mailing list