Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F17679A10 for ; Wed, 21 Mar 2012 21:23:09 +0000 (UTC) Received: (qmail 91015 invoked by uid 500); 21 Mar 2012 21:23:07 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 90972 invoked by uid 500); 21 Mar 2012 21:23:07 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 90964 invoked by uid 99); 21 Mar 2012 21:23:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Mar 2012 21:23:07 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.220.173] (HELO mail-vx0-f173.google.com) (209.85.220.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Mar 2012 21:23:00 +0000 Received: by vcbfl11 with SMTP id fl11so2040642vcb.18 for ; Wed, 21 Mar 2012 14:22:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :x-gm-message-state; bh=+6IHC0MSZF853HDwuoYGbp/ClHgpyTqQh0mxiPt23dI=; b=j5yq4nbnCoZTB8omQpzDsyfQBR5p1gbtEUmszKRCwg7xkLIWFXmSEOPWt8wHFKdtCM C6ku8F65U/T+K9E+10jzARD06ktKLng1rYyo91J95Sp2lDPEOnt4ng+ttKD0ki1jFrUx 3Y2OOOVemu49a7fercqqDES1dNqdtA+bIs8ZlQHatEQjSFBnzVO7dzZjVA5bhe702ALU klE2FG2gKK8Qi6ppBLh2mEBQdexFuYvrHxdKFIOoHfhiTlAfiQtf1ODUks1Lvhb16OnT dj0SULUVLcdUPtxU0vFux2i5SXD3QFiYeoHvDYniyVFa8jiI9lVlNA3KJyzDR4MT+Tqx e/4w== MIME-Version: 1.0 Received: by 10.220.151.134 with SMTP id c6mr2867860vcw.30.1332364958131; Wed, 21 Mar 2012 14:22:38 -0700 (PDT) Sender: tixu@eng.ucsd.edu Received: by 10.52.64.236 with HTTP; Wed, 21 Mar 2012 14:22:38 -0700 (PDT) In-Reply-To: References: Date: Wed, 21 Mar 2012 14:22:38 -0700 X-Google-Sender-Auth: 0qU7TL8bKlF1iRnhCb7iO4yui1c Message-ID: From: Tianyin Xu To: users@httpd.apache.org Content-Type: multipart/alternative; boundary=f46d043c7ed80a661704bbc76449 X-Gm-Message-State: ALoCoQlI8TTpqVUin2O9YtwySmu48bb5ScgfdkmTa9RtPmvwH9z8q6aQiCSNMxM2Nx25qWzeceCr X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Unable to create or access scoreboard (anonymous shared memory failure) --f46d043c7ed80a661704bbc76449 Content-Type: text/plain; charset=ISO-8859-1 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 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 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 > > 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 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/ --f46d043c7ed80a661704bbc76449 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, Martin,=A0

Thanks a lot! I found the root cause afte= r diving into code.=A0

The error is caused by my w= rong settings. I try to create a too big scoreboard file (which is even big= ger than my physical memory). The size of the scoreboard file is generated = in=A0ap_calc_scoreboard_size() as follows:

=A0=A0scoreboard_size =3D sizeof(global_score)= ;
=A0=A0scoreboard_size +=3D sizeof(process_score) * server_limit;
=A0=A0scoreboard_size +=3D sizeof(worker_score) * server_limit * thread_limit;=

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


=A0=A0=A0=A0=A0=A0= =A0rv =3D apr_shm_create(&ap_scoreboard_shm, score= board_size, NULL,
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0global_pool); /* anonymous shared memory */
=A0=A0=A0=A0=A0=A0=A0if ((rv !=3D APR_SUCCESS) &&= ; (rv !=3D APR_ENOTIMPL)) {
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0ap_log_error(APLOG_MARK= , APLOG_CRIT, rv, ap_server_conf, APLOGNO(00004)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0"Unable to create or access scoreboard "=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0"(anonymous shared memory failure)"); =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0return rv;
=A0=A0=A0=A0=A0=A0=A0}


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

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

=
Tianyin


On Wed, Mar= 21, 2012 at 1:43 AM, Martin Hasicek <martin.hasicek@gmail.com> wrote:<= br>
So you delete file, try to start apache= and same error? Was this file recreated by apache? Please check again perm= issions to this file (directory). Best way is to switch to apache user and = try to wtrite to this localtion.
=A0
mh

On Wed, Mar 21, 2012 at 5:29 PM, Tianyin Xu <tix= u@cs.ucsd.edu> wrote:
Hi, Martin,=20

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,
=A0
search for ScoreBoardFile=A0directive in your = configuration.=A0When you will find it, please remove this file from your d= isk. After removal, apache will recreate this file again. Also please ensur= e, that apache runtime user has full access to this file.
=A0
mh

On Wed, Mar 21, 2012 at 4:47 PM, Tianyin Xu <tix= u@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 140720646= 657856] (22)Invalid argument: AH00004: Unable to create or access scoreboar= d (anonymous shared memory failure)

It seems that my shared memory is corrupted?=A0

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

Thanks in advance!
Tianyin



--
Tianyin XU,
http://cseweb.u= csd.edu/~tixu/





--
Tianyin XU,
http://cseweb.u= csd.edu/~tixu/





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

--f46d043c7ed80a661704bbc76449--