2010-12-30 2 views
4

서버에서 WCF 서비스가 실행 중이고 가끔씩 (매월 1-2 회) "Unknown error (0x8005008)"라는 유익한 메시지와 함께 COMException이 발생합니다. 내가이 특정 오류에 대한 검색했을 때 IIS에서 가상 디렉터리를 만들 때 문제에 대한 스레드 만있었습니다. 그리고 소스 코드는 IIS에서 가상 디렉터리를 만드는 것과 아무런 관련이 없습니다.WinDBG를 사용한 사후 디버깅

DirectoryServiceLib.LdapProvider.Directory - CreatePost - Could not create employee for 195001010000,000000000000: System.Runtime.InteropServices.COMException (0x80005008): Unknown error (0x80005008) at System.DirectoryServices.PropertyValueCollection.PopulateList 

WinDBG에서 추가 분석을 위해 예외를 잡았을 때 메모리 덤프를 사용했습니다. !

000000001b8ab6d8 000000007708671a [NDirectMethodFrameStandalone: 000000001b8ab6d8] Common.MemoryDump.MiniDumpWriteDump(IntPtr, Int32, IntPtr, MINIDUMP_TYPE, IntPtr, IntPtr, IntPtr) 
000000001b8ab680 000007ff002808d8 DomainBoundILStubClass.IL_STUB_PInvoke(IntPtr, Int32, IntPtr, MINIDUMP_TYPE, IntPtr, IntPtr, IntPtr) 
000000001b8ab780 000007ff00280812 Common.MemoryDump.CreateMiniDump(System.String) 
000000001b8ab7e0 000007ff0027b218 DirectoryServiceLib.LdapProvider.Directory.CreatePost(System.String, DirectoryServiceLib.Model.Post, DirectoryServiceLib.Model.Presumptions, Services.Common.SourceEnum, System.String) 
000000001b8ad6d8 000007fef8816869 [HelperMethodFrame: 000000001b8ad6d8] 
000000001b8ad820 000007feec2b6c6f System.DirectoryServices.PropertyValueCollection.PopulateList() 
000000001b8ad860 000007feec225f0f System.DirectoryServices.PropertyValueCollection..ctor(System.DirectoryServices.DirectoryEntry, System.String) 
000000001b8ad8a0 000007feec22d023 System.DirectoryServices.PropertyCollection.get_Item(System.String) 
000000001b8ad8f0 000007ff00274d34 Common.DirectoryEntryExtension.GetStringAttribute(System.String) 
000000001b8ad940 000007ff0027f507 DirectoryServiceLib.LdapProvider.DirectoryPost.Copy(DirectoryServiceLib.LdapProvider.DirectoryPost) 
000000001b8ad980 000007ff0027a7cf DirectoryServiceLib.LdapProvider.Directory.CreatePost(System.String, DirectoryServiceLib.Model.Post, DirectoryServiceLib.Model.Presumptions, Services.Common.SourceEnum, System.String) 
000000001b8adbe0 000007ff00279532 DirectoryServiceLib.WCFDirectory.CreatePost(System.String, DirectoryServiceLib.Model.Post, DirectoryServiceLib.Model.Presumptions, Services.Common.SourceEnum, System.String) 
000000001b8adc60 000007ff001f47bd DynamicClass.SyncInvokeCreatePost(System.Object, System.Object[], System.Object[]) 

내 결론은 코드가 System.DirectoryServices.PropertyCollection.get_Item (선택 System.String)를 호출 할 때 실패한다는 것입니다 : 올바른 스레드로 전환 한 후 나는 CLRStack 명령을 실행. !

000000001b8ad8a0 000007feec22d023 System.DirectoryServices.PropertyCollection.get_Item(System.String) 
    PARAMETERS: 
     this = <no data> 
     propertyName = <no data> 
    LOCALS: 
     <CLR reg> = 0x0000000001dcef78 
     <no data> 

내 첫 번째 질문은 왜 프롭퍼티에 데이터를 표시하지 않습니다되어

있도록 CLRStack를 실행 한 후 나는이 결과를 얻을 -a? 나는 Windbg에서 좀 새로운 사람이다. 그러나 나는 =의 0x0000000001dcef78상의 dumpobject을 실행 :
0:013> !do 0x0000000001dcef78 
Name:  System.String 
MethodTable: 000007fef66d6960 
EEClass:  000007fef625eec8 
Size:  74(0x4a) bytes 
File:  C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll 
String:  personalprescriptioncode 
Fields: 
        MT Field Offset     Type VT  Attr   Value Name 
000007fef66dc848 40000ed  8   System.Int32 1 instance    24 m_stringLength 
000007fef66db388 40000ee  c   System.Char 1 instance    70 m_firstChar 
000007fef66d6960 40000ef  10  System.String 0 shared   static Empty 
           >> Domain:Value 0000000000174e10:00000000019d1420 000000001a886f50:00000000019d1420 << 

그래서 소스 코드는 Active Directory에서 personalprescriptioncode을 (영속 계층에 사용되는 것)이 실패 인출하고자 할 때. 스택을 다시 보면 Copy 메서드를 실행할 때입니다. DirectoryServiceLib.LdapProvider.DirectoryPost.Copy (DirectoryServiceLib.LdapProvider.DirectoryPost)

는 그래서 소스 코드에서 찾고 :

DirectoryPost postInLimbo = DirectoryPostFactory.Instance().GetDirectoryPost(LdapConfigReader.Instance().GetConfigValue("LimboDN"), idGenPerson.ID.UserId); 
if (postInLimbo != null) 
    newPost.Copy(postInLimbo); 
이 코드는 동일한 사용자 아이디와 OU = 저승의 다른 게시물에 대한 찾고

및 하나를 찾으면 속성을 새 게시물에 복사합니다. 이 경우에는 개인용 코드로 실패합니다. 나는 Active Directory에서 OU = Limbo를 보았고 그 게시물은 속성 personalprescriptioncode = 31243으로 존재합니다.

질문 1 : 일부 매개 변수 및 지역에 대한 데이터가 표시되지 않는 이유는 무엇입니까? 메모리 덤프가 만들어지기 전에 청소 한 사람이 GC입니까?

질문 2 :이 문제의 해결책을 얻으려면 더 이상 할 수 있습니까?

+1

질문의 제목을 변경해야합니다. WCF와 관련이 없으므로 디렉토리 오류입니다. – fejesjoco

+0

맞아요, 그 질문은 뭔가 다른 것으로 발전했습니다. 이제 끝났습니다 – Drazar

답변

1
// 
// MessageId: E_ADS_BAD_PARAMETER 
// 
// MessageText: 
// 
// One or more input parameters are invalid 
// 
#define E_ADS_BAD_PARAMETER    _HRESULT_TYPEDEF_(0x80005008L) 

코드가 최적화되어 있기 때문에 인수/로컬 변수 값을 볼 수 없습니다. 스택 프레임이 아니라 호출시 CPU 레지스터에 저장됩니다. 더 이상 건초 더미에서 바늘을 찾을 수 없습니다.

+1

설명 할 수없는 경우입니다 :). 그럼 난 다음에 발생할 때까지 몇 가지 추가 디버깅 정보를 어디에 둘 수 있는지 알고 있습니다. – Drazar