You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by mark <ma...@node.to> on 2004/01/16 18:14:21 UTC

[users@httpd] SHM attach problem on solaris 2.7

I have a strange problem with apr_shm_attach on Solaris 2.7.
This has ocurred in both httpd-2.0.47 and .48, and I was wondering if
anyone else has any experience with this.

I have a module that on start-up creates a segment of shared memory, which
all other forked children attach too. This occurs by switching on
apr_shm_create, and if that returns an exists, then attempts
apr_shm_attach. This works fine, other modules work the same way.
The code is similar to code in core apache modules that use SHM.

However, if later on (after the initial fork triggered by StartServers
directive), httpd decides it needs to fork another server process, this
process does not "see" the shared memory content. It throws no error on
attach, and does not create a new segment. However, this process cannot
modify the shared memory content, but instead appears to be modifying
a process-local memory instance of my shm struct.

It happens in both worker and forking mpms. As a work around, I use worker
mpm with fixed number of servers. This unfortunately leads to some memory
consumption issues.

If this is better targeted at the dev list, let me know.


  mark@node.to  http://node.to/~mark   7123 3F7B 10EC 7122 2F8B
  http://node.to/keys/mark.asc         B474 B09D 6ED7 3FB0 09E8


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] SHM attach problem on solaris 2.7

Posted by Robert Andersson <ro...@profundis.nu>.
mark wrote:
> ...snip...
> However, if later on (after the initial fork triggered by StartServers
> directive), httpd decides it needs to fork another server process, this
> process does not "see" the shared memory content. It throws no error on
> attach, and does not create a new segment. However, this process cannot
> modify the shared memory content, but instead appears to be modifying
> a process-local memory instance of my shm struct.
>
> ...snip...
>
> If this is better targeted at the dev list, let me know.

I haven't checked it, but if your assertion is valid, I think so, or perhaps
the bug database.

Regards,
Robet Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org