The code at clr/src/debug/ee/rcthread.cpp line 1082 is reporting that a
call to Win32 SetEvent() failed.  The HRESULT value reported in the
callstack is -2147024890, which is 0x80070006, and that translates to
Win32 ERROR_INVALID_HANDLE.

I'm not sure what would cause this error - the HANDLE in question is
m_rgDCB[IPC_TARGET_OUTOFPROC]->m_leftSideEventAvailable], which is
created in the debuggee process and passed to the debugger via
shared-memory.  I can't think of an obvious reason for the error,
without seeing the value of the HANDLE and looking at the state of the
debuggee process.  One thing to note is that the HANDLEs are passed
cross-process via a relatively fragile mechanism in the PAL, since each
PAL process has its own private HANDLE table.  In Win32, you'd use
DuplicateHandle() to make it available to another process, but the PAL
uses PAL_LocalHandleToRemote() and PAL_RemoteHandleToLocal() to do the
handoff.  You might want to instrument CreateEvent(),
PAL_LocalHandleToRemote(), PAL_RemoteHandleToLocal() and
PAL_CloseHandle() to log the HANDLE values in both debuggee and debugger
proceses.  That might tell you what happened to the HANDLE just before
the SetEvent() failure. 

As for THREADEntry(), this routine marks the beginning of a new PAL
thread.  The callstack included in your mail would come from a call to
Win32 CreateThread(), with DebuggerRCThread::ThreadProcStatic as the
lpStartAddress parameter.  The PAL calls pthread_create() with
THREADEntry as the function address, so that it can run per-thread
intialization before calling the actual lpStartAddress function.

Barry
This posting is provided "AS IS" with no warranties, and confers no
rights.

-----Original Message-----
From: Discussion of the Rotor Shared Source CLI implementation
[mailto:[EMAIL PROTECTED] On Behalf Of Archana
Sent: Saturday, December 20, 2003 8:49 AM
To: [EMAIL PROTECTED]
Subject: [DOTNET-ROTOR] Help needed wrt thread synchronization

Hi,
 As part of writing a concurrent GC the call to CommonTripThread() was
added to the GC code in addition to lot of other changes. Everything
seemed to work ok before i added this call but now i am getting the
following unrecoverable error. Is this occurring because of the added
call?
generally, when can such an error occur? the problem is i dont know
where the call to ThreadEntry is happening from.
Please help.

Merry Christmas and a Very Happy New Year to all of you.

Regards
archana


Microsoft (R) Shared Source CLI Test Debugger Shell Version 1.0.0003.0
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

(cordbg) a 0xdea3

Program received signal SIGTRAP, Trace/breakpoint trap.
DBG_DebugBreak () at ../context.c:391
391     }
Current language:  auto; currently c
(gdb) bt
#0  DBG_DebugBreak () at ../context.c:391
#1  0x2808c690 in DebugBreak () at ../debug.c:220
#2  0x2875c608 in Debugger::UnrecoverableError (this=0x8079100,
errorHR=-2147024890, errorCode=0,
    errorFile=0x28b85500
"/usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../rcthread.cpp",
    errorLine=1082, exitThread=false)
    at
/usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../debugger.cpp:920
9
#3  0x287677f9 in DebuggerRCThread::SendIPCEvent (this=0x28db4008,
iTarget=IPC_TARGET_OUTOFPROC)
    at
/usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../rcthread.cpp:108
3
#4 0x287543bc in Debugger::SendCreateAppDomainEvent (this=0x8079100,
pRuntimeAppDomain=0x806d800,
    fAttaching=1) at
/usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../debugger.cpp:559
6
#5 0x2875e108 in Debugger::IterateAppDomainsForAttach (this=0x8079100,
    EventsToSend=ONLY_SEND_APP_DOMAIN_CREATE_EVENTS,
fEventSent=0x80bd504,
fAttaching=1)
    at
/usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../debugger.cpp:988
5
#6  0x2874fb99 in Debugger::SendSyncCompleteIPCEvent (this=0x8079100)
    at
/usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../debugger.cpp:373
0
#7  0x2874ff29 in Debugger::TrapAllRuntimeThreads (this=0x8079100,
pAppDomain=0x0, fHoldingThreadStoreLock=0)
    at
/usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../debugger.cpp:381
9
#8  0x28758d70 in Debugger::HandleIPCEvent (this=0x8079100,
event=0x80bd614, iWhich=IPC_TARGET_OUTOFPROC)
    at
/usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../debugger.cpp:759
4
#9  0x28766cd0 in DebuggerRCThread::MainLoop (this=0x28db4008,
temporaryHelp=false)
    at
/usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../rcthread.cpp:734
#10 0x287666bd in DebuggerRCThread::ThreadProc (this=0x28db4008)
    at
/usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../rcthread.cpp:590
#11 0x28767222 in DebuggerRCThread::ThreadProcStatic
(parameter=0x28db4008)
    at
/usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../rcthread.cpp:861
#12 0x281030f6 in THREADEntry (lpParam=0x807ac00) at ../thread.c:1677
#13 0x2818ff93 in _thread_start () from /usr/lib/libc_r.so.4
#14 0x0 in ?? ()

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com
NEW! ASP.NET courses you may be interested in:

2 Days of ASP.NET, 29 Sept 2003, in Redmond
http://www.develop.com/courses/2daspdotnet

Guerrilla ASP.NET, 13 Oct 2003, in Boston
http://www.develop.com/courses/gaspdotnet

View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com
NEW! ASP.NET courses you may be interested in:

2 Days of ASP.NET, 29 Sept 2003, in Redmond
http://www.develop.com/courses/2daspdotnet

Guerrilla ASP.NET, 13 Oct 2003, in Boston
http://www.develop.com/courses/gaspdotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to