성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] Working with Rust Libraries from C#...
[정성태] Detecting blocking calls using asyn...
[정성태] 아쉽게도, 커뮤니티는 아니고 개인 블로그입니다. ^^
[정성태] 질문이 잘 이해가 안 됩니다. 우선, 해당 소스코드에서 ILis...
[양승조
] var대신 dinamic으로 선언해서 해결은 했습니다. 맞는 해...
[양승조
] 또 막혔습니다. ㅠㅠ var list = props[i].Ge...
[양승조
] 아. 감사합니다. 어제는 안됐던것 같은데....정신을 차려야겠네...
[정성태] "props[i].GetValue(props[i])" 코드에서 ...
[정성태] 저렇게 조각 코드 말고, 실제로 재현이 되는 예제 프로젝트를 압...
[정성태] Modules 창(Ctrl+Shift+U)을 띄워서, 해당 Op...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
제니퍼 .NET
닷넷
COM 개체 관련
스크립트
VC++
VS.NET IDE
Windows
Team Foundation Server
디버깅 기술
오류 유형
개발 환경 구성
웹
기타
Linux
Java
DDK
Math
Phone
Graphics
사물인터넷
부모글 보이기/감추기
내용
<div style='display: inline'> <h1 style='font-family: Malgun Gothic, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>windbg의 mscordacwks DLL 로드 문제 - 두 번째 이야기</h1> <p> <br /> 예전에 windbg에서 mscordacwks 로드 문제 때문에 sos 확장 DLL의 닷넷 디버깅이 안된다는 글을 쓴 적이 있었는데요.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Windbg - ERROR: Unable to load DLL mscordacwks_x86_x86_2.0.50727.4200.dll, Win32 error 0n2 ; <a target='tab' href='http://www.sysnet.pe.kr/2/0/994'>http://www.sysnet.pe.kr/2/0/994</a> </pre> <br /> 그때 당시의 해결 방안으로 심벌 폴더에 동일하게 경로를 맞춰주는 것으로 해결을 했었습니다.<br /> <br /> 최근에 고객사를 방문해서 "Windows Server 2003 Version 3790 (Service Pack 2)" 운영체제가 설치된 컴퓨터에서 windbg로 문제 해결을 해나가는데, 이와 유사한 문제가 발생했습니다. 다음과 같이 sos의 확장 DLL 명령어들이 정상적으로 실행이 안된 것입니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 0:002> <span style='color: blue; font-weight: bold'>lm</span> start end module name ...[생략]... 79000000 7904a000 mscoree (deferred) 79060000 790bb000 mscorjit (deferred) 790c0000 7951a000 mscorlib (deferred) 79e70000 7a400000 <span style='color: blue; font-weight: bold'>mscorwks</span> (deferred) ...[생략]... 0:002> <span style='color: blue; font-weight: bold'>.loadby sos mscorwks</span> 0:002> <span style='color: blue; font-weight: bold'>!clrstack</span> CLRDLL: CLR DLL load disabled 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 <span style='color: blue; font-weight: bold'>mscordacwks.dll</span> 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 /> 그런데, 이번에는 DLL의 버전번호까지는 알 수 있었지만 PDB 파일의 시그니처가 출력되지는 않았습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 0:002> <span style='color: blue; font-weight: bold'>.cordll -ve -u -l</span> CLRDLL: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscordacwks.dll:2.0.50727.6387 f:0 doesn't match desired version 2.0.50727.4005 f:0 CLRDLL: Unable to find <span style='color: blue; font-weight: bold'>mscordacwks_x86_x86_2.0.50727.4005.dll</span> by mscorwks search CLRDLL: Unable to find 'mscordacwks_x86_x86_2.0.50727.4005.dll' on the path CLRDLL: Unable to find mscorwks.dll by search CLRDLL: ERROR: Unable to load DLL mscordacwks_x86_x86_2.0.50727.4005.dll, Win32 error 0n2 CLR DLL status: ERROR: Unable to load DLL mscordacwks_x86_x86_2.0.50727.4005.dll, Win32 error 0n2 </pre> <br /> "<a target='tab' href='http://www.sysnet.pe.kr/2/0/994'>Windbg - ERROR: Unable to load DLL mscordacwks_x86_x86_2.0.50727.4200.dll, Win32 error 0n2</a>" 글에 보면 고객사 컴퓨터에서 mscordacwks.dll을 복사해 와서 "d:\Symbols\mscordacwks_x86_x86_2.0.50727.4200.dll\4A9EE474590000\mscordacwks_x86_x86_2.0.50727.4200.dll" 경로에 복사하는 것으로 해결했다고 썼는데요. 아쉽게도 이번에는 2.0.50727.4005로 버전이 다르기 때문에 틀림없이 "4A9EE474590000"이라는 시그니처 값도 달라져야 하는데 그 문자열을 구할 수가 없었던 것입니다.<br /> <br /> 다른 방법이 있지 않을까 생각했는데, ".cordll"의 명령어를 가만 보니 "on the path"라는 말이 나옵니다. 아마도 "PATH" 환경 변수로 잡힌 경로에 mscordacwks_x86_x86_2.0.50727.4005.dll 파일로 놓아도 된다는 것이겠지요. 다행히 이 예상은 적중해서 로드가 잘 되었습니다. ^^<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 0:002> <span style='color: blue; font-weight: bold'>.cordll -ve -u -l</span> CLRDLL: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscordacwks.dll:2.0.50727.6387 f:0 doesn't match desired version 2.0.50727.4005 f:0 CLRDLL: Unable to find mscordacwks_x86_x86_2.0.50727.4005.dll by mscorwks search <span style='color: blue; font-weight: bold'>CLRDLL: Loaded DLL mscordacwks_x86_x86_2.0.50727.4005.dll</span> CLR DLL status: Loaded DLL mscordacwks_x86_x86_2.0.50727.4005.dll </pre> <br /> 그런데, 나중에 끝마치고 나서 살펴 보니 제가 다음의 글도 썼었더군요. ^^;<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > windbg의 mscordacwks DLL 로드 문제 ; <a target='tab' href='http://www.sysnet.pe.kr/2/0/1181'>http://www.sysnet.pe.kr/2/0/1181</a> </pre> <br /> 그 때는 "Debug Diag" 도구에서 덤프 파일을 올린 것이었는데 ... 거기에도 시그니처 경로가 나타난 것을 볼 수 있습니다. 아마 이번에도 그렇게 해서 나오지 않았을까 싶지만... 어쨌든 덕분에 새로운 방법을 알게 되었으니. ^^<br /> </p><br /> <br /><hr /><span style='color: Maroon'>[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
2037
(왼쪽의 숫자를 입력해야 합니다.)