2010-03-15 13 views
0

우리는 매일 Seg Fault로 보이는 프로덕션 서버를 가지고 있습니다. 오류는 Apache에서 가져 와서 오류 로그에 기록되지만 시간이 지나면 트래픽이없는 것으로 보입니다. 오류를 생성하는 요청 인 경우 다른 로깅이 이루어지기 전에 발생하는 것처럼 보입니다. 그래서 어떻게 발생 하는지를 볼 수 없으므로 디버깅하기가 매우 어렵습니다.왜 아파치 오류가 발생합니까?

설치가 Linux 64 비트입니다. CentOS 5.3 Apache에 다음 모듈이로드되었습니다. apachectl -t -D DUMP_MODULES |

[Mon Mar 15 06:39:25 2010] [error] [client 213.246.222.74] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:) 
[Mon Mar 15 07:41:31 2010] [error] [client 213.246.222.74] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:) 
[Mon Mar 15 08:24:16 2010] [error] [client 67.19.250.146] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:) 
[Mon Mar 15 08:43:46 2010] [error] [client 213.246.222.74] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:) 
[Mon Mar 15 08:54:02 2010] [error] [client 74.208.123.71] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:) 
[Mon Mar 15 09:09:51 2010] [notice] child pid 2138 exit signal Segmentation fault (11), possible coredump in /tmp 
[Mon Mar 15 09:45:27 2010] [error] [client 213.246.222.74] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:) 
[Mon Mar 15 09:49:05 2010] [error] [client 190.12.113.196] File does not exist: /var/www/vhosts/default/htdocs/phpMyAdmin 
[Mon Mar 15 09:49:06 2010] [error] [client 190.12.113.196] File does not exist: /var/www/vhosts/default/htdocs/PMA 

과 동시에 주변의 액세스 로그 (9시 9분 51초) :

213.246.222.74 - - [15/Mar/2010:08:43:46 +0000] "GET /" 400 561 "-" "-" 
208.80.193.28 - - [15/Mar/2010:08:52:20 +0000] "GET/HTTP/1.0" 301 313 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SU 2.009)" 
74.208.123.71 - - [15/Mar/2010:08:54:02 +0000] "GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1" 400 298 "-" "-" 
81.149.146.231 - - [15/Mar/2010:09:15:18 +0000] "GET /zabbix/ HTTP/1.1" 200 3565 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10" 
81.158.71.196 - - [15/Mar/2010:09:16:06 +0000] "GET/HTTP/1.1" 301 313 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.0.18) Gecko/2010020219 Firefox/3.0.18" 
213.246.222.74 - - [15/Mar/2010:09:45:27 +0000] "GET /" 400 561 "-" "-" 
213.246.222.74 - - [15/Mar/2010:09:45:27 +0000] "GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1" 400 298 "-" "-" 
190.12.113.196 - - [15/Mar/2010:09:49:05 +0000] "GET /phpMyAdmin/main.php HTTP/1.0" 404 295 "-" "-" 

당신 그래서 여기에 아파치 오류 로그에서 발휘이야

Loaded Modules: 
core_module (static) 
mpm_prefork_module (static) 
http_module (static) 
so_module (static) 
auth_basic_module (shared) 
auth_digest_module (shared) 
authn_file_module (shared) 
authn_alias_module (shared) 
authn_anon_module (shared) 
authn_dbm_module (shared) 
authn_default_module (shared) 
authz_host_module (shared) 
authz_user_module (shared) 
authz_owner_module (shared) 
authz_groupfile_module (shared) 
authz_dbm_module (shared) 
authz_default_module (shared) 
ldap_module (shared) 
authnz_ldap_module (shared) 
include_module (shared) 
log_config_module (shared) 
logio_module (shared) 
env_module (shared) 
ext_filter_module (shared) 
mime_magic_module (shared) 
expires_module (shared) 
deflate_module (shared) 
headers_module (shared) 
usertrack_module (shared) 
setenvif_module (shared) 
mime_module (shared) 
dav_module (shared) 
status_module (shared) 
autoindex_module (shared) 
info_module (shared) 
dav_fs_module (shared) 
vhost_alias_module (shared) 
negotiation_module (shared) 
dir_module (shared) 
actions_module (shared) 
speling_module (shared) 
userdir_module (shared) 
alias_module (shared) 
rewrite_module (shared) 
proxy_module (shared) 
proxy_balancer_module (shared) 
proxy_ftp_module (shared) 
proxy_http_module (shared) 
proxy_connect_module (shared) 
cache_module (shared) 
suexec_module (shared) 
disk_cache_module (shared) 
file_cache_module (shared) 
mem_cache_module (shared) 
cgi_module (shared) 
version_module (shared) 
security2_module (shared) 
unique_id_module (shared) 
fcgid_module (shared) 
php5_module (shared) 
proxy_ajp_module (shared) 
ssl_module (shared) 

더 볼 수 있습니다, 거기에 액세스 할 때 오류의 시간 주위에 기록!

#0 0x00007f9c8c8a858b in memcpy() from /lib64/libc.so.6 
No symbol table info available. 
#1 0x00007f9c8cfb066d in apr_pstrcat (a=<value optimized out>) at strings/apr_strings.c:165 
     cp = 0x1fa6b "\205▒H\211▒t`▒\003" 
     argp = 0x7f9c9ad790e8 "Referer, Referer, Referer, Referer, Referer, Referer, Referer, Referer, Referer, Referer, Referer, Referer, Referer, Referer, Referer, Referer, Referer, Referer, Referer, Referer, Referer, Referer, Re"... 
     res = 0x0 
     saved_lengths = {129643, 2, 43, 140310399395576, 0, 140310394592712} 
     nargs = <value optimized out> 
     len = <value optimized out> 
     adummy = {{gp_offset = 16, fp_offset = 32668, overflow_arg_area = 0x7fff968a0ec0, reg_save_area = 0x7fff968a0de0}} 
#2 0x00007f9c8cfb1bf9 in apr_table_merge (t=0x7f9c8f83b148, key=0x7f9c85a465fe "Vary", val=0x7f9c9ad99070 "Referer, Referer, Referer, Referer, Referer") at tables/apr_tables.c:688 
     next_elt = (apr_table_entry_t *) 0x7f9c8f83b270 
     end_elt = (apr_table_entry_t *) 0x7f9c8f83b270 
     checksum = <value optimized out> 
     hash = 22 
#3 0x00007f9c85a42cfa in ??() from /etc/httpd/modules/mod_rewrite.so 
No symbol table info available. 
#4 0x00007f9c85a44022 in ??() from /etc/httpd/modules/mod_rewrite.so 
No symbol table info available. 
#5 0x00007f9c8e87bd1a in ap_run_fixups() from /usr/sbin/httpd 
No symbol table info available. 
#6 0x00007f9c8e88e8f8 in ap_process_request() from /usr/sbin/httpd 
No symbol table info available. 
#7 0x00007f9c8e88bb40 in ??() from /usr/sbin/httpd 
No symbol table info available. 
#8 0x00007f9c8e887ca2 in ap_run_process_connection() from /usr/sbin/httpd 
No symbol table info available. 
#9 0x00007f9c8e892849 in ??() from /usr/sbin/httpd 
No symbol table info available. 
#10 0x00007f9c8e892ada in ??() from /usr/sbin/httpd 
No symbol table info available. 
#11 0x00007f9c8e892b90 in ??() from /usr/sbin/httpd 
No symbol table info available. 
#12 0x00007f9c8e89387b in ap_mpm_run() from /usr/sbin/httpd 
No symbol table info available. 
#13 0x00007f9c8e86de48 in main() from /usr/sbin/httpd 
No symbol table info available. 

이 사람이 앞으로 이동하는 방법에 대한 되거 수 : 얼마나 성가신 : 역 추적 내가 코어 덤프를

활성화 s와 여기에있다? 나는 서버가 작동하고 오작동을 일으키지 않는다는 것을 확인할 수 있습니다. 실패는 너무 드물기 때문에 요청을 직접하는 동안 보지 못했습니다.

정말 감사드립니다! 건배!

답변

0

내가 다뤄 봤던 모든 아파치 segfaults는 PHP 문제 - 무한 루프 또는 정규식 버그였습니다. 다른 장애와 관련된 액세스 로그에 로그 자신의 것 -

는 또한 누군가가 나는 그것이 PHP의 문제를 생각하지 않습니다 phpMyAdmin을

[Mon Mar 15 09:49:05 2010] [error] [client 190.12.113.196] File does not exist: /var/www/vhosts/default/htdocs/phpMyAdmin 
[Mon Mar 15 09:49:06 2010] [error] [client 190.12.113.196] File does not exist: /var/www/vhosts/default/htdocs/PMA 
+0

프로빙 것 같습니다. 나는 직감이있다 .htaccess가 mod-rewrite를 깨뜨린 것이지만, 나는 완전히 변화하지 않고 이것을 테스트하는 방법을 모른다. 실제 환경에서는 그렇게 할 수 없다. 크래시가 자주 발생하지 않으므로 버그가있는 htaccess 인 경우 - 규칙을 수정하기 전에 오류인지 확인하십시오. 백스 트레일이이 이론을지지하고 있습니까? 어떻게 mod-rewrite를 설정해야합니까? 하루에 한 두 번만 segfaults하고 나는 너무 많은 하루 종일 서버를 느리게하고 싶지 않아 ..? –

관련 문제