본문 바로가기

개발

[scouter] agent.host 실행시 에러발생(EXCEPTION_ACCESS_VIOLATION)

728x90
반응형

 

윈도우 11에서 scouter의 agent.host 를 실행하면 심각한 JAVA에러가 발생하여 실행이 되지 않는 문제가 발생되고 있다.

[scouter] EXCEPTION_ACCESS_VIOLATION

C:\Develop\Scouter\scouter-all-2.17.1\agent.host>
C:\Develop\Scouter\scouter-all-2.17.1\agent.host>.\host.bat

C:\Develop\Scouter\scouter-all-2.17.1\agent.host>java -classpath ./scouter.host.jar   scouter.boot.Boot ./lib
  ____                  _
 / ___|  ___ ___  _   _| |_ ___ _ __
 \___ \ / __/   \| | | | __/ _ \ '__|
  ___) | (_| (+) | |_| | ||  __/ |
 |____/ \___\___/ \__,_|\__\___|_|
 Open Source S/W Performance Monitoring
 Scouter version 2.17.1

Configure -Dscouter.config=.\conf\scouter.conf
Scouter Host Agent Version 2.17.1 2022-03-27 04:35 GMT
System JRE version : 11.0.14
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000010014ed4, pid=25544, tid=39648
#
# JRE version: Java(TM) SE Runtime Environment 18.9 (11.0.14+8) (build 11.0.14+8-LTS-263)
# Java VM: Java HotSpot(TM) 64-Bit Server VM 18.9 (11.0.14+8-LTS-263, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# C  [sigar-amd64-winnt.dll+0x14ed4]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Develop\Scouter\scouter-all-2.17.1\agent.host\hs_err_pid25544.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

C:\Develop\Scouter\scouter-all-2.17.1\agent.host>

 

해당 문제로 인하여 scouter-client 에서 CPU 사용량이 표시가 안되는 것 같다. (Application 모니터링 항목은 문제 없음.)

[scouter] CPU Usage 미표시

환경정보

  • 윈도우 11
  • JDK 11
  • scouter 2.17.1

해결시도방법

1. JDK 17 로 실행 - 실패

2. 콘솔창을 관리자 모드로 변경 후 실행 - 실패

3. 해당 host를 scouter-client에서 Linux -> windows 로 ObjectType 변경 - 실패

여러 방법을 시도해 봤지만 실패!!!

 

원인파악

1. 에러발생시 생성된 파일 분석 - hs_err_pid25544.log

siginfo: EXCEPTION_ACCESS_VIOLATION (0xc0000005), reading address 0x000000007e2a0d88


Register to memory mapping:

RIP=0x0000000010014ed4 sigar-amd64-winnt.dll
RAX=0x000000007e2a0c50 is an unknown value
RBX={method} {0x0000018d7cc591e0} 'getNetInterfaceList' '()[Ljava/lang/String;' in 'org/hyperic/sigar/Sigar'
RCX=0x0000018d78cf0348 points into unknown readable memory: 0x00007ff90fc11d10 | 10 1d c1 0f f9 7f 00 00
RDX=0x00000021a61fdca0 is pointing into the stack for thread: 0x0000018d78cf0000
RSP=0x00000021a61fdb50 is pointing into the stack for thread: 0x0000018d78cf0000
RBP=0x00000021a61fdc80 is pointing into the stack for thread: 0x0000018d78cf0000
RSI=0x00000021a61fe130 is pointing into the stack for thread: 0x0000018d78cf0000
RDI=0x0000000000000001 is an unknown value
R8 =0x0000000000000032 is an unknown value
R9 =0x0000000622ef8f90 is an oop: org.hyperic.sigar.Sigar 
{0x0000000622ef8f90} - klass: 'org/hyperic/sigar/Sigar'
R10=0x00000000000000b0 is an unknown value
R11=0x00007ff90fc8db9c jvm.dll
R12=0x0 is NULL
R13=0x0000018d7cc591d0 is pointing into metadata
R14=0x00000021a61fdca0 is pointing into the stack for thread: 0x0000018d78cf0000
R15=0x0000018d78cf0000 is a thread
...
Internal exceptions (10 events):
Event: 0.264 Thread 0x0000018d48481800 Exception <a 'java/security/PrivilegedActionException'{0x00000006242a9088}> (0x00000006242a9088) thrown at [./open/src/hotspot/share/prims/jvm.cpp, line 1305]
Event: 0.270 Thread 0x0000018d48481800 Exception <a 'java/security/PrivilegedActionException'{0x00000006242aa458}> (0x00000006242aa458) thrown at [./open/src/hotspot/share/prims/jvm.cpp, line 1305]
...
0x0000000010000000 - 0x0000000010070000 	C:\Develop\Scouter\scouter-all-2.17.1\agent.host\lib\sigar-amd64-winnt.dll

JDK 문제 또는 hyperic-sigar 라이브러리의 보안문제로 추측

 

2. 해당 이슈를 JDK Bug System에 문의내역 검색

https://bugs.openjdk.org/browse/JDK-8236424

 

[JDK-8236424] Problematic frame:C [sigar-amd64-winnt.dll+0x14ed4] - Java Bug System

 

bugs.openjdk.org

hyperic-sigar 라이브러리 문제라고 파악하여 답변등록 - 이슈 종료

 

3. Scouter - 이슈에 문의사항이 등록되어 있는 것을 파악

https://github.com/scouter-project/scouter/issues/884

 

agent.host 실행 오류 · Issue #884 · scouter-project/scouter

C:\scouter\agent.host>host.bat C:\scouter\agent.host>java -classpath ./scouter.host.jar scouter.boot.Boot ./lib / | ___ ___ _ | | ___ _ __ _ \ / __/ | | | | / _ \ '| ) | (| (+) | || | || ...

github.com

내가 겪었던 환경과 거의 비슷(윈도우11, JDK 11) - 내가 파악한 사항을 답변으로 등록함.

 

4. hyperic-sigar 깃허브 이슈에도 해당사항을 등록된 것을 확인

해당 사항에 관련되어 비슷한 이슈들이 존재하는데 답변이 없다.

https://github.com/hyperic/sigar/issues/147

 

Windows: EXCEPTION_ACCESS_VIOLATION at [sigar-amd64-winnt.dll+0x14ed4] · Issue #147 · hyperic/sigar

Crash reports: EA issue: EA-257460 observed starting since 211.6085.26 + 11.0.9.1+11-b1341.2 it also observed with the latest IDEs: IDEA 211.7142.45 Crash signature: on Windows java_error_in # # A ...

github.com

 

정리

  • scouter는 윈도우 리소스(CPU/Memory등) 정보를 구하는 라이브러리를 hyperic-sigar 를 사용 중으로 파악됨.
  • 해당 프로젝트는 마지막 커밋/푸시 일시가 약 7년전이라 최신 OS, JDK를 지원안하는 것으로 보임.
  • 공식사이트(http://sigar.hyperic.com/) 도 접속이 안되는 상태 - 심각
  • scouter가 윈도우 리소스 라이브러리를 교체하는 방향으로 개발해야 해결될 것 같은 큰 문제

 

728x90
반응형