멀티 스레드 환경에서 제대로 덤프 남기는 방법..
글쓴이: kid1402 / 작성시간: 월, 2013/05/27 - 11:54오후
안녕하세요. 서버 프로그래머 신입입니다..
현재 만든 라이브러리에서 프로그램이 예외적으로 뻗을 때 MiniDump를 남기도록 했고 옵션은 MiniDumpWithFullMemory를 줘서 풀덤프를 남기도록 했습니다
대부분의 경우에서는 잘 작동 합니다. NULL 접근을 해서 뻗거나 하는 경우는 다 제대로 남더군요.
그런데 가끔 덤프가 남긴 하는데 콜 스택이 모두 깨진채로 남는 경우가 있습니다. 호출 스택에서 KERNELBASE.dll 어쩌구 까지 남고 어셈블리 코드만 남아있고 실제 C++ 코드 호출 스택은 전혀 안남아있어요.
제 예상으로는 멀티 스레드 환경이라 덤프 파일을 쓰는 상황에서 예외가 발생한다고 생각이 듭니다만.. (프로그램에서는 보통 8개에서 많게는 16개까지의 스레드를 사용하고 있습니다)
정확한 원인을 알 수 가 없네요.
제가 궁금한것은
1. 멀티 스레드 환경에서 MiniDump를 남길 때 주의해야할 점이 있나요?
2. C++ 소스 호출 스택이 모두 깨진 덤프(표시할 소스 코드가 없다고 나오는 경우)를 제대로 분석하는 방법이 있나요?
혹시 아시는 분은 답변 부탁드립니다. 감사합니다!
Forums:
댓글 달기