"libhttpd.ep <defunct>" 해결 방법이 없을까요

aaawind의 이미지

실력은 없고 마음만 앞서는 초보입니다.

잘돌아가던 시스템이였는데 며칠전부터 다운이 2일에 한번 정도 됩니다.
재부팅하면 또 이상없이 잘 동작 되구요 . 뭔가 찾아 보기 위해

ps 명령어로 프로세스를 확인해보니

"libhttpd.ep <defunct>"
같은 좀비 프로세스가 계속 나타 났다 사라졌다를 반복합니다.

혹시라도 시스템 다운과 이 좀비 프로세스가 관련이있는지 .. 이런 좀비가 생기지는 원인과 해결책이 궁금하여

고수님들의 도움을 부탁 드리고자 질문 드립니다.

그리고 시스템 다운 원인을 찾아 보려면 어떤 로그파일을 확인 해봐야 하는지도 좀 가르쳐주세요...

[root@hosting log]# uname -a
Linux hosting 2.4.3-12smp #1 SMP Fri Jun 8 14:38:50 EDT 2001 i686 unknown

[root@hosting /root]# ps -aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 1368 544 ? S Dec12 0:04 init [3]
root 2 0.0 0.0 0 0 ? SW Dec12 0:00 [keventd]
root 3 0.0 0.0 0 0 ? SW Dec12 0:00 [kswapd]
root 4 0.0 0.0 0 0 ? SW Dec12 0:00 [kreclaimd]
root 5 0.0 0.0 0 0 ? SW Dec12 0:00 [bdflush]
root 6 0.0 0.0 0 0 ? SW Dec12 0:00 [kupdated]
root 7 0.0 0.0 0 0 ? SW< Dec12 0:00 [mdrecoveryd]
root 403 0.0 0.0 1428 624 ? S Dec12 0:00 syslogd -m 0
root 408 0.0 0.1 2044 1116 ? S Dec12 0:00 klogd -2
rpc 422 0.0 0.0 1512 584 ? S Dec12 0:00 portmap
rpcuser 440 0.0 0.0 1560 764 ? S Dec12 0:00 rpc.statd
root 559 0.0 0.0 1480 636 ? S Dec12 0:00 /usr/sbin/automount --timeout 60 /misc file /etc/auto.mis
daemon 571 0.0 0.0 1400 524 ? S Dec12 0:00 /usr/sbin/atd
named 586 0.0 0.4 14956 5024 ? S Dec12 0:00 named -u named
named 591 0.0 0.4 14956 5024 ? S Dec12 0:00 named -u named
named 592 0.0 0.4 14956 5024 ? S Dec12 0:06 named -u named
named 593 0.0 0.4 14956 5024 ? S Dec12 0:06 named -u named
named 594 0.0 0.4 14956 5024 ? S Dec12 0:00 named -u named
named 595 0.0 0.4 14956 5024 ? S Dec12 0:01 named -u named
root 603 0.0 0.1 2588 1092 ? S Dec12 0:00 /usr/sbin/sshd
root 624 0.0 0.0 2244 984 ? S Dec12 0:00 xinetd -stayalive -reuse -pidfile /var/run/xinetd.pid
root 632 1.3 0.5 10704 5188 ? S Dec12 3:59 /usr/local/apache/bin/httpd
nobody 636 0.0 0.0 2072 936 ? S Dec12 0:00 proftpd (accepting connections)
root 661 0.0 0.1 5052 1864 ? S Dec12 0:00 sendmail: accepting connections
root 686 0.0 0.0 1552 688 ? S Dec12 0:00 crond
xfs 723 0.0 0.3 4616 3328 ? S Dec12 0:00 xfs -droppriv -daemon
root 749 0.0 0.1 2844 1044 ? S Dec12 0:00 /bin/sh /usr/local/mysql/bin/safe_mysqld
root 752 0.0 0.0 1340 436 tty2 S Dec12 0:00 /sbin/mingetty tty2
root 753 0.0 0.0 1340 436 tty3 S Dec12 0:00 /sbin/mingetty tty3
root 754 0.0 0.0 1340 436 tty4 S Dec12 0:00 /sbin/mingetty tty4
root 755 0.0 0.0 1340 436 tty5 S Dec12 0:00 /sbin/mingetty tty5
root 756 0.0 0.0 1340 436 tty6 S Dec12 0:00 /sbin/mingetty tty6
mysql 771 0.0 1.1 16516 12084 ? S Dec12 0:05 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysq
mysql 773 0.0 1.1 16516 12084 ? S Dec12 0:05 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysq
mysql 774 0.8 1.1 16516 12084 ? S Dec12 2:37 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysq
root 14873 0.0 0.1 2296 1100 tty1 S Dec12 0:00 login -- root
root 14948 0.0 0.1 3000 1544 tty1 S Dec12 0:00 -bash
root 20910 0.0 0.1 3492 1904 ? R Dec12 0:00 /usr/sbin/sshd
root 21026 0.0 0.1 2992 1528 pts/0 S Dec12 0:00 -bash
root 9739 0.0 0.2 5036 2236 ? S 00:49 0:00 sendmail: ./hBCFnSj09736 mx-rr.mail.lycos.com.: user open
nobody 15472 0.0 0.5 10776 5332 ? S 00:52 0:00 /usr/local/apache/bin/httpd
nobody 16277 0.0 0.6 11384 6456 ? S 00:53 0:00 /usr/local/apache/bin/httpd
mysql 16289 0.0 1.1 16516 12084 ? S 00:53 0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysq
root 19877 0.0 0.1 4984 2020 ? S 00:55 0:00 /usr/sbin/sendmail -t -i
nobody 20165 0.0 0.5 11268 6060 ? S 00:56 0:00 /usr/local/apache/bin/httpd
nobody 20441 0.0 0.5 10808 5520 ? S 00:56 0:00 /usr/local/apache/bin/httpd
nobody 20670 0.0 0.5 11104 6040 ? S 00:56 0:00 /usr/local/apache/bin/httpd
nobody 20792 0.0 0.5 10808 5524 ? S 00:56 0:00 /usr/local/apache/bin/httpd
nobody 21075 0.3 0.5 10992 5880 ? S 00:56 0:00 /usr/local/apache/bin/httpd
nobody 21122 0.1 0.5 10776 5328 ? S 00:56 0:00 /usr/local/apache/bin/httpd
nobody 21123 0.0 0.5 10776 5328 ? S 00:56 0:00 /usr/local/apache/bin/httpd
nobody 21125 0.2 0.5 10776 5328 ? S 00:56 0:00 /usr/local/apache/bin/httpd
nobody 21126 0.1 0.5 10776 5328 ? S 00:56 0:00 /usr/local/apache/bin/httpd
mysql 21228 0.0 1.1 16516 12084 ? S 00:56 0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysq
nobody 21231 0.0 0.5 10804 5344 ? S 00:56 0:00 /usr/local/apache/bin/httpd
nobody 21236 0.0 0.5 11012 5344 ? S 00:56 0:00 /usr/local/apache/bin/httpd
nobody 21243 0.0 0.0 0 0 ? Z 00:56 0:00 [libhttpd.ep <defunct>]
nobody 21244 4.0 0.0 0 0 ? Z 00:56 0:00 [libhttpd.ep <defunct>]
nobody 21245 1.0 0.5 10776 5332 ? S 00:56 0:00 /usr/local/apache/bin/httpd
nobody 21246 0.0 0.5 10776 5332 ? S 00:56 0:00 /usr/local/apache/bin/httpd
nobody 21247 1.0 0.5 10776 5332 ? S 00:56 0:00 /usr/local/apache/bin/httpd
nobody 21248 0.0 0.5 10776 5332 ? S 00:56 0:00 /usr/local/apache/bin/httpd
nobody 21251 0.0 0.5 10776 5288 ? S 00:56 0:00 /usr/local/apache/bin/httpd
nobody 21252 1.0 0.0 0 0 ? Z 00:56 0:00 [libhttpd.ep <defunct>]
nobody 21253 0.0 0.5 10776 5328 ? S 00:56 0:00 /usr/local/apache/bin/httpd
nobody 21259 4.0 0.6 11532 6464 ? S 00:56 0:00 /usr/local/apache/bin/httpd
nobody 21261 0.0 0.0 0 0 ? Z 00:56 0:00 [libhttpd.ep <defunct>]
nobody 21263 1.0 0.0 0 0 ? Z 00:56 0:00 [libhttpd.ep <defunct>]
mysql 21264 0.0 1.1 16516 12084 ? S 00:56 0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysq
nobody 21272 1.0 0.5 10776 5264 ? S 00:56 0:00 /usr/local/apache/bin/httpd
nobody 21273 2.0 0.0 0 0 ? Z 00:56 0:00 [libhttpd.ep <defunct>]
nobody 21274 0.0 0.5 10776 5328 ? S 00:56 0:00 /usr/local/apache/bin/httpd
nobody 21275 0.0 0.0 0 0 ? Z 00:56 0:00 [libhttpd.ep <defunct>]
nobody 21276 0.0 0.0 0 0 ? Z 00:56 0:00 [libhttpd.ep <defunct>]

지리즈의 이미지

잘돌아가던 apache에 좀비가 생기는 것은 잘못된 php코드에 기인할 가능성이 있습니다.

소스중에 재귀호출이나 무한 루프등으로 메모리가 오버플로워가 발생하면, 해당 프로세스가 좀비가 되서 사라지거나 남기도 합니다.

시스템이 다운되는 것하고 관련이 있을 수 있습니다.

There is no spoon. Neo from the Matrix 1999.

maddie의 이미지

보니까 레드햇 예전버전인거 같은데 이 때 레드햇에 들어있던 아파치에 security bug가 있다고 들었습니다. 일단 아파치가 새버전인가 보시구요.

위에 말씀하신 대로 php코드의 버그일 수 있구요.

또하나는 웜입니다. /var/log/httpd/access_log나 error_log를 보시고(레드햇 리눅스에서 로그파일 이름은 기억이 안납니다 ;-) ) 웜 공격이 아닌지 살펴보시고 해당 아이피를 막아버리세요. 웜방지 module도 있는 것으로 압니다.

시스템 로그는 /var/log/messages를 보시면 알 수 있을 것같습니다.

글고 왠만하면 커널 업데이트 정도는 해주셔야 ^^;;;;

힘없는자의 슬픔

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.