Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Feb 2011 07:53:31 +0330
From:      "Payam Poursaied" <me@payam124.com>
To:        <freebsd-apache@freebsd.org>
Subject:   apache 100% cpu usage
Message-ID:  <190201cbcfec$c76297f0$5627c7d0$@com>

index | next in thread | raw e-mail

[-- Attachment #1 --]
Hi all
I faced with a problem using apache 1.3.42 on FreeBSD 8.0-RELEASE.
The problem is that httpd processes frequently reach 100% CPU usage and stay
at this level of CPU usage. 
This is a sample of top output. 

  PID USERNAME   THR PRI NICE   SIZE    RES STATE   C   TIME   WCPU COMMAND
77051 www          1 118    0   208M 86080K CPU4    4  87.6H 100.00% httpd
 9403 www          1 118    0   215M 93340K CPU2    2  65.0H 100.00% httpd
78430 www          1 118    0   226M   100M CPU0    0  58:57 100.00% httpd
95332 www          1  50    0   205M 83624K sbwait 12   0:02  4.49% httpd
89664 www          1  46    0   210M 88144K sbwait 11   0:05  2.59% httpd
95331 www          1  46    0   205M 83464K sbwait 12   0:01  1.66% httpd
46157 www          1  47    0   258M   134M sbwait 15   3:03  1.17% httpd
89493 www          1  44    0   212M 90152K accept 13   0:20  0.10% httpd
22801 www          1  44    0   264M   137M accept 13   5:40  0.00% httpd
25440 www          1  44    0   275M   145M accept 11   5:35  0.00% httpd
30396 www          1  44    0   262M   135M accept 14   4:47  0.00% httpd
82456 www          1  44    0   233M   109M accept 12   1:37  0.00% httpd
80407 www          1  44    0   239M   110M accept 10   0:49  0.00% httpd
80097 www          1  44    0   265M   135M accept  1   0:35  0.00% httpd
88622 www          1  46    0   216M 94588K accept 15   0:16  0.00% httpd
88968 www          1  44    0   208M 86316K accept  6   0:03  0.00% httpd
89686 www          1  44    0   201M 80216K accept 11   0:01  0.00% httpd
95330 www          1  44    0   201M 77088K sbwait 10   0:00  0.00% httpd

I think there might be a bug that caused something like endless loop but I
am newbie to gdb and debugging and I could not find any relevant point to
get into it.
I tried to compile apache in debug mode and then wait to see a suspicious
process and then attached GDB66 to that cpu intensive httpd process to find
out what is going on. It seems the problem is related to something in
/lib/libc.so.7 which I could not find out how to compile it in debug mode.

The result of "list" and "where" command of GDB are as below, I appreciate
if you could point me to right direction to examine this problem deeply.
As an extra information, mod_perl is heavily used trough this apache

(gdb) l
5640
5641    #ifdef TPF
5642        EBW_AREA input_parms;
5643        ecbptr()->ebrout = PRIMECRAS;
5644        input_parms = * (EBW_AREA *)(&(ecbptr()->ebw000));
5645    #endif
5646
5647        MONCONTROL(0);
5648
5649        common_init();
(gdb) w
Ambiguous command "w": watch, wh, whatis, where, while, while-stepping,
winheight, ws.
(gdb) where
#0  0x000000080093a9f5 in ?? () from /lib/libc.so.7
#1  0x000000080093d505 in ?? () from /lib/libc.so.7
#2  0x000000080093d702 in ?? () from /lib/libc.so.7
#3  0x000000080094352e in ?? () from /lib/libc.so.7
#4  0x0000000800944924 in realloc () from /lib/libc.so.7
#5  0x000000080307a50f in Perl_safesysrealloc () from
/usr/local/lib/perl5/5.10.1/mach/CORE/libperl.so
#6  0x00000008030a6156 in Perl_sv_grow () from
/usr/local/lib/perl5/5.10.1/mach/CORE/libperl.so
#7  0x000000080309e32e in Perl_sv_vcatpvfn () from
/usr/local/lib/perl5/5.10.1/mach/CORE/libperl.so
#8  0x00000008030a7b42 in Perl_vnewSVpvf () from
/usr/local/lib/perl5/5.10.1/mach/CORE/libperl.so
#9  0x00000008030a7bf8 in Perl_newSVpvf () from
/usr/local/lib/perl5/5.10.1/mach/CORE/libperl.so
#10 0x000000080303da32 in Perl_gv_fetchmethod_autoload () from
/usr/local/lib/perl5/5.10.1/mach/CORE/libperl.so
#11 0x000000080308edca in S_method_common () from
/usr/local/lib/perl5/5.10.1/mach/CORE/libperl.so
#12 0x000000080308f462 in Perl_pp_method () from
/usr/local/lib/perl5/5.10.1/mach/CORE/libperl.so
#13 0x000000080308eb9e in Perl_runops_standard () from
/usr/local/lib/perl5/5.10.1/mach/CORE/libperl.so
#14 0x0000000803036191 in Perl_call_sv () from
/usr/local/lib/perl5/5.10.1/mach/CORE/libperl.so
#15 0x0000000802eabe36 in perl_call_handler () from
/usr/local/libexec/apache/libperl.so
#16 0x0000000802eac87a in perl_run_stacked_handlers () from
/usr/local/libexec/apache/libperl.so
#17 0x0000000802eae2b0 in perl_handler () from
/usr/local/libexec/apache/libperl.so
#18 0x000000000040ee42 in ap_invoke_handler (r=0x804624060) at
http_config.c:476
#19 0x0000000000427849 in process_request_internal (r=0x804624060) at
http_request.c:1299
#20 0x00000000004278a4 in ap_process_request (r=0x804624060) at
http_request.c:1315
#21 0x000000000041d423 in child_main (child_num_arg=14) at http_main.c:4885
#22 0x000000000041d734 in make_child (s=0x800c05060, slot=14,
now=1297853738) at http_main.c:5055
#23 0x000000000041db6b in perform_idle_server_maintenance () at
http_main.c:5256
#24 0x000000000041e159 in standalone_main (argc=1, argv=0x7fffffffebd8) at
http_main.c:5520
#25 0x000000000041e7a4 in main (argc=1, argv=0x7fffffffebd8) at
http_main.c:5773

[-- Attachment #2 --]
0	*H
010	+0	*H
B0200
	*H
0{10	UGB10UGreater Manchester10USalford10U
Comodo CA Limited1!0UAAA Certificate Services0
040101000000Z
281231235959Z0{10	UGB10UGreater Manchester10USalford10U
Comodo CA Limited1!0UAAA Certificate Services0"0
	*H
0
@nvMEDFȃ*]P1p"I-Tc̶nhFSL$rNT
z3`ډU"XOhF'v5,^deHav PfxbV18'2Xok+c_s8x6Qx:B/I-߬tMG)b&{>%ݝ5h Ä
^/00U
#>)00U0U00{Ut0r08642http://crl.comodoca.com/AAACertificateServices.crl06420http://crl.comodo.net/AAACertificateServices.crl0
	*H
V{DOX̦Ihv]`֍PO&N氥tTAOZ``J¿Ĺt-}kF/j4,}Z
/\:l7U	S@lXen<ZƞYH0!el!s7Χ,,&"`^tԢShnlhV+8:	k׾-?cb,jAP96n00Šq_Mtq40
	*H
0{10	UGB10UGreater Manchester10USalford10U
Comodo CA Limited1!0UAAA Certificate Services0
040101000000Z
281231235959Z010	UUS10	UUT10USalt Lake City10U
The USERTRUST Network1!0Uhttp://www.usertrust.com1604U-UTN-USERFirst-Client Authentication and Email0"0
	*H
0
9}A;bF7`u9eJGHjM5BI/|1Nd.)բdąQ5yNh{zɤ2O0nFxoY^/m/묡j.g5yiF͠v:z'[=s"HaLi.1 ,׉CZqYں
gT:
wetbh~GeMW(t40b0,'0#0U#0
#>)00Ug}ĝ&pKPH|=n}0U0U00U%0++0U 
00U 0{Ut0r08642http://crl.comodoca.com/AAACertificateServices.crl06420http://crl.comodo.net/AAACertificateServices.crl0	`HB0
	*H
<~	v9<Oૄ]Te;m|7,%T_!7OTklE`-QLf<J?VvÂOlatG@We"'gOWdZٍ/i)J /LQFĊ7N 	1hǞċ~2hD*Q`Mt:C29V:RAC3'9N&9≸])&A곛wuʵeJc>D^s0'0|
;a^?Uh0
	*H
010	UUS10	UUT10USalt Lake City10U
The USERTRUST Network1!0Uhttp://www.usertrust.com1604U-UTN-USERFirst-Client Authentication and Email0
100404000000Z
110404235959Z01503U,Comodo Trust Network - PERSONA NOT VALIDATED1F0DU=Terms and Conditions of use: http://www.comodo.net/repository10U(c)2003 Comodo Limited10UPayam Poursaied10	*H
	me@payam124.com0"0
	*H
0
oi'D!ƽxɲFmK=bLCrNoiI>Z+g6ԑۯ	"\ӕkQC:0wƢlgx|'nY'B)"լ^gh/W~dAI k`x%CPuc,Gb!-CXX{|p@dmD2ρj㋬>63UfioCdJр#ڈdcE3n"""aI
QPRccyAzѤ(M|l"K<ʫuu9L,
:+UAeQod{'Yi-{\E<į?Z2_	i UҖ#2
`ݠLSUU;GFV3Ѩt%q|j^ s\fwXSyc)XŶ&pcOü\]‚if(h_[z/(J\xd4Լlz
wM|T0
0U#0g}ĝ&pKPH|=n}0UOTI
/z@$z3`0U0U00 U%0++10	`HB 0FU ?0=0;+10+0)+https://secure.comodo.net/CPS0U00LJHFhttp://crl.comodoca.com/UTN-USERFirst-ClientAuthenticationandEmail.crl0JHFDhttp://crl.comodo.net/UTN-USERFirst-ClientAuthenticationandEmail.crl0l+`0^06+0*http://crt.comodoca.com/UTNAAAClientCA.crt0$+0http://ocsp.comodoca.com0U0me@payam124.com0
	*H
HZ`3Y]4$B:~Fndeʪ
{Q4R}6c芳 J4B8r|7l2wrI2U=L
ڠpR&I6q(1j}2&bJXv,^A
?!֌.
mD]`v!]GgI&}X^e
CwהKZUcB?y"$Ze%U"72?t~mVY}te100010	UUS10	UUT10USalt Lake City10U
The USERTRUST Network1!0Uhttp://www.usertrust.com1604U-UTN-USERFirst-Client Authentication and Email|
;a^?Uh0	+0	*H
	1	*H
0	*H
	1
110219042328Z0#	*H
	1+79+0k/N7$P0	*H
	100	`He*0	`He0
*H
0	`He0*H
0+0
*H
@0
*H
(0+0	`He0	`He0	`He0
*H
0	+710010	UUS10	UUT10USalt Lake City10U
The USERTRUST Network1!0Uhttp://www.usertrust.com1604U-UTN-USERFirst-Client Authentication and Email|
;a^?Uh0*H
	1Ơ010	UUS10	UUT10USalt Lake City10U
The USERTRUST Network1!0Uhttp://www.usertrust.com1604U-UTN-USERFirst-Client Authentication and Email|
;a^?Uh0
	*H
'XP煞Cd>HŁook94p!AFvy$|ָ(ʎ9VR
f‘F"̽i,ɮRBeZkK͜إ-]J`1><ǾA\_m`]%<64Z4TYtq-3+X}FQyrۛWNX$]o	ᓳMGKt8GȾSinI,xMz7D`+2C	ǺD[fGOlq~O	bSQwVzf;8Vٲ]x%bFFRM d#y<#,"Cl<T9VӬ~.8U!iw?ڊY+:i%`9{-в	8FE#n1k [;[V  .I!wEr?Jr?
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?190201cbcfec$c76297f0$5627c7d0$>