Microsoft MVP성태의 닷넷 이야기
오류 유형: 722. windbg/sos - savemodule - Fail to read memory [링크 복사], [링크+제목 복사],
조회: 15627
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

windbg/sos - savemodule - Fail to read memory

윈도우가 기본 제공하는 메모리 덤프 기능은 닷넷 응용 프로그램을 디버깅하는 데는 좀 아쉬운 부분이 있습니다. 실제로 그런 경우 sos.dll이 로드되면서 몇몇 명령어가 동작하지 않을 것이라는 메시지를 보게 됩니다.

0:000>  .cordll -ve -u -l
CLRDLL: Unable to get version info for 'e:\symbols\clr.dll\5B175F449a0000\mscordacwks.dll', Win32 error 0n87
CLRDLL: Loaded DLL e:\symbols\mscordacwks_AMD64_AMD64_4.0.30319.36450.dll\5B175F449a0000\mscordacwks_AMD64_AMD64_4.0.30319.36450.dll
----------------------------------------------------------------------------
The user dump currently examined is a minidump. Consequently, only a subset
of sos.dll functionality will be available. If needed, attaching to the live
process or debugging a full dump will allow access to sos.dll's full feature
set.
To create a full user dump use the command: .dump /ma <filename>
----------------------------------------------------------------------------
Automatically loaded SOS Extension
CLR DLL status: Loaded DLL e:\symbols\mscordacwks_AMD64_AMD64_4.0.30319.36450.dll\5B175F449a0000\mscordacwks_AMD64_AMD64_4.0.30319.36450.dll

단적인 예로, 대부분의 경우 윈도우가 제공하는 hdmp로부터는 savemodule 명령어가 실패하게 됩니다.

0:000> lm m Test*
Browse full module list
start             end                 module name
00000071`04510000 00000071`0454c000   Test_DLL   (deferred)             

0:000> !savemodule 00000071`04510000 F:\temp\Test.dll
3 sections in file
section 0 - VA=2000, VASize=35080, FileAddr=200, FileSize=35200
section 1 - VA=38000, VASize=430, FileAddr=35400, FileSize=600
section 2 - VA=3a000, VASize=c, FileAddr=35a00, FileSize=200
Fail to read memory

이외에도 PDB 파일이 없는 경우의 호출에 대해서는 함수 이름을 풀이하지 못하고 Unknown으로 보여주게 됩니다.

0:000> !clrstack
OS Thread Id: 0x16d8 (20)
        Child SP               IP Call Site
// ...[생략]...
00000072a0005440 00007eccc2c21cc3 Test_DLL.dll!Unknown
00000072a0005480 00007eccc2c21a28 Test_DLL.dll!Unknown
00000072a0005510 00007eccc288f00b Test_DLL.dll!Unknown
00000072a00055c0 00007eccc28a26fa Test_DLL.dll!Unknown
// ...[생략]...
00000072a000ee98 00007ecd2048a533 [GCFrame: 00000072a000ee98] 
00000072a000f068 00007ecd2048a533 [DebuggerU2MCatchHandlerFrame: 00000072a000f068] 

따라서, 위와 같은 제약이 있어 분석이 제대로 안 될 때는, 할 수 없이 procdump를 이용해 다시 덤프를 받아야 합니다.




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 9/26/2022]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




... 121  122  123  124  125  126  127  128  129  130  131  132  133  [134]  135  ...
NoWriterDateCnt.TitleFile(s)
1739정성태8/24/201427739.NET Framework: 457. 교착상태(Dead-lock) 해결 방법 - Lock Leveling [2]파일 다운로드1
1738정성태8/23/201423442.NET Framework: 456. C# - CAS를 이용한 Lock 래퍼 클래스파일 다운로드1
1737정성태8/20/201420926VS.NET IDE: 93. Visual Studio 2013 동기화 문제
1736정성태8/19/201426915VC++: 79. [부연] CAS Lock 알고리즘은 과연 빠른가? [2]파일 다운로드1
1735정성태8/19/201419397.NET Framework: 455. 닷넷 사용자 정의 예외 클래스의 최소 구현 코드 - 두 번째 이야기
1734정성태8/13/201421160오류 유형: 237. Windows Media Player cannot access the file. The file might be in use, you might not have access to the computer where the file is stored, or your proxy settings might not be correct.
1733정성태8/13/201427503.NET Framework: 454. EmptyWorkingSet Win32 API를 사용하는 C# 예제파일 다운로드1
1732정성태8/13/201435815Windows: 99. INetCache 폴더가 다르게 보이는 이유
1731정성태8/11/201428293개발 환경 구성: 235. 점(.)으로 시작하는 파일명을 탐색기에서 만드는 방법
1730정성태8/11/201423475개발 환경 구성: 234. Royal TS의 터미널(Terminal) 연결에서 한글이 깨지는 현상 해결 방법
1729정성태8/11/201419467오류 유형: 236. SqlConnection - The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly.
1728정성태8/8/201431708.NET Framework: 453. C# - 오피스 파워포인트(Powerpoint) 파일을 WinForm에서 보는 방법파일 다운로드1
1727정성태8/6/201421904오류 유형: 235. SignalR 오류 메시지 - Counter 'Messages Bus Messages Published Total' does not exist in the specified Category. [2]
1726정성태8/6/201420705오류 유형: 234. IIS Express에서 COM+ 사용 시 SecurityException - "Requested registry access is not allowed" 발생
1725정성태8/6/201422653오류 유형: 233. Visual Studio 2013 Update3 적용 후 Microsoft.VisualStudio.Web.PageInspector.Runtime 모듈에 대한 FileNotFoundException 예외 발생
1724정성태8/5/201427450.NET Framework: 452. .NET System.Threading.Thread 개체에서 Native Thread Id를 구하는 방법 - 두 번째 이야기 [1]파일 다운로드1
1723정성태7/29/201459845개발 환경 구성: 233. DirectX 9 예제 프로젝트 빌드하는 방법 [3]파일 다운로드1
1722정성태7/25/201422184오류 유형: 232. IIS 500 Internal Server Error - NTFS 암호화된 폴더에 웹 애플리케이션이 위치한 경우
1721정성태7/24/201425487.NET Framework: 451. 함수형 프로그래밍 개념 - 리스트 해석(List Comprehension)과 순수 함수 [2]
1720정성태7/23/201423456개발 환경 구성: 232. C:\WINDOWS\system32\LogFiles\HTTPERR 폴더에 로그 파일을 남기지 않는 설정
1719정성태7/22/201427342Math: 13. 동전을 여러 더미로 나누는 경우의 수 세기(Partition Number) - 두 번째 이야기파일 다운로드1
1718정성태7/19/201436781Math: 12. HTML에서 수학 관련 기호/수식을 표현하기 위한 방법 - MathJax.js [4]
1716정성태7/17/201436485개발 환경 구성: 231. PC 용 무료 안드로이드 에뮬레이터 - genymotion
1715정성태7/13/201431577기타: 47. 운영체제 종료 후에도 USB 외장 하드의 전원이 꺼지지 않는 경우 [3]
1714정성태7/11/201421572VS.NET IDE: 92. Visual Studio 2013을 지원하는 IL Support 확장 도구
1713정성태7/11/201445345Windows: 98. 윈도우 시스템 디스크 용량 확보를 위한 "Package Cache" 폴더 이동 [1]
... 121  122  123  124  125  126  127  128  129  130  131  132  133  [134]  135  ...