apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject Re: cvs commit: apr/include/arch/unix shm.h
Date Wed, 23 Jan 2002 05:56:53 GMT
On Wed, Jan 23, 2002 at 12:28:34AM -0500, Jeff Trawick wrote:
> aaron@apache.org writes:
> 
> > aaron       02/01/22 16:03:40
> > 
> >   Modified:    shmem/unix shm.c
> >                include/arch/unix shm.h
> >   Log:
> >   Major updates to the Unix shmem implementation:
> 
> AIX with worker, Linux with prefork:
> 
> [crit] (17)File exists: Fatal error: could not open(create) scoreboard
> 
> On the Linux box I had an existing apache_runtime_status file.  Once I
> removed it manually it would start/stop normally.
> 
> Cleanup or not, apr_shm_create() probably needs to try to yank the
> file first since we might have gone down previously without running
> cleanups.
> 
> Or if you want to fail the create when the file exists in case the
> shared memory is active, I guess the Apache startup code could yank
> the file before calling apr_shm_create().

This could happen in APR or in the app. I was already thinking we
may need to add a params flag to apr_shm_create(), perhaps we need
these also?

I did not intend the scoreboard to use name-based memory, since on
Unix it is not necessary and apache makes enough of a distinction
between fork() and non-fork() based platforms to make this possible.
I will commit the patch I posted a few days ago to httpd to solve this
problem, and will come up with a better solution in the next couple days.

-aaron

> Or don't use O_CREAT|O_EXCL.
> 
> I dunno.
> 
> On AIX, even if I manually remove apache_runtime_status Apache won't
> start.
> 
> I followed it through with dbx and it is shmget() which is returning
> EEXIST.  This is supposed to mean:
> 
> "A shared memory identifier exists for the Key parameter, and both the
> IPC_CREAT and IPC_EXCL flags are set in the SharedMemoryFlag
> parameter."

Mime
View raw message