성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] VT sequences to "CONOUT$" vs. STD_O...
[정성태] NetCoreDbg is a managed code debugg...
[정성태] Evaluating tail call elimination in...
[정성태] What’s new in System.Text.Json in ....
[정성태] What's new in .NET 9: Cryptography ...
[정성태] 아... 제시해 주신 "https://akrzemi1.wordp...
[정성태] 다시 질문을 정리할 필요가 있을 것 같습니다. 제가 본문에...
[이승준] 완전히 잘못 짚었습니다. 댓글 지우고 싶네요. 검색을 해보...
[정성태] 우선 답글 감사합니다. ^^ 그런데, 사실 저 예제는 (g...
[이승준] 수정이 안되어서... byteArray는 BYTE* 타입입니다...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
제니퍼 .NET
닷넷
COM 개체 관련
스크립트
VC++
VS.NET IDE
Windows
Team Foundation Server
디버깅 기술
오류 유형
개발 환경 구성
웹
기타
Linux
Java
DDK
Math
Phone
Graphics
사물인터넷
부모글 보이기/감추기
내용
<div style='display: inline'> <div style='font-family: 맑은 고딕, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>Windbg - ERROR: Unable to load DLL mscordacwks_x86_x86_2.0.50727.4200.dll, Win32 error 0n2</div> <br /> <a target='_tab' href='http://www.sysnet.pe.kr/2/0/991'>procdump.exe를 이용해서 생성한 닷넷 응용 프로그램의 덤프</a>를 고객사로부터 전달받아 windbg에 올려서 분석을 시작하려고 했습니다.<br /> <br /> windbg를 실행하고, 덤프를 로드하니 아래와 같이 procdump.exe를 이용하여 덤프를 받은 상황을 보여줍니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; width: 800px; background-color: #fbedbb; overflow-x: scroll; font-family: Consolas, Verdana;' > Loading Dump File [D:\...[생략]...\TestApp_110119_154225.dmp] User Mini Dump File with Full Memory: Only application data is available Comment: ' <b style='COLOR: blue'>*** procdump -e -ma -t TestApp.exe</b> *** Unhandled exception' Symbol search path is: SRV*\\localhost\e$\Symbols*http://msdl.microsoft.com/download/symbols; Executable search path is: <b style='COLOR: blue'>Windows Server 2008/Windows Vista Version 6002 (Service Pack 2)</b> MP (8 procs) Free x86 compatible Product: Server, suite: TerminalServer SingleUserTS Machine Name: Debug session time: Wed Jan 19 15:42:25.000 2011 (UTC + 9:00) System Uptime: 5 days 19:17:25.877 Process Uptime: 0 days 0:00:53.000 </pre> <br /> 여느 때와 다름없이 sos.dll을 로드하고,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; width: 800px; background-color: #fbedbb; overflow-x: scroll; font-family: Consolas, Verdana;' > 0:000> .loadby sos mscorwks </pre> <br /> 예외 발생을 파악하기 위해 "!pe (printexception의 간략 명령어)" 명령을 내렸으나 다음과 같이 실행이 안되었습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; width: 800px; background-color: #fbedbb; overflow-x: scroll; font-family: Consolas, Verdana;' > 0:000> <b style='COLOR: blue'>!pe</b> <b style='COLOR: blue'>CLRDLL: CLR DLL load disabled Failed to load data access DLL, 0x80004005 </b>Verify that 1) you have a recent build of the debugger (6.2.14 or newer) 2) the file mscordacwks.dll that matches your version of mscorwks.dll is in the version directory 3) or, if you are debugging a dump file, verify that the file mscordacwks_<arch>_<arch>_<version>.dll is on your symbol path. 4) you are debugging on the same architecture as the dump file. For example, an IA64 dump file must be debugged on an IA64 machine. You can also run the debugger command .cordll to control the debugger's load of mscordacwks.dll. .cordll -ve -u -l will do a verbose reload. If that succeeds, the SOS command should work on retry. If you are debugging a minidump, you need to make sure that your executable path is pointing to mscorwks.dll as well. </pre> <br /> 혹시나 싶어 다른 명령도 수행해봤는데, 출력 결과만 좀 더 자세할 뿐 역시 오류가 발생합니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; width: 800px; background-color: #fbedbb; overflow-x: scroll; font-family: Consolas, Verdana;' > 0:000> <b style='COLOR: blue'>!clrstack</b> CLRDLL: C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscordacwks.dll:2.0.50727.4952 f:0 <b style='COLOR: blue'>doesn't match desired version 2.0.50727.4200 f:0</b> CLRDLL: Unable to find <b style='COLOR: blue'>mscordacwks_x86_x86_2.0.50727.4200.dll</b> by mscorwks search CLRDLL: Unable to find 'mscordacwks_x86_x86_2.0.50727.4200.dll' on the path CLRDLL: Unable to find mscorwks.dll by search CLRDLL: ERROR: Unable to load DLL mscordacwks_x86_x86_2.0.50727.4200.dll, Win32 error 0n2 Failed to load data access DLL, 0x80004005 Verify that 1) you have a recent build of the debugger (6.2.14 or newer) 2) the file mscordacwks.dll that matches your version of mscorwks.dll is in the version directory 3) or, if you are debugging a dump file, verify that the file mscordacwks_<arch>_<arch>_<version>.dll is on your symbol path. 4) you are debugging on the same architecture as the dump file. For example, an IA64 dump file must be debugged on an IA64 machine. You can also run the debugger command .cordll to control the debugger's load of mscordacwks.dll. .cordll -ve -u -l will do a verbose reload. If that succeeds, the SOS command should work on retry. If you are debugging a minidump, you need to make sure that your executable path is pointing to mscorwks.dll as well. </pre> <br /> 일러주는 대로 ".cordll..." 명령을 내려도 마찬가지!<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; width: 800px; background-color: #fbedbb; overflow-x: scroll; font-family: Consolas, Verdana;' > 0:000> <b style='COLOR: blue'>.cordll -ve -u -l</b> CLR DLL status: No load attempts </pre> <br /> 다시 한번 "!pe" 명령을 내려보았는데, 웬일인지 이번에는 좀 더 친절한 메시지를 출력해 주었습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; width: 800px; background-color: #fbedbb; overflow-x: scroll; font-family: Consolas, Verdana;' > 0:000> <b style='COLOR: blue'>!pe</b> CLRDLL: C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscordacwks.dll:2.0.50727.42 f:0 doesn't match desired version 2.0.50727.4200 f:0 SYMSRV: <b style='COLOR: blue'>\\localhost\d$\Symbols\mscordacwks_x86_x86_2.0.50727.4200.dll\4A9EE474590000\mscordacwks_x86_x86_2.0.50727.4200.dll</b> not found SYMSRV: http://msdl.microsoft.com/download/symbols/mscordacwks_x86_x86_2.0.50727.4200.dll/4A9EE474590000/mscordacwks_x86_x86_2.0.50727.4200.dll not found SYMSRV: The operation timed out CLRDLL: Unable to find mscordacwks_x86_x86_2.0.50727.4200.dll by mscorwks search CLRDLL: Unable to find 'mscordacwks_x86_x86_2.0.50727.4200.dll' on the path SYMSRV: \\localhost\d$\Symbols\mscorwks.dll\4A9EE474590000\mscorwks.dll not found SYMSRV: http://msdl.microsoft.com/download/symbols/mscorwks.dll/4A9EE474590000/mscorwks.dll not found SYMSRV: The operation timed out CLRDLL: Unable to find mscorwks.dll by search CLRDLL: ERROR: Unable to load DLL mscordacwks_x86_x86_2.0.50727.4200.dll, Win32 error 0n2 Failed to load data access DLL, 0x80004005 Verify that 1) you have a recent build of the debugger (6.2.14 or newer) 2) the file mscordacwks.dll that matches your version of mscorwks.dll is in the version directory 3) or, if you are debugging a dump file, verify that the file mscordacwks_<arch>_<arch>_<version>.dll is on your symbol path. 4) you are debugging on the same architecture as the dump file. For example, an IA64 dump file must be debugged on an IA64 machine. You can also run the debugger command .cordll to control the debugger's load of mscordacwks.dll. .cordll -ve -u -l will do a verbose reload. If that succeeds, the SOS command should work on retry. If you are debugging a minidump, you need to make sure that your executable path is pointing to mscorwks.dll as well. </pre> <br /> 즉, 문제의 원인이란 것이 덤프를 생성했던 "Windows Server 2008 SP2" 시스템의 mscordacwks.dll을 마이크로소프트 측의 심벌 서버에서도 찾을 수 없었고, 제 시스템(Windows 7)의 mscordacwks.dll과도 다른 버전이라는 것입니다. (근데... 버전 차이가 묘하네요. "2.0.50727.42" / "2.0.50727.4200")<br /> <br /> 검색을 해보았더니 아래의 글에 해결책이 있습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; width: 800px; background-color: #fbedbb; overflow-x: scroll; font-family: Consolas, Verdana;' > "Failed to load data access DLL, 0x80004005" ? OR ? What is mscordacwks.dll? ; http://blogs.msdn.com/b/dougste/archive/2009/02/18/failed-to-load-data-access-dll-0x80004005-or-what-is-mscordacwks-dll.aspx </pre> <br /> 정리해 보면, 그냥 간단하게 고객사 측에 "C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscordacwks.dll" 파일을 요청한 후에, 아래의 메시지에서 보았던 경로에 정확하게 파일명까지 변경해서 넣어주면 됩니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; width: 800px; background-color: #fbedbb; overflow-x: scroll; font-family: Consolas, Verdana;' > SYMSRV: \\localhost\<b style='COLOR: blue'>d$\Symbols\mscordacwks_x86_x86_2.0.50727.4200.dll\4A9EE474590000\mscordacwks_x86_x86_2.0.50727.4200.dll</b> not found </pre> <br /> <br /><br /><hr /><span style='color: Maroon'>[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
1932
(왼쪽의 숫자를 입력해야 합니다.)