You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Tianyin Xu <ti...@cs.ucsd.edu> on 2012/03/21 08:47:10 UTC

[users@httpd] Unable to create or access scoreboard (anonymous shared memory failure)

Hi, all.

I did a hard reboot because of system crash... and my Apache httpd-2.4.1
cannot start with the following error message:

[Wed Mar 21 00:42:56.034927 2012] [core:crit] [pid 32253:tid
140720646657856] (22)Invalid argument: AH00004: Unable to create or access
scoreboard (anonymous shared memory failure)

It seems that my shared memory is corrupted?

Can anyone tell me how to repair and make apache to work?

Thanks in advance!
Tianyin



-- 
Tianyin XU,
http://cseweb.ucsd.edu/~tixu/

Re: Re: [users@httpd] Unable to create or access scoreboard (anonymous shared memory failure)

Posted by Tianyin Xu <ti...@cs.ucsd.edu>.
Thanks a lot, William!!
One amazing thing of Apache is that you developers are really responsible
and do care the usability of the software.

Best,
T

On Wed, Mar 21, 2012 at 9:32 PM, William A. Rowe Jr. <wr...@rowe-clan.net>wrote:

> Room for improvement?  Forwarding as attach to include formatting.
>
> Thanks for the observations, Tianyin!
>



-- 
Tianyin XU,
http://cseweb.ucsd.edu/~tixu/

Re: Re: [users@httpd] Unable to create or access scoreboard (anonymous shared memory failure)

Posted by Tianyin Xu <ti...@cs.ucsd.edu>.
Thanks a lot, William!!
One amazing thing of Apache is that you developers are really responsible
and do care the usability of the software.

Best,
T

On Wed, Mar 21, 2012 at 9:32 PM, William A. Rowe Jr. <wr...@rowe-clan.net>wrote:

> Room for improvement?  Forwarding as attach to include formatting.
>
> Thanks for the observations, Tianyin!
>



-- 
Tianyin XU,
http://cseweb.ucsd.edu/~tixu/

Fwd: Re: [users@httpd] Unable to create or access scoreboard (anonymous shared memory failure)

Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
Room for improvement?  Forwarding as attach to include formatting.

Thanks for the observations, Tianyin!

Re: [users@httpd] Unable to create or access scoreboard (anonymous shared memory failure)

Posted by Tianyin Xu <ti...@cs.ucsd.edu>.
Hi, Martin,

Thanks a lot! I found the root cause after diving into code.

The error is caused by my wrong settings. I try to create a too big
scoreboard file (which is even bigger than my physical memory). The size of
the scoreboard file is generated in *ap_calc_scoreboard_size() as follows:*

  scoreboard_size = sizeof(global_score);
  scoreboard_size += sizeof(process_score) * server_limit;
  scoreboard_size += sizeof(worker_score) * server_limit * thread_limit;

Then, in open_scoreboard(), it uses mmap() to create the scoreboard file by
shared memory which cause the error.


       rv = apr_shm_create(&ap_scoreboard_shm, scoreboard_size, NULL,
                           global_pool); /* anonymous shared memory */
       if ((rv != APR_SUCCESS) && (rv != APR_ENOTIMPL)) {
           ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
APLOGNO(00004)
                        "Unable to create or access scoreboard "
                        "(anonymous shared memory failure)");
           return rv;
       }

I have to say that the system response is really important. If the code can
check the errno and provide accurate information. User will get less
confused.

Thanks again, Martin. I do appreciate your help!!

Tianyin


On Wed, Mar 21, 2012 at 1:43 AM, Martin Hasicek <ma...@gmail.com>wrote:

> So you delete file, try to start apache and same error? Was this file
> recreated by apache? Please check again permissions to this file
> (directory). Best way is to switch to apache user and try to wtrite to this
> localtion.
>
> mh
>
> On Wed, Mar 21, 2012 at 5:29 PM, Tianyin Xu <ti...@cs.ucsd.edu> wrote:
>
>> Hi, Martin,
>>
>> Thanks a lot for the response. But it does not work :-(
>>
>> T
>>
>>
>> On Wed, Mar 21, 2012 at 1:01 AM, Martin Hasicek <martin.hasicek@gmail.com
>> > wrote:
>>
>>> Hi,
>>>
>>> search for ScoreBoardFile directive in your configuration. When you
>>> will find it, please remove this file from your disk. After removal, apache
>>> will recreate this file again. Also please ensure, that apache runtime user
>>> has full access to this file.
>>>
>>> mh
>>>
>>>  On Wed, Mar 21, 2012 at 4:47 PM, Tianyin Xu <ti...@cs.ucsd.edu> wrote:
>>>
>>>> Hi, all.
>>>>
>>>> I did a hard reboot because of system crash... and my Apache
>>>> httpd-2.4.1 cannot start with the following error message:
>>>>
>>>> [Wed Mar 21 00:42:56.034927 2012] [core:crit] [pid 32253:tid
>>>> 140720646657856] (22)Invalid argument: AH00004: Unable to create or access
>>>> scoreboard (anonymous shared memory failure)
>>>>
>>>> It seems that my shared memory is corrupted?
>>>>
>>>> Can anyone tell me how to repair and make apache to work?
>>>>
>>>> Thanks in advance!
>>>> Tianyin
>>>>
>>>>
>>>>
>>>> --
>>>> Tianyin XU,
>>>> http://cseweb.ucsd.edu/~tixu/
>>>>
>>>
>>>
>>
>>
>> --
>> Tianyin XU,
>> http://cseweb.ucsd.edu/~tixu/
>>
>
>


-- 
Tianyin XU,
http://cseweb.ucsd.edu/~tixu/

Re: [users@httpd] Unable to create or access scoreboard (anonymous shared memory failure)

Posted by Martin Hasicek <ma...@gmail.com>.
So you delete file, try to start apache and same error? Was this file
recreated by apache? Please check again permissions to this file
(directory). Best way is to switch to apache user and try to wtrite to this
localtion.

mh

On Wed, Mar 21, 2012 at 5:29 PM, Tianyin Xu <ti...@cs.ucsd.edu> wrote:

> Hi, Martin,
>
> Thanks a lot for the response. But it does not work :-(
>
> T
>
>
> On Wed, Mar 21, 2012 at 1:01 AM, Martin Hasicek <ma...@gmail.com>wrote:
>
>> Hi,
>>
>> search for ScoreBoardFile directive in your configuration. When you will
>> find it, please remove this file from your disk. After removal, apache will
>> recreate this file again. Also please ensure, that apache runtime user has
>> full access to this file.
>>
>> mh
>>
>>  On Wed, Mar 21, 2012 at 4:47 PM, Tianyin Xu <ti...@cs.ucsd.edu> wrote:
>>
>>> Hi, all.
>>>
>>> I did a hard reboot because of system crash... and my Apache httpd-2.4.1
>>> cannot start with the following error message:
>>>
>>> [Wed Mar 21 00:42:56.034927 2012] [core:crit] [pid 32253:tid
>>> 140720646657856] (22)Invalid argument: AH00004: Unable to create or access
>>> scoreboard (anonymous shared memory failure)
>>>
>>> It seems that my shared memory is corrupted?
>>>
>>> Can anyone tell me how to repair and make apache to work?
>>>
>>> Thanks in advance!
>>> Tianyin
>>>
>>>
>>>
>>> --
>>> Tianyin XU,
>>> http://cseweb.ucsd.edu/~tixu/
>>>
>>
>>
>
>
> --
> Tianyin XU,
> http://cseweb.ucsd.edu/~tixu/
>

Re: [users@httpd] Unable to create or access scoreboard (anonymous shared memory failure)

Posted by Tianyin Xu <ti...@cs.ucsd.edu>.
Hi, Martin,

Thanks a lot for the response. But it does not work :-(

T


On Wed, Mar 21, 2012 at 1:01 AM, Martin Hasicek <ma...@gmail.com>wrote:

> Hi,
>
> search for ScoreBoardFile directive in your configuration. When you will
> find it, please remove this file from your disk. After removal, apache will
> recreate this file again. Also please ensure, that apache runtime user has
> full access to this file.
>
> mh
>
> On Wed, Mar 21, 2012 at 4:47 PM, Tianyin Xu <ti...@cs.ucsd.edu> wrote:
>
>> Hi, all.
>>
>> I did a hard reboot because of system crash... and my Apache httpd-2.4.1
>> cannot start with the following error message:
>>
>> [Wed Mar 21 00:42:56.034927 2012] [core:crit] [pid 32253:tid
>> 140720646657856] (22)Invalid argument: AH00004: Unable to create or access
>> scoreboard (anonymous shared memory failure)
>>
>> It seems that my shared memory is corrupted?
>>
>> Can anyone tell me how to repair and make apache to work?
>>
>> Thanks in advance!
>> Tianyin
>>
>>
>>
>> --
>> Tianyin XU,
>> http://cseweb.ucsd.edu/~tixu/
>>
>
>


-- 
Tianyin XU,
http://cseweb.ucsd.edu/~tixu/

Re: [users@httpd] Unable to create or access scoreboard (anonymous shared memory failure)

Posted by Martin Hasicek <ma...@gmail.com>.
Hi,

search for ScoreBoardFile directive in your configuration. When you will
find it, please remove this file from your disk. After removal, apache will
recreate this file again. Also please ensure, that apache runtime user has
full access to this file.

mh

On Wed, Mar 21, 2012 at 4:47 PM, Tianyin Xu <ti...@cs.ucsd.edu> wrote:

> Hi, all.
>
> I did a hard reboot because of system crash... and my Apache httpd-2.4.1
> cannot start with the following error message:
>
> [Wed Mar 21 00:42:56.034927 2012] [core:crit] [pid 32253:tid
> 140720646657856] (22)Invalid argument: AH00004: Unable to create or access
> scoreboard (anonymous shared memory failure)
>
> It seems that my shared memory is corrupted?
>
> Can anyone tell me how to repair and make apache to work?
>
> Thanks in advance!
> Tianyin
>
>
>
> --
> Tianyin XU,
> http://cseweb.ucsd.edu/~tixu/
>