ID:               37483
 Comment by:       iburguer at hotmail dot com
 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:

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.


Previous Comments:
------------------------------------------------------------------------

[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.

------------------------------------------------------------------------

[2006-06-30 06:50:22] danielm at deekora dot tv

I suspect the reason it occurs when no one is using the web site is
because the warning appears when the application pool is recycled.

After disabling automatic pool recycling the warning has not appeared.

to replicate the problem:
> Open a php site that uses the isapi module

> run the following script
======================================
'Recycle all application pools on server strComputer 
strComputer = "your server name in here"
Set objWMIService =
GetObject("winmgmts:{authenticationLevel=pktPrivacy}\\" & strComputer &
"\root\microsoftiisv2")

Set colItems = objWMIService.ExecQuery("Select * From
IIsApplicationPool")

For Each objItem in colItems
    objItem.Recycle
Next

wscript.echo "Done!"
======================================

> Check iis logs

------------------------------------------------------------------------

[2006-06-28 15:34:51] [EMAIL PROTECTED]

Please don't add any comments to this report if you have nothing to say
except for "me too".

------------------------------------------------------------------------

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

Reply via email to