<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<META content="MSHTML 6.00.6000.16608" name=GENERATOR></HEAD>
<BODY id=MailContainerBody
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px"
bgColor=#ffffff leftMargin=0 topMargin=0 CanvasTabStop="true"
name="Compose message area">
<DIV><FONT face=Arial size=2>I don't have the exact error message, but you can
see an exception being reported in the stack backtrace:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>0:000> k<BR>ChildEBP RetAddr <BR>0012f6f0
7ffe0304 ntdll!KiRaiseUserExceptionDispatcher+0x37<BR>0012f6f4 77f426cb
SharedUserData!SystemCallStub+0x4<BR>0012f6f8 71b21e1f
ntdll!NtDeviceIoControlFile+0xc<BR>0012f748 71b21f29
MSWSOCK!SockGetTdiHandles+0x5f<BR>0012f758 71b22071
MSWSOCK!SockNotifyHelperDll+0x25<BR>0012f7c8 71b30791
MSWSOCK!SockCloseSocket+0x1ec<BR>0012f7d8 71bf27c6
MSWSOCK!DeleteSockets+0x31<BR>0012f804 71b309b3
WS2HELP!WahEnumerateHandleContexts+0x92<BR>0012f828 71c0d89d
MSWSOCK!WSPCleanup+0x73<BR>0012f834 71c09c1a
WS2_32!DPROVIDER::WSPCleanup+0x1d<BR>0012f86c 71c02c22
WS2_32!CleanupProtocolProviders+0x23<BR>0012f884 71c06572
WS2_32!NSCATALOG::EnumerateCatalogItems+0x22<BR>0012f8a0 71c081b4
WS2_32!DPROCESS::~DPROCESS+0x6f<BR>0012f8b8 10172fe3
WS2_32!WSACleanup+0x40<BR>0012f8c8 100d0e2a nmpi!MPIDU_Sock_finalize+0x53
<BR>0012fd50 100cf01a nmpi!iPMI_Finalize+0x15a <BR>0012fd5c 100c9afe
nmpi!PMI_Finalize+0x1a <BR>0012fd6c 100a14bd nmpi!MPIDI_CH3_Finalize+0x7e
<BR>0012fdec 1003bac6 nmpi!MPID_Finalize+0x2dd <BR>0012fdfc 00401e0f
nmpi!PMPI_Finalize+0x96 </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>0:000> kb<BR>ChildEBP RetAddr Args to
Child
<BR>0012f6f0 7ffe0304 77f426cb 71b21e1f
00000328<BR>ntdll!KiRaiseUserExceptionDispatcher+0x37<BR>0012f6f4 77f426cb
71b21e1f 00000328 00000360 SharedUserData!SystemCallStub+0x4<BR>0012f6f8
71b21e1f 00000328 00000360 00000000 ntdll!NtDeviceIoControlFile+0xc</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>and here's how !htrace looks like on handle
0x328</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>0:000> !htrace
0x328<BR>--------------------------------------<BR>Handle = 0x00000328 - *** BAD
REFERENCE ***<BR>Thread ID = 0x00000c54, Process ID = 0x00000c50</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>0x71b21f29:
MSWSOCK!SockNotifyHelperDll+0x00000025<BR>0x71b30791:
MSWSOCK!DeleteSockets+0x00000031<BR>0x71b309b3:
MSWSOCK!WSPCleanup+0x00000073<BR>0x71c0d89d:
WS2_32!DPROVIDER::WSPCleanup+0x0000001d<BR>0x71c02c22:
WS2_32!NSCATALOG::EnumerateCatalogItems+0x00000022<BR>--------------------------------------<BR>Handle
= 0x00000328 - CLOSE<BR>Thread ID = 0x00000c54, Process ID =
0x00000c50</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>0x10174f88:
nmpi!easy_create+0x00000228<BR>0x101747cc:
nmpi!MPIDU_Sock_post_connect+0x0000011c<BR>0x100d04b1:
nmpi!uPMI_ConnectToHost+0x00000041<BR>0x100cfc8a:
nmpi!iPMI_Init+0x0000049a<BR>0x100cefd8: nmpi!PMI_Init+0x00000578<BR>0x100ca614:
nmpi!MPIDI_CH3_Init_process_group+0x00000034<BR>0x100caa6c:
nmpi!MPIDI_CH3_Init+0x0000003c<BR>0x100a3972:
nmpi!MPID_Init+0x000001b2<BR>0x10056bff:
nmpi!MPIR_Init_thread+0x0000025f<BR>0x10056883:
nmpi!PMPI_Init+0x00000053<BR>0x0040132a:
imb!main+0x0000002a<BR>--------------------------------------<BR>Handle =
0x00000328 - OPEN<BR>Thread ID = 0x00000c54, Process ID =
0x00000c50</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>0x71b22e43:
MSWSOCK!SockSocket+0x000003b0<BR>0x71b23008:
MSWSOCK!WSPSocket+0x00000126<BR>0x71c02e5d:
WS2_32!WSASocketW+0x000000ce<BR>0x71c12447:
WS2_32!WSASocketA+0x00000057<BR>0x10174d95:
nmpi!easy_create+0x00000035<BR>0x101747cc:
nmpi!MPIDU_Sock_post_connect+0x0000011c<BR>0x100d04b1:
nmpi!uPMI_ConnectToHost+0x00000041<BR>0x100cfc8a:
nmpi!iPMI_Init+0x0000049a</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Finaly, the call before the exception, on
easy_create:</FONT></DIV>
<DIV><FONT face=Arial size=2>0:000> ub 0x10174f88<BR>nmpi!easy_create+0x20e
<BR>10174f6e 8b55dc
mov edx,dword ptr [ebp-24h]<BR>10174f71
52
push edx<BR>10174f72
8bfc
mov edi,esp<BR>10174f74 ff15989a2810
call dword ptr
[nmpi!_imp__GetCurrentProcess<BR>(10289a98)]<BR>10174f7a
3bfc
cmp edi,esp<BR>10174f7c
e80f0dfaff call
nmpi!_RTC_CheckEsp (10115c90)<BR>10174f81
50
push eax<BR>10174f82 ff15949a2810
call dword ptr [nmpi!_imp__DuplicateHandle]</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Best regards,</FONT></DIV>
<DIV><FONT face=Arial size=2> Calin</FONT></DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><FONT face=Arial></FONT><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=jayesh@mcs.anl.gov
href="mailto:jayesh@mcs.anl.gov">Jayesh Krishna</A> </DIV>
<DIV><B>Sent:</B> Friday, March 28, 2008 4:17 PM</DIV>
<DIV><B>To:</B> <A title=calin@dolphinics.no
href="mailto:calin@dolphinics.no">'Calin Iaru'</A> </DIV>
<DIV><B>Cc:</B> <A title=mpich-discuss@mcs.anl.gov
href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</A> </DIV>
<DIV><B>Subject:</B> RE: [mpich-discuss] DuplicateHandle on
easy_create</DIV></DIV></DIV>
<DIV><FONT face=Arial size=2></FONT><BR></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=132031215-28032008>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=132031215-28032008> If you are referring to the use of
DuplicateHandle() in sock.c (src/mpid/common/sock/iocp/sock.c : easy_create()),
it is to prevent child processes from inheriting the socket (if you would like
to duplicate the handle to be used by another process as you mentioned one
should use WSADuplicateSocket()).</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=132031215-28032008> Are you getting any messages from your App
verifier ?</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=132031215-28032008><FONT face=Arial color=#0000ff
size=2>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=132031215-28032008><FONT face=Arial color=#0000ff
size=2>Jayesh</FONT></SPAN></DIV>
<DIV><SPAN class=132031215-28032008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV>
<HR tabIndex=-1>
</DIV>
<DIV><FONT face=Tahoma size=2><B>From:</B> <A
href="mailto:owner-mpich-discuss@mcs.anl.gov">owner-mpich-discuss@mcs.anl.gov</A>
[mailto:owner-mpich-discuss@mcs.anl.gov] <B>On Behalf Of </B>Calin
Iaru<BR><B>Sent:</B> Friday, March 28, 2008 9:35 AM<BR><B>To:</B>
mpich-discuss@mcs.anl.gov<BR><B>Subject:</B> [mpich-discuss] DuplicateHandle on
easy_create<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2>A socket object should not be duplicated using
DuplicateHandle. For reference, see:</FONT></DIV>
<DIV><FONT face=Arial size=2><A
href="http://msdn2.microsoft.com/en-us/library/ms724251(vs.85).aspx">http://msdn2.microsoft.com/en-us/library/ms724251(vs.85).aspx</A></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The problem is that if an application runs under
the control of Application Verifier, the exception may be reported and it will
require expert skills to trace the cause - use !htrace from WinDbg. Without
AppVer, no exception is raised.</FONT></DIV></BODY></HTML>