'hangup'에 해당되는 글 1건

  1. 2008.11.04 [JEUS4,5] Thread Hang 발생시 조치 방법
1.  webadmin에서 ti 정보로 hang 현상 확인
 
                JEUS 4.x : webadmin <서블릿엔진명> -U<admin계정> -P<admin암호>
                JEUS 5 : webadmin <컨테이너명> -U<admin계정> -P<admin암호>
 
예) webadmin tmaxi2_servlet_enigne1 –Uadministrator –Pjeusadmin
                위와 같이 실행 하면 webadmin console tool로 들어가게 된다.
 
webadmin 명령중에 ti 명령을 치게 되면 아래와 같이 JEUS WebContainer에서 수행중인 WorkerThread가어떤 Application을 수행 중 인지를 확인 할 수 있다.  Webadmin을 통해 Thread Hang 현상을 확인 할 수 있다.
 
$$47 [tmaxi2:engine1] ti
        >>>>>>>> tmaxi2_servlet_engine1 <<<<<<<<
-- Thread State [http1-hth0(localhost:7900)] --
[http1-hth0(localhost:7900)-w0][waiting, wt=57409 ms]
[http1-hth0(localhost:7900)-w1][active , rt=23026 ms, uri=/test.jsp]
[http1-hth0(localhost:7900)-w2][waiting, wt=57139 ms]
[http1-hth0(localhost:7900)-w3][waiting, wt=57183 ms]
[http1-hth0(localhost:7900)-w4][waiting, wt=57079 ms]
[http1-hth0(localhost:7900)-w5][waiting, wt=57093 ms]
[http1-hth0(localhost:7900)-w6][waiting, wt=57071 ms]
[http1-hth0(localhost:7900)-w7][waiting, wt=57078 ms]
[http1-hth0(localhost:7900)-w8][waiting, wt=57074 ms]
[http1-hth0(localhost:7900)-w9][waiting, wt=57080 ms]
[http1-hth0(localhost:7900)-w10][waiting, wt=57184 ms]
[http1-hth0(localhost:7900)-w11][waiting, wt=57076 ms]
[http1-hth0(localhost:7900)-w12][waiting, wt=57174 ms]
[http1-hth0(localhost:7900)-w13][waiting, wt=57144 ms]
[http1-hth0(localhost:7900)-w14][waiting, wt=57150 ms]
[http1-hth0(localhost:7900)-w15][waiting, wt=57144 ms]
[http1-hth0(localhost:7900)-w16][waiting, wt=57094 ms]
[http1-hth0(localhost:7900)-w17][waiting, wt=57094 ms]
[http1-hth0(localhost:7900)-w18][waiting, wt=57094 ms]
[http1-hth0(localhost:7900)-w19][waiting, wt=57155 ms]
[total : 20    active : 1    idle : 19    blocked : 0    reconnecting : 0]
 
 
위 webadmin ti 정보로는 20개의 WorkerThread중 w1 Thread가 23초 정도 수행중인 비 정상적 상황임을 알 수 있다. active는 수행 중, waiting은 요청 대기중인 상태를 의미한다.
 
위에서 Hang 현상 발생되고 있는 thread는 w1 Thread이다.
 
2. Dump를 뜨기 위한 WebContainer PID를 얻어내기 위한 방법
 
                        jeusadmin <호스트이름> -U<admin계정> -P<admin암호>
 
예) jeusadmin tmaxi2  –Uadministrator –Pjeusadmin
 
tmaxi2:/user/jichung/jeus40/bin>jeusadmin tmaxi2  –Uadministrator –Pjeusadmin
[ErrorMsgManager] Message Manager is initialized
[JeusCommander] JEUS 4.0.4.8 Jeus Manager Controller
tmaxi2>pidlist
tmaxi2_container1 : 18842
tmaxi2>
 
위의 방법으로 Container PID를 알아 낸 후
 
            Unix Machine의   경우 :   kill –3 <ContainerPID>
 
            Windows 계열의 경우 : jeus를 실행시킨 console창에서 CTRL + Break
 
위의 작업을 수행후 Dump Log가 $JEUS_HOME/logs/JeusServer_<날짜>.log에 쌓이게 된다.
(IBM Machine의 경우엔 jeus를 실행 시킨 디렉토리에 javacore.<pid>.<시간>.txt file로 남게 된다.)
 
아래는 w1 thread에서 수행중인 test.jsp 내부적으로 수행중인 것을 Dump로 확인한 내용이다.
 
"http1-hth0(localhost:7900)-w1" (TID:0x30096a88, sys_thread_t:0x35c0add8, state:C
W, native ID:0x2128) prio=5
        at java.lang.Thread.sleep(Native Method)
        at jeus_jspwork._403_test._jspService(_403_test.java:43)
        at jeus.servlet.jsp.HttpJspBase.service(HttpJspBase.java:54)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:269)
        at jeus.servlet.jsp.JspServletWrapper.executeServlet(JspServletWrapper.java:5
2)
        at jeus.servlet.engine.ServletWrapper.execute(ServletWrapper.java:129)
        at jeus.servlet.servlets.JspServlet.execute(JspServlet.java:71)
        at jeus.servlet.engine.WebtobRequestProcessor.run(WebtobRequestProcessor.java
(Compiled Code))
 
위의 test.jsp는 임의로 Thread.sleep Method를 수행한 것이지만
실제 Application상에서 수행 중 멈춰 더 이상 진행 되고 있지 않은 Method들을 확인 함으로서
장애 상황에 대한 중요한 정보를 얻을 수 있다.
: