httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f_los_ch <>
Subject Re: worker slotmem_grab failed (2.4.1) [Patch: proxy_balancer 2.4.2 SHM]
Date Fri, 13 Apr 2012 08:37:33 GMT
Hello again,

I can finally come up with a patch (attached) that solves the issue for
me. Anyone mind to point out potential concerns regarding the patch?

After some debugging-mess with printing the memory addresses, I noticed
that the workers grab a slot even if they did that before in the
iteration for the first virtual host - reassigning and thus wasting the
old value of worker->s.
I thus wanted to check whether worker->s is the unshared initial memory
subject to be replaced or a SHM already. As I did not find any suitable
flag, I managed it using storage->dptr() and the index (which is 0 for
the initial, private memory).

It is now the first time that I can use httpd > 2.3.16 with balancers
and more than one virtual host.

Kind regards,
Florian Schröder

Am Donnerstag, den 23.02.2012, 19:23 +0100 schrieb f_los_ch: 
> Hi together,
> I'm trying to get my reverse-proxy running with the new httpd 2.4.1,
> that aborts now with "worker slotmem_grab failed".
> When looking at mod_proxy_balancer:
> It looks like each balancer creates the SHM for its number of workers (1
> in my case) using its unique ->sname. After that, each worker grabs a
> slot from this.
> I have several virtual hosts pointing to the same balancer (by rewrite
> [P]). So, the second time, the balancer calls shm's slotmem_create again
> with its name, that already exists -> kind-of noop.
> Now, the SHM under the balancer's name has still only 1 slot (that is
> already occupied).
> When the worker now wants to (re-)grab its slot, I get:
> [slotmem_shm:debug] mod_slotmem_shm.c(575): AH02293: slotmem(...) grab
> failed. Num 1/num_free 0 [proxy_balancer:emerg] (22)Invalid argument:
> AH01186: worker slotmem_grab failed 
> Please note that my explanation should only be considered as an educated
> guess for the reason of the error - there might be other obvious causes
> that I have overseen.
> Has anyone similar issues? Any suggestions?
> Thanks in advance,
> Florian
> $ httpd -V Server version: Apache/2.4.1 (Unix) Server built:   Feb 23
> 2012 18:21:48 Server's Module Magic Number: 20120211:0 Server loaded:
> APR 1.4.5, APR-UTIL 1.4.1 Compiled using: APR 1.4.5, APR-UTIL 1.4.1
> Architecture:   32-bit Server MPM:     event   threaded:     yes (fixed
> thread count)     forked:     yes (variable process count) 

View raw message