ID: 37483 Comment by: lascjr at bol dot com dot br Reported By: jneill at gamedaytv dot com Status: Open Bug Type: IIS related Operating System: Windows 2003 SP 1 PHP Version: 5.1.4 New Comment:
I have same problem, i has version 5.1.4, i have read and use this instructions (http://bugs.php.net/bugs-generating-backtrace-win32.php, i have tested with Last Snap 5.2 http://snaps.php.net/win32/php5.2-win32-200607162230.zip and http://snaps.php.net/win32/php5.2-dbgpack-win32-latest.zip) but the Debug don´t work, i have installed MSVC6, when PHP crashes the system show: --------------------------- w3wp.exe - Application Error --------------------------- The instruction at "0x0c107dc8" referenced memory at "0x0c107dc8". The memory could not be "read". Click on OK to terminate the program Click on CANCEL to debug the program --------------------------- OK Cancel --------------------------- I click at Cancel button to debug the process, but i only received the new Msgbox with: --------------------------- w3wp.exe - Application Error --------------------------- The instruction at "0x0c107dc8" referenced memory at "0x0c107dc8". The memory could not be "read". Click on OK to terminate the program --------------------------- OK --------------------------- I am not totally sure, but only downgrade to 5.0.3 solves my problem, 5.0.4 or newer are the same problem. I use Windows Server 2003 Web Edition SP1, full patched, i only use extensions php_mysql and php_mbstring PHP Bug Team, please create the ambient for test, it´s very simple, backtrace really don´t show nothing expect i related. Previous Comments: ------------------------------------------------------------------------ [2006-07-13 07:23:24] iburguer at hotmail dot com One last thing. I removed php5isapi.dll from IISAPI filters (but left it to handle the .php mapping in the "application settings" tab of the resource properties in IIS). The problem seems to be solved. I can run now phpinfo(), then stop the w3svc service and nothing crashes. I have no idea if I'm missing something having removed iisapi filter. Greetings, Ignacio Burgueño ------------------------------------------------------------------------ [2006-07-13 06:16:19] iburguer at hotmail dot com Hi. It's quite hard to get a backtrace, because both php5isapi.dll and php5ts.dll have been unloaded when the exception raises. So I ran windbg, attached it to inetinfo.exe, run a test case, then stopped the IIS service. I noticed that php5ts.dll leaves some structures allocated in the Thread Local Storage (which is not good, and may lead to this problem). Anyway, after the exception occured, I reloaded the dll in the debugger, and so I got this backtrace: ChildEBP RetAddr 11f4f90c 00403368 ntdll!DbgBreakPoint 11f4fadc 00406843 vrfcore!VerifierStopMessageEx+0x3d3 [d:\avrf\x86fre\base\avrf\avrf30\vrfcore\sdk.cpp @ 471] 11f4fb04 003b2139 vrfcore!VfCoreRedirectedStopMessage+0x86 [d:\avrf\x86fre\base\avrf\avrf30\vrfcore\stopredirect.cpp @ 103] 11f4fb34 003a8f19 vfbasics!VfBasicsStopMessage+0x1c9 [d:\avrf\x86fre\base\avrf\avrf30\providers\basics\basics.cpp @ 1045] 11f4fb98 003a8658 vfbasics!AVrfpCheckFirstChanceException+0x139 [d:\avrf\x86fre\base\avrf\avrf30\providers\basics\support.c @ 966] 11f4fba8 7c942dcf vfbasics!AVrfpVectoredExceptionHandler+0x18 [d:\avrf\x86fre\base\avrf\avrf30\providers\basics\support.c @ 313] 11f4fbc8 7c9377da ntdll!RtlCallVectoredExceptionHandlers+0x48 11f4fc40 7c90eafa ntdll!RtlDispatchException+0x19 11f4fc40 07a25c90 ntdll!KiUserExceptionDispatcher+0xe 11f4ff40 77c3a243 php5ts!xmlGetGlobalState+0xd0 11f4ff74 003a4e8f msvcrt!_endthread+0xaf 11f4ffb4 7c80b50b vfbasics!AVrfpStandardThreadFunction+0x6f [d:\avrf\x86fre\base\avrf\avrf30\providers\basics\thread.c @ 553] 11f4ffec 00000000 kernel32!BaseThreadStart+0x37 Note: I'm also using Microsoft's Application Verifier. That's how I found out about the TLS issue, and also is responsible for those vrfcore and vfbasics functions that appear in the stack. If you need further information, I'd be glad to help. ------------------------------------------------------------------------ [2006-07-12 21:49:45] iburguer at hotmail dot com Hi. I have the same issue here (development box, Windows XP Pro/sp2). I have a Dr. Watson dump and log. Where should I send those files? Regards, Ignacio ------------------------------------------------------------------------ [2006-07-12 18:36:25] ferrante at aracnet dot com I am a software developer and would be happy to provide any additional information or collect any other diagnostics that would help resolve this issue, including providing access to a machine on which the problem occurs that has tools such as WinDbg and the IIS "Debug Diagnostics Tool" installed. Please let me know how I can help out, and thanks for all your efforts. ------------------------------------------------------------------------ [2006-07-12 18:29:06] ferrante at aracnet dot com These are related issues in the bug database that seem to be describing the same problem: Bug #36853 Worker process crashes after application pool recycle Bug #33373 IIS worker Process continually restarts Bug #37575 Faulting application w3wp.exe Bug #35263 Crash during IIS Restart We have the situation where the access violation appears when the process is restarted. We followed the advice above to minimize error messages by putting the PHP app into its own application pool and not letting the app pool get recycled. However, on iisreset or stop/restart of the application pool, the access violation is generated, even on the snapshot code as recent as php5.2-win32-200607120630. Data Execution Prevention (DEP) was implicated in Bug #36853 and on one of our servers we were able to mask the error by added an DEP exception for the w3wp.exe executible. However on another server this did not work. Bug #36853 also mentions changing the dynamic extensions load order around, but in our case it did not seem to help since we are able to reproduce the problem with PHP installed, no dynamic extensions enabled, with a simple echo("hello world"); php file. If the app pool is recycled or iisreset occurs, the php5ts.dll will generate an exception on unload. Bug #36853 also mentions that recompiling php from source with a Visual Studio 2005 can fix the issue also. We have not yet tried that step. Hopefully this information helps to resolve the issue. Thanks. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/37483 -- Edit this bug report at http://bugs.php.net/?id=37483&edit=1