You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by ap...@insode.de on 2003/07/23 03:16:07 UTC

trylock does not work on RH 9

Hi,

I am writing an Apache 2.0 module and have problems with the mutex_trylock 
functions.

apr_global_mutex_lock() and apr_global_mutex_unlock() work but
apr_global_mutex_trylock() segfaults the apache2 childs on my RedHat 9 box.

Any help is welcome... is this a bug or do I have to use trylock() with 
different arguments than lock() ?

Greetings,
 Reinhard

-- 

Liberté, Egalité, Fraternité
http://www.againsttcpa.com/what-is-tcpa.html

Re: trylock does not work on RH 9

Posted by Joe Orton <jo...@manyfish.co.uk>.
On Thu, Jul 24, 2003 at 11:51:18AM +0100, David Reid wrote:
> > On Wed, Jul 23, 2003 at 03:16:07AM +0200, apr@insode.de wrote:
> > > Hi,
> > >
> > > I am writing an Apache 2.0 module and have problems with the
> mutex_trylock
> > > functions.
> > >
> > > apr_global_mutex_lock() and apr_global_mutex_unlock() work but
> > > apr_global_mutex_trylock() segfaults the apache2 childs on my RedHat 9
> box.
> > >
> > > Any help is welcome... is this a bug or do I have to use trylock() with
> > > different arguments than lock() ?
> >
> > This is an APR bug, thanks for the report.  apr_proc_mutex_trylock will
> > always segfault in the various Unix implementations, so
> > apr_global_mutex_trylock is simply not usable yet unfortunately.
> 
> Do we know why and can it be fixed?

$ grep tryacquire locks/unix/proc_mutex.c
    NULL, /* no tryacquire */
    NULL, /* no tryacquire */
/* TODO: Add proc_mutex_proc_pthread_tryacquire(apr_proc_mutex_t *mutex)
*/
    NULL, /* no tryacquire */
    NULL, /* no tryacquire */
    NULL, /* no tryacquire */
    return mutex->meth->tryacquire(mutex);



Re: trylock does not work on RH 9

Posted by David Reid <da...@jetnet.co.uk>.
> On Wed, Jul 23, 2003 at 03:16:07AM +0200, apr@insode.de wrote:
> > Hi,
> >
> > I am writing an Apache 2.0 module and have problems with the
mutex_trylock
> > functions.
> >
> > apr_global_mutex_lock() and apr_global_mutex_unlock() work but
> > apr_global_mutex_trylock() segfaults the apache2 childs on my RedHat 9
box.
> >
> > Any help is welcome... is this a bug or do I have to use trylock() with
> > different arguments than lock() ?
>
> This is an APR bug, thanks for the report.  apr_proc_mutex_trylock will
> always segfault in the various Unix implementations, so
> apr_global_mutex_trylock is simply not usable yet unfortunately.

Do we know why and can it be fixed?

david



Re: trylock does not work on RH 9

Posted by Joe Orton <jo...@redhat.com>.
On Wed, Jul 23, 2003 at 03:16:07AM +0200, apr@insode.de wrote:
> Hi,
> 
> I am writing an Apache 2.0 module and have problems with the mutex_trylock 
> functions.
> 
> apr_global_mutex_lock() and apr_global_mutex_unlock() work but
> apr_global_mutex_trylock() segfaults the apache2 childs on my RedHat 9 box.
> 
> Any help is welcome... is this a bug or do I have to use trylock() with 
> different arguments than lock() ?

This is an APR bug, thanks for the report.  apr_proc_mutex_trylock will
always segfault in the various Unix implementations, so
apr_global_mutex_trylock is simply not usable yet unfortunately.

joe