Worked just fine for me…
I inserted a loop
bool go = false;
do {
Sleep(1000);
} while(!go);
right before
if(!CreateProcessW(NULL, …
attached windbg when the process hang in that loop, set bp’s exactly as you did
(bp ntdll!ntcreateprocess and bp ntdll!ntcreateprocessex)
and set “go” to 1 manually from WinDbg. I hit
Breakpoint 1 hit
. . .
ntdll!ZwCreateProcessEx:
as expected (note the name) with (expected) stack
0012f368 7c81923e ntdll!ZwCreateProcessEx
0012fdb8 7c80235e kernel32!CreateProcessInternalW+0x1327
0012fdf0 00411481 kernel32!CreateProcessW+0x2c
0012ff68 00411af6 CreateProcess!wmain+0xa1 [c:!projects\createprocess\createprocess.cpp @ 27]
0012ffb8 0041193d CreateProcess!__tmainCRTStartup+0x1a6 [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 594]
0012ffc0 7c816fd7 CreateProcess!wmainCRTStartup+0xd [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 414]
0012fff0 00000000 kernel32!BaseProcessStart+0x23
Can it be that you set bp’s too early? Will “bu” (break undefined) help?
-------------- Original message --------------
From: xxxxx@rediffmail.com
Thank you for the replies. I am still unable to trigger it. I am cutting pasting
relevant parts for your perusal.
I test this on the putty program
CreateProcess(L"putty.exe", NULL, NULL, NULL, FALSE,
CREATE_DEFAULT_ERROR_MODE,NULL, NULL, &si, &pi );
WinDBG
Opened log file ‘creatproc.log’
CommandLine: C:\Analyzer\insideTM\debug\insideTM.exe
Symbol search path is: SRV*\Symbols* http://msdl.microsoft.com/download/symbols
Executable search path is:
ModLoad: 00400000 0041e000 insideTM.exe
ModLoad: 7c900000 7c9b0000 ntdll.dll
ModLoad: 7c800000 7c8f5000 C:\WINDOWS\system32\kernel32.dll
ModLoad: 4d4f0000 4d548000 C:\WINDOWS\system32\WINHTTP.dll
ModLoad: 77c10000 77c68000 C:\WINDOWS\system32\msvcrt.dll
ModLoad: 77f60000 77fd6000 C:\WINDOWS\system32\SHLWAPI.dll
ModLoad: 77dd0000 77e6b000 C:\WINDOWS\system32\ADVAPI32.dll
ModLoad: 77e70000 77f01000 C:\WINDOWS\system32\RPCRT4.dll
ModLoad: 77f10000 77f57000 C:\WINDOWS\system32\GDI32.dll
ModLoad: 7e410000 7e4a0000 C:\WINDOWS\system32\USER32.dll
ModLoad: 10480000 10558000
C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.20404.44800_x
-ww_9e02369f\MSVCP90D.dll
ModLoad: 10200000 10323000
C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.20404.44800_x
-ww_9e02369f\MSVCR90D.dll
(75c.e64): Break instruction exception - code 80000003 (first chance)
eax=00251eb4 ebx=7ffd6000 ecx=00000003 edx=00000008 esi=00251f48 edi=00251eb4
eip=7c901230 esp=0012fb20 ebp=0012fc94 iopl=0 nv up ei pl nz na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000202
ntdll!DbgBreakPoint:
7c901230 cc int 3
0:000> bp ntdll!ntcreateprocessex
0:000> bp ntdll!ntcreateprocess
0:000> bl
0 e 7c90d769 0001 (0001) 0:**** ntdll!ZwCreateProcessEx
1 e 7c90d754 0001 (0001) 0:**** ntdll!ZwCreateProcess
0:000> g
ModLoad: 76390000 763ad000 C:\WINDOWS\system32\IMM32.DLL
eax=77c3f88a ebx=00000000 ecx=77c3e9f9 edx=77c61a70 esi=7c90e88e edi=00000000
eip=7c90eb94 esp=0012fe00 ebp=0012fefc iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
ntdll!KiFastSystemCallRet:
7c90eb94 c3 ret
0:000>
0:000> g
^ No runnable debuggees error in ‘g’
Closing open log file creatproc.log
I can however hit createfile using the same procedure. Any ideas as to why this
is happening?
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer