php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38111 PHP crashes IIS worker process and application pool
Submitted: 2006-07-15 17:09 UTC Modified: 2010-10-20 18:14 UTC
Votes:111
Avg. Score:4.6 ± 0.8
Reproduced:104 of 107 (97.2%)
Same Version:40 (38.5%)
Same OS:84 (80.8%)
From: svendavidh at hotmail dot com Assigned: pajoye (profile)
Status: Not a bug Package: IIS related
PHP Version: 5.2.8 OS: Windows Server 2003 Std. Ed. R2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: svendavidh at hotmail dot com
New email:
PHP Version: OS:

 

 [2006-07-15 17:09 UTC] svendavidh at hotmail dot com
Description:
------------
Hello, I see that other people have reported a similar bug, and that this bug http://bugs.php.net/bug.php?id=35612 claims to be fixed. However, I encounter a lot of trouble with PHP v5.1.4 (I haven't tried any other version)

I feel like inserting error logs from the Windows Event log here, but I'm trying to stick to what this web page is telling me - not to put any huge text in this box.

What did I do? I installed a FRESH copy of Windows Server 2003 Std. Ed. R2 and PHP v5.1.4

Extensions that are loaded:
extension=php_mbstring.dll
extension=php_gd2.dll
extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll

Sessions enabled
Browscap enabled

What did I expect? I expected PHP to work smootly on my system

What actually happened? PHP makes IIS worker process and the application pool to terminate.

Do I know for a fact that PHP is causing the trouble? I do, because I've run a debugging tool called IIS Diagonstics, and it has traced the problem to be php5ts.dll

Also, the error was not there before I installed PHP. If I unload the php5isapi.dll from the IIS server the problem is gone. 

See the bug report here:
http://eventlog.no/php/IIS_Report__Date_07_14_2006__Time_11_41_51AM__903.mht

Use Internet Explorer to open it (Sorry, don't know of any other way)

Don't get me wrong. I love PHP, but it would be great if this error was solved, if possible :-)

Please get back to me if you want the event logs from Windows

Reproduce code:
---------------
There is no specific code that reproduces this error. Only the fact that PHP is installed causes the problems

Expected result:
----------------
N/A

Actual result:
--------------
Two examples from windows event logs:

Event Type:	Warning
Event Source:	W3SVC
Event Category:	None
Event ID:	1009
Date:		14.07.2006
Time:		10:26:02
User:		N/A
Computer:	IKT
Description:
A process serving application pool 'DefaultAppPool' terminated unexpectedly. The process id was '2820'. The process exit code was '0xc0000005'.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


Event Type:	Error
Event Source:	Application Error
Event Category:	(100)
Event ID:	1000
Date:		15.07.2006
Time:		00:09:37
User:		N/A
Computer:	IKT
Description:
Faulting application w3wp.exe, version 6.0.3790.1830, faulting module unknown, version 0.0.0.0, fault address 0x01b45c80.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 41 70 70 6c 69 63 61 74   Applicat
0008: 69 6f 6e 20 46 61 69 6c   ion Fail
0010: 75 72 65 20 20 77 33 77   ure  w3w
0018: 70 2e 65 78 65 20 36 2e   p.exe 6.
0020: 30 2e 33 37 39 30 2e 31   0.3790.1
0028: 38 33 30 20 69 6e 20 75   830 in u
0030: 6e 6b 6e 6f 77 6e 20 30   nknown 0
0038: 2e 30 2e 30 2e 30 20 61   .0.0.0 a
0040: 74 20 6f 66 66 73 65 74   t offset
0048: 20 30 31 62 34 35 63 38    01b45c8
0050: 30                        0       


I also get dialog-boxes saying: w3wp.exe - Application error. The instruction at "0x01b45c80" referenced memory at "0x01b45c80". The memory could not be "read"

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-16 16:45 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2006-07-16 18:23 UTC] svendavidh at hotmail dot com
Hello sir! I'd like to do exactly what you say. But do you have any hints on where to get a hold of MSVC6? To be honest, I'm not even sure what it is. I guess it's a tool for programming Visual C?

I've googled the net, but I can't find anywhere I can download MSVC6. I assume it's not freeware? Any additional info regarding this would be appreciated.

Also, I can't find a debug-pack for v5.1.4. Can I use the one for v5.2? (http://snaps.php.net/win32/php5.2-dbgpack-win32-latest.zip)

Once I get some answers to this I'll do be best (and 1st) attempt to create that backtrace for you
 [2006-07-17 12:29 UTC] svendavidh at hotmail dot com
PS: I'm going on holiday tomorrow, so I won't be able to reply to answers here before Monday July 24th. Just wanted to let you know that
 [2006-07-24 16:08 UTC] cyberchrist at futura dot net
svendavidh:

  MSVC6 is Microsoft Visual C++ 6.0.  Presumably, one could accomplish the same task on later versions of Microsoft Visual Studio.  How, I don't know, nor could I recommend installing a development studio on a live production server.  Looks like someone needs to set up a Win2K3 R2 server offline, load up visual studio, and run the backtrace.  I have neither the equipment nor the software to do this.  Here's hoping you do, I just realized that I'm suffering from this same bug myself.
 [2006-07-27 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2006-11-03 09:18 UTC] albert at siprep dot org
Same problem with PHP 5.1.6.
 [2007-03-20 14:32 UTC] dev at e-concept dot org
I've got the same problem with php 5.2.1.1 windows vista pro II7
 [2007-04-09 13:09 UTC] whereismys4 at yahoo dot com
Similar problem with IIS 6.0, PHP 5.2.1.  IIS worker terminated.  This is a problem for me since i have a firm developing a commerce website in PHP, this is happening on a test server which has the following software installed: 

Windows 2K3 Server R2 sp2
PHP 5.2.1
MySQL 5,0,37
IIS 6.0

I've googled this error and all threads point to PHP.  Please provide an update to this bug.  Thanks

Mike
 [2007-05-10 15:33 UTC] roger dot weiss at gmail dot com
I am also getting these. 

This only start happening after we installed 5.2.1.1. I will install 5.2.2 and let you know if the problem persists.

faulting module php5isapi.dll, version 5.2.1.1, fault address 0x000023d7
 [2007-05-22 12:02 UTC] rzhaman at hotmail dot com
Same here with PHP 5.2.1, Windows Server 2003 (SP1), and IIS 6. Clean install.
 [2007-05-23 09:22 UTC] bjoern dot andersen at atosorigin dot com
Same here with 5.2.2 in win2k3SP2/IIS6 32 Bit.
PHP installed as ISAPI extension, not filter.
Many concurrent application pools.

Event Type:	Information
Event Source:	Application Error
Event Category:	(100)
Event ID:	1004
Date:		23.05.2007
Time:		11:09:44
User:		N/A
Computer:	P-NG-W3PHP2
Description:
Reporting queued error: faulting application w3wp.exe, version 6.0.3790.3959, faulting module php5isapi.dll, version 5.2.2.2, fault address 0x000023d7.

Happens often, but not always. In variour applications.
I am willing to give feedback or debug info, if you specify what you need.
 [2007-05-23 09:35 UTC] bjoern dot andersen at atosorigin dot com
Additional Info:
The problem seems to go away when all webs run in the same application pool (No multithreading). So there is a point to start.

It's not a real workaround for us, because in the huge production environment we run, we need to separate the application in safe pools.
 [2007-05-27 05:03 UTC] doug at shontz dot net
I am having this problem also.  Clean installs of Vista (IIS7) and Server 2003 Enterprise (IIS6).  PHP Version 5.2.2 with no additional plugins or filters (isapi or otherwise) on either box.  Disable PHP and the problem stops...enable it and I can log it happening multiple times within an hour.  I am running open source apps such as Joomla and WordPress, but I can get this to happen without having any pages on the site at all.
 [2007-07-07 11:06 UTC] mitch at mitchellgeere dot com
I am running Windows Vista Ultimate with PHP 5.2, MySql, IIS 7.0. I am evaluating php, so far asp.net is holding my favour.
 [2007-07-11 18:11 UTC] zeon77 at gmail dot com
Same with PHP 5.2.3, w2k3 r2 x86, iis6.
PHP installed as ISAPI extension.
Applications using PHP are running in a separate App pool.
Error occurs in every half an hour
 [2007-07-15 13:35 UTC] zeon77 at gmail dot com
The moodle_cron service causes the problem to me...
 [2007-10-30 16:03 UTC] huet_bartels at hotmail dot com
I have the same issue.  
I am using PHP/5.2.3 on IIS6 with plesk installed.

The application pool just crashes every 1/2 to 1 hour.
 [2007-11-13 10:35 UTC] ready725 at gmail dot com
This bug occurred for me as well.
PHP 5.2.5, Installed as ISAPI, IIS 7.0, Windows Vista Ultimate.

It happens about 10 minutes after loading a PHP script, then crash every half to 1 hour after that.

Can be reproduced by restarting the server, or running a PHP script and waiting for a few minutes.

*There might be side-effects to this as well (possibly a memory leak, because after receiving that error, I cannot run other applications without closing some; not comfirmed).
 [2008-01-10 16:54 UTC] chrisr at rho-technology dot com
Same issues:
OS: Windows Server 2003 Web Edition sp1
PHP: 5.1.4

All apps are in the default pool
 [2008-01-29 23:02 UTC] kitcargile at hotmail dot com
Found a MS KB doc related to this issue.
http://support.microsoft.com/kb/892988
 [2008-02-14 07:46 UTC] O dot Tuengeler at interactivedialog dot de
Have the same Problem using PHP 5.2.3, Windows Server 2003 (SP2), and IIS 6. Clean install. PHP installed as ISAPI extension.
 [2008-02-20 21:55 UTC] wim-bart at vanderwaals dot net
Same problem here. Configuration:

Windows Server 2003 Standard edition
Windows Server 2003 Web edition
Windows Server 2003 Enterprise Edition
Windows Server 2003 Standard edition R2

Additional software:
IIS version 6

Service packs:
Windows 2003 SP 2
Hotixes until 20th feb 2008

Popup window on console:
IIS Worker Process encountered a problem and needed to close.

Eventlog:
Source: Application Error
Catagory: (100)
Type: Error
Event ID: 1000
User: N/A
Description: Faulting application w3wp.exe, version 6.0.3790.3959, faulting module w3core.dll, version 6.0.3790.3959, fault address 0x000201b4.

Data:
0000: 41 70 70 6c 69 63 61 74   Applicat
0008: 69 6f 6e 20 46 61 69 6c   ion Fail
0010: 75 72 65 20 20 77 33 77   ure  w3w
0018: 70 2e 65 78 65 20 36 2e   p.exe 6.
0020: 30 2e 33 37 39 30 2e 33   0.3790.3
0028: 39 35 39 20 69 6e 20 77   959 in w
0030: 33 63 6f 72 65 2e 64 6c   3core.dl
0038: 6c 20 36 2e 30 2e 33 37   l 6.0.37
0040: 39 30 2e 33 39 35 39 20   90.3959 
0048: 61 74 20 6f 66 66 73 65   at offse
0050: 74 20 30 30 30 32 30 31   t 000201
0058: 62 34                     b4      

Related event:
Source: W3SVC
Catagory: None
Type: Warning
Event ID: 1009
User: N/A
Description: A process serving application pool '-------------' terminated unexpectedly. The process id was '3484'. The process exit code was '0xc0000005'.

Before the error occured:
Source: Security
Catagory: Logon/Logoff
Type: Success Access
Event ID: 538
User: [Computername]\IUSR_[computername]
Description: User Logoff:
 	User Name:	IUSR_[SERVERNAME]
 	Domain:		[SERVERNAME]
 	Logon ID:	(0x0,0x375E7)
 	Logon Type:	8

PHP Version:
PHP 5.2.5 (cli) (built: Nov  8 2007 23:18:51)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

Modules loaded:
extension=php_gd2.dll
extension=php_iisfunc.dll
extension=php_sockets.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_smtp.dll
extension=php_yaz.dll
extension=php_zip.dll
extension=php_win32std.dll

Same error with only following modules loaded:
extension=php_gd2.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_smtp.dll

Compiled modules:
bcmath, calendar, com_dotnet, ctype, date, dom, filter, ftp, gd, hash, iconv, iisfunc, json, libxml, mysql, mysqli, odbc, pcre, Reflection, session, SimpleXML, smtp, sockets, SPL, standard, tokenizer, wddx, win32std, xml, xmlreader, xmlwriter, zip, zlib

MySql and Mysqli versions:
php_mysql.dll 5.2.0.0
php_mysqli.dll 5.2.0.0

Applicationpool settings:
Recycle worker process in minutes: 1740
Shutdown workerprocess after idle for: 20 minutes
Request queue limit: 1000 requests
Enable pinging: 30 seconds
Enable rapid fail detection: 5 times/5 minutes

Errors in php.log:
None
 [2008-02-20 21:58 UTC] wim-bart at vanderwaals dot net
Found a MS KB doc related to this issue.
http://support.microsoft.com/kb/892988

Did not solve problem. Process Explorer tells php5ts.dll.
 [2008-03-03 05:17 UTC] markness at gmail dot com
I removed the ISAPI DLL from the ISAPI Filters in IIS7 (as I don't need to do HTTP_AUTH from PHP, which seems to be what is causing the problem), and I haven't had any crashes yet.

Hope it works for you too (assuming you don't do HTTP Authentication through PHP)
 [2008-03-03 17:01 UTC] oliver at webbworlds dot com
I've got a backtrace for this issue, I believe. I'm running PHP 5.2.1 on IIS6/Windows Server 2003 Web Edition with Service Pack 2.

Function     Arg 1     Arg 2     Arg 3   Source 
php5isapi!php_isapi_report_exception+17     00fbf970     00000033     02a6c7a0    
php5isapi!HttpExtensionProc+2e0     010237d0     010224d8     01023160    
w3isapi!ProcessIsapiRequest+100     01023748     01d01de0     00fbfe50    
w3core+68ff     00000000     00000000     010224d8    
w3core+67e0     00fbfee8     010224d8     00000000    
w3core+6764     010224d8     00000000     00fbfec4    
w3core+66f4     010224e0     010224d8     00000001    
w3core+66ae     00000001     00fbfee8     0026add0    
w3core+6648     00000000     00000000     00000000    
w3core+2264     00000000     00000000     00000000    
w3core+65ea     01021a10     01021a10     5a361650    
w3dt!UlAtqAllocateMemory+16f     0000050e     00000000     01021a14    
w3dt!UlAtqAllocateMemory+19a     00000000     0000050e     01021a14    
w3tp!THREAD_POOL::PostCompletion+c9     00000000     002685e8     5a300000    
w3tp!THREAD_POOL::~THREAD_POOL+153     002684d0     00000000     00000000    
w3tp+1da9     002685e8     00000000     00000000    
kernel32!GetModuleHandleA+df     5a301d70     002685e8     00000000    

PHP5ISAPI!PHP_ISAPI_REPORT_EXCEPTION+17
In w3wp__PID__3172__Date__03_03_2008__Time_04_49_41PM__995__Second_Chance_Exception_C0000005.dmp the assembly instruction at php5isapi!php_isapi_report_exception+17 in \\?\C:\php-5.2.1-Win32\php5isapi.dll from The PHP Group has caused an access violation exception (0xC0000005) when trying to read from memory location 0x00000090 on thread 0
 [2008-03-26 16:01 UTC] registrations at mjonesweb dot com
We are seeing the same issue.  We are running Windows Server 2003 Standard Edition R2 SP1.  I have loaded PHP 5.2.5 per the instructions listed at http://www.wikihow.com/Install-PHP-5-for-Iis-6-on-Windows-Xp-and-2003.  When I log into the server, I am usually presented with several dialog boxes stating "IIS Worker Process encountered a problem and needed to close".  I also see the same messages in the event log as others have already reported here.  Is there a fix anywhere in the near future?
 [2008-04-30 13:41 UTC] php at adam-jones dot net
Hi

Same issue here... 

Running server 2003, SP2.  PHP v5.1.4
I cant believe this hasnt been resolved... its been an on going issue through various 5.x ISAPI installations ive used on this system.

Any more info required please do get in touch...
 [2008-04-30 13:44 UTC] pajoye@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

PHP 5.2.6RC5 are available. Please try it.
 [2008-05-08 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2008-05-29 11:40 UTC] koch at infoman dot de
We experienced that bug with PHP 5.2.6 too. 
We have a separate Application Pool running with one worker process. The IIS crashes sometimes.
With more than one worker process running, e.g. 24, it crashes every 10 to 15 minutes.
 [2008-05-29 11:51 UTC] pajoye@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

@Koch

Please try to provide a backtrace and/or a script to reproduce your crashes.
 [2008-05-30 18:22 UTC] svendavidh at hotmail dot com
Hello, I'm the one that wrote this particular post back in 2006. I'm surprised to see that this bug is still raging :-(

Currently I'm running two Windows Server 2003 SP2 machines where I have PHP v5.2.4 installed, and I'm not suffering from this bug.

I have to admit though, that these particual servers are not under a heavy load. But when I initially wrote this post in 2006 I experienced these crashes all the time

Maybe some of you could try to install v5.2.4 to see if it'll help you? 

Regards, Sven David
 [2008-06-11 14:36 UTC] alexdykes at gmail dot com
I am also seeing this bug running Windows Home Server, this is basically Server 2k3 SBS edition.  PHP seems to function correctly as does IIS however when logging into a new RDP session on the server i have to dismiss this error about 3 times.  Its  manual install of PHP rather than a binary install.  I'm using PHP 5.2.6 IIS 6.
 [2008-06-19 02:08 UTC] huyhk at yahoo dot com
Same problem for me. 
PHP 5.1.6, Windows 2003 Standard Edition.
I got Event ID 1009 in System Error log so often (10-15 minutes once). Running Debug Diagnotistic Tool, I got this message

"In w3wp__PID__7784__Date__06_18_2008__Time_10_18_24PM__844__First chance exception 0XC0000005.dmp an access violation exception (0xC0000005) occured on thread 35 when another module attempted to call the following unloaded module: php5ts.dll."
 [2008-06-19 08:43 UTC] pajoye@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2008-06-25 03:15 UTC] kevin dot webb at f2bc dot net
What's wrong with they backtrace that was provided in the [3 Mar 5:01pm UTC] oliver at webbworlds dot com post?
 [2008-06-25 03:31 UTC] administrator at newviewlandscape dot com
Same problem running Windows 2003 Server SP2 and PHP 5.2.6. Is there a stable version of PHP for Windows 2003 Server SP2? I appears this bug exists though the entire 5.x version.
 [2008-06-25 06:54 UTC] pajoye@php.net
To generate a usable backtrace see:

http://bugs.php.net/bugs-generating-backtrace-win32.php 

A script to reproduce it could help as well (even if many scripts may crash, at least one can help to fix one issue).

I'm waiting some new test systems with IIS6 and 7 and server 2k3, 2k8 and Vista. That will help to reproduce some of the issues you get.


 [2008-06-25 16:33 UTC] kevin dot webb at f2bc dot net
Here you go.

Thread 0 - System ID 9988
Entry point   w3wp!wmainCRTStartup 
Create time   6/24/2008 9:06:45 PM 
Time spent in user mode   0 Days 0:0:0.93 
Time spent in kernel mode   0 Days 0:0:0.62 






Function     Arg 1     Arg 2     Arg 3   Source 
w3core!W3_SERVER::Terminate+164     00000000     01001418     010013e4    
w3core!UlW3Start+280     00000007     00263978     00000000    
w3wp!wmain+22a     00000007     00263978     00264560    
w3wp!wmainCRTStartup+12f     00000000     00000000     bffdb000    
kernel32!BaseProcessStart+23     010018f8     00000000     78746341    




W3CORE!W3_SERVER::TERMINATE+164In w3wp__PID__9860__Date__06_24_2008__Time_09_27_54PM__62__Second_Chance_Exception_C0000005.dmp the assembly instruction at w3core!W3_SERVER::Terminate+164 in c:\WINDOWS\system32\inetsrv\w3core.dll from Microsoft Corporation has caused an access violation exception (0xC0000005) when trying to read from memory location 0x608fc030 on thread 0

Module Information 
Image Name: c:\WINDOWS\system32\inetsrv\w3core.dll   Symbol Type:  PDB 
Base address: 0x5a390000   Time Stamp:  Sat Feb 17 06:01:40 2007  
Checksum: 0x00064439   Comments:   
COM DLL: False   Company Name:  Microsoft Corporation 
ISAPIExtension: False   File Description:  IIS Web Server Core 
ISAPIFilter: False   File Version:  6.0.3790.3959 (srv03_sp2_rtm.070216-1710) 
Managed DLL: False   Internal Name:  w3core.dll 
VB DLL: False   Legal Copyright:  ? Microsoft Corporation. All rights reserved. 
Loaded Image Name:  w3core.dll   Legal Trademarks:   
Mapped Image Name:     Original filename:  w3core.dll 
Module name:  w3core   Private Build:   
Single Threaded:  False   Product Name:  Internet Information Services 
Module Size:  352.00 KBytes   Product Version:  6.0.3790.3959 
Symbol File Name:  c:\symcache\w3core.pdb\1BD3D6C6BC5C44D3B496F792D23444952\w3core.pdb   Special Build:  &
 [2008-06-25 18:02 UTC] kevin dot webb at f2bc dot net
Since it's an ISAPI istall of PHP there is no php.exe process to tag. This is a crash dump will all IIS related process flaged and using the PHP debug.

Thread 0 - System ID 6548
Entry point   w3wp!wmainCRTStartup 
Create time   6/25/2008 9:58:56 AM 
Time spent in user mode   0 Days 0:0:0.78 
Time spent in kernel mode   0 Days 0:0:0.62 






Function     Arg 1     Arg 2     Arg 3   Source 
w3core!W3_SERVER::Terminate+164     00000000     01001418     010013e4    
w3core!UlW3Start+280     00000007     00263978     00000000    
w3wp!wmain+22a     00000007     00263978     00264560    
w3wp!wmainCRTStartup+12f     00000000     00000000     bffdb000    
kernel32!BaseProcessStart+23     010018f8     00000000     78746341    




W3CORE!W3_SERVER::TERMINATE+164In w3wp__PID__2044__Date__06_25_2008__Time_10_26_06AM__734__Second_Chance_Exception_C0000005.dmp the assembly instruction at w3core!W3_SERVER::Terminate+164 in c:\WINDOWS\system32\inetsrv\w3core.dll from Microsoft Corporation has caused an access violation exception (0xC0000005) when trying to read from memory location 0x608fc030 on thread 0

Module Information 
Image Name: c:\WINDOWS\system32\inetsrv\w3core.dll   Symbol Type:  PDB 
Base address: 0x5a390000   Time Stamp:  Sat Feb 17 06:01:40 2007  
Checksum: 0x00064439   Comments:   
COM DLL: False   Company Name:  Microsoft Corporation 
ISAPIExtension: False   File Description:  IIS Web Server Core 
ISAPIFilter: False   File Version:  6.0.3790.3959 (srv03_sp2_rtm.070216-1710) 
Managed DLL: False   Internal Name:  w3core.dll 
VB DLL: False   Legal Copyright:  ? Microsoft Corporation. All rights reserved. 
Loaded Image Name:  w3core.dll   Legal Trademarks:   
Mapped Image Name:     Original filename:  w3core.dll 
Module name:  w3core   Private Build:   
Single Threaded:  False   Product Name:  Internet Information Services 
Module Size:  352.00 KBytes   Product Version:  6.0.3790.3959 
Symbol File Name:  c:\symcache\w3core.pdb\1BD3D6C6BC5C44D3B496F792D23444952\w3core.pdb   Special Build:  &
 [2008-06-27 02:23 UTC] leo at calinfomgmt dot com
Same problem here. We are also using the ISAPI install of PHP. Maybe someone will use this backtrace to fix a problem that seems to pleg the entire 5.1.x version.
 [2008-07-03 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2008-07-05 05:22 UTC] noone at nowhere dot com
I too see this problem on IIS7 with both Vista Ultimate and Win2K8 Web Edition.

The problem is certainly related to security/authentication and such, since if you run the worker process under a named admin account, then the crashes at regular intervals dissappear.

The thing is that PHP does still cause a fault on exit, which is a bit unpleasant, especially if you develop your own ISAPI modules and or PECL extensions alongside PHP. It makes it much harder to trace memory leaks in ones own code, and so on.

One might think that people are keen to promote the quality of PHP, but it seems "They all do that sir." is good enough.
 [2008-07-05 07:59 UTC] pajoye@php.net
Please upload the backtrace somewhere and paste a link to it here. The information given here is not enough (no php calls). And if you have a scripts crashing, please copy it here too.

See my other comments  for the instructions on how to generate a backtrace on windows.
 [2008-07-13 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2008-11-20 15:53 UTC] iisworkerbug at willko dot com
WS 2K3 Web Ed w IIS
PHP 5.2.6
MySQL 5.0.67 win32
Joomla 1.5.7

As others have stated I see this error on a regular basis:

IIS Worker Process encountered a problem and needed to close.
szAppName : w3wp.exe     szAppVer : 6.0.3790.3959     szModName : w3core.dll
szModVer : 6.0.3790.3959     offset : 000201b4

Is there any more info available yet?
 [2008-11-20 16:27 UTC] pajoye@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

We are asking for more info (a backtrace)...

I would also recommend to use the FCGI interface instead of the ISAPI.
 [2008-11-25 16:50 UTC] brice at digito dot fr
Hello,

I've the same problem here ! I have a Windows 2008 Server/IIS7/PHP5. When IIS7 recycle a pool (all 20 minutes of inactivity or all 1740 minutes by default) PHP5 generate an error of w3wp.exe. 
I see exactly the same problem here : http://www.developersdex.com/asp/message.asp?p=592&r=6057007. 

"I can reproduce this on IIS7 with PHP 5.2.5.
This is a bug in the PHP ISAPI DLL during DLL unload. It is trying to
double-free a piece of memory. When you recycle the Application Pool,
it causes the w3wp.exe to shutdown and unload all ISAPI DLLs, hence
triggering the PHP bug.
The crash happen regardless of the IIS Application Pool identity.
This should just be reported to PHP as a bug."

Good luck !
 [2008-11-28 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2008-12-20 00:07 UTC] studium at christophsackl dot com
This bug still exists in PHP 5.3.8 32-bit and also with self-compiled 64-bit Version.
 [2008-12-20 00:22 UTC] pajoye@php.net
Still no correct backtrace.

Also you should really use fastcgi instead of the IIS sapi (works with IIS6 as well).
 [2008-12-22 02:30 UTC] todd at lanlocked dot net
RE pajoye@php.net

There is no php.exe process to generate a backtrace from. It is loaded via ISAPI. I am having the same problem with PHP 5.2.8 on a clean install of IIS7 on Server 2008. It is done via ISAPI.

Furthermore there is no test script to reproduce this - it appears to happen when IIS shuts down the worker process after 1740 minutes due to inactivity.

Kind Regards,
Todd
 [2008-12-22 02:41 UTC] todd at lanlocked dot net
Just following up:

I believe it is 1740 seconds, not minutes
I am running IIS 7 on Server 2008 Std 64 bit
PHP is running outside of the default app pool, although in trying to resolve the issue I set it up with the default app pool and it did the same thing

Could someone let me know how to backtrace the correct process (I assume I have to backtrace an IIS worker process) and we can get it sorted?
 [2008-12-27 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-01-04 10:31 UTC] sikle at stx dot net
Dear programmers,

Please fix this bug :~( (with a cherry on top?) I'm on PHP 5.2.8 and it happens all the time (on average 5-6 times a day) and it's very annoying. Like the others have mentioned I assume this is a memory
bug that is triggered when IIS recycles its application pool.
 [2009-01-04 10:46 UTC] sikle at stx dot net
Oh here's a 100% repro:

1. Load a php program. For example, I just go to http://localhost/phpmyadmin, I then logon to my database, and then I just close the browser.

2. Now go into IIS, on the left side double click on the computer name and then you'll see "Application Pools", now click on it.

3. Now click on "DefaultAppPool" and then on the right side of the
screen you'll see "Recycle..." click on it.

Now after you clicked on "Recycle...", within about 4 seconds you'll see the crash: "IIS Worker Process has stopped working".

Whoever fixes this bug will be my personal hero.
 [2009-01-09 22:17 UTC] damon at clarkweb dot com
Same problems with PHP 5.2.8 on Vista SP1.  Following SIKLE's steps 
reproduces the bug every time.  This has been open far too long for 
an easily reproducable bug.  Please address!
 [2009-01-11 23:44 UTC] scott at datalink dot com dot au
To help people with this issue, I've scanned all the PHP bugs relating to this issue and collated a list of workarounds:
- Add w3wp.exe to DEP exclusion list 
- Turn off process recycling
- Use FastCGI rather than ISAPI

To the PHP team - you guys are great and I love your work. I know you haven't gotten the backtrace, but please don't mark this bug as bogus.  The community is trying to get what you need and have been very patient with this issue, but it appears to be difficult to get  because of the way it crashes.
 [2009-01-12 00:08 UTC] pajoye@php.net
"- Use FastCGI rather than ISAPI"

that's definitively the way to go :) 
 [2009-01-26 23:37 UTC] tser at deltacontrols dot com
PHP 5.2.8 (with no extension)
ISAPI on IIS7 Vista 64 (using a 32 Application Pool)
Just run phpinfo(); and the recycle the Application Pool

Backtrace

 	ntdll.dll!_DbgBreakPoint@0() 	
 	ntdll.dll!_RtlReportCriticalFailure@8()  + 0x2e bytes	
 	ntdll.dll!_RtlpReportHeapFailure@4()  + 0x21 bytes	
 	ntdll.dll!_RtlpLogHeapFailure@24()  + 0xab bytes	
 	ntdll.dll!_RtlFreeHeap@12()  + 0x2fb4e bytes	
 	kernel32.dll!_HeapFree@12()  + 0x14 bytes	
 	msvcrt.dll!_free()  + 0x39 bytes	
	php5ts.dll!zend_hash_graceful_reverse_destroy(_hashtable * ht=0x00c68428)  Line 650 + 0x11 bytes	
 	php5ts.dll!zend_destroy_rsrc_list(_hashtable * ht=0x00c68428, void * * * tsrm_ls=0x024906d8)  Line 239 + 0xa bytes	
 	php5ts.dll!executor_globals_dtor(_zend_executor_globals * executor_globals=0x00c68298, void * * * tsrm_ls=0x024906d8)  Line 525 + 0x7 bytes
 	php5ts.dll!tsrm_shutdown()  Line 180 + 0x4 bytes	C
 	php5isapi.dll!DllMain(HINSTANCE__ * hinstDLL=0x00190000, unsigned long fdwReason=0, void * lpvReserved=0x00000000)  Line 964	
 	php5isapi.dll!__DllMainCRTStartup@12()  + 0x50 bytes	
 	ntdll.dll!_LdrpCallInitRoutine@16()  + 0x14 bytes	
 	ntdll.dll!_LdrpUnloadDll@8()  + 0x4b1a bytes	
 	ntdll.dll!_LdrUnloadDll@4()  + 0x46 bytes	
 	kernel32.dll!_FreeLibrary@4()  + 0x19 bytes	
 	isapi.dll!ISAPI_DLL::Unload()  + 0x38 bytes	
 	isapi.dll!ISAPI_DLL::~ISAPI_DLL()  + 0x10 bytes	
 	isapi.dll!ISAPI_DLL::`scalar deleting destructor'()  + 0xd bytes	
 	isapi.dll!ISAPI_DLL::DereferenceIsapiDll()  + 0x37 bytes	
 	isapi.dll!ISAPI_DLL_HASH::AddRefRecord()  + 0x23 bytes	
 	iisutil.dll!CLKRLinearHashTable::_Clear()  + 0x6f bytes	
 	iisutil.dll!CLKRLinearHashTable::~CLKRLinearHashTable()  + 0x19 bytes	
 	iisutil.dll!CLKRLinearHashTable::`scalar deleting destructor'()  + 0xd bytes	
 	iisutil.dll!CLKRHashTable::_FreeSubTable()  + 0x13 bytes	
 	iisutil.dll!CLKRHashTable::~CLKRHashTable()  + 0x18 bytes	
 	isapi.dll!ISAPI_DLL_MANAGER::`scalar deleting destructor'()  + 0xe bytes	
 	isapi.dll!TerminateIsapiModule()  + 0x16 bytes	
 	isapi.dll!CIISModuleFactory::Terminate()  + 0x14 bytes	
 	iiscore.dll!VIRTUAL_MODULE::~VIRTUAL_MODULE()  + 0x3e bytes	
 	iiscore.dll!VIRTUAL_MODULE::`scalar deleting destructor'()  + 0xd bytes	
 	iiscore.dll!VIRTUAL_MODULE::DereferenceVirtualModule()  + 0x20 bytes	
 	iiscore.dll!MODULE_LIST::FreeModules()  + 0x21 bytes	
 	iiscore.dll!W3_SERVER::TerminateGlobalModules()  + 0x63 bytes	
 	iiscore.dll!W3_SERVER::Terminate()  + 0x157 bytes	
 	iiscore.dll!IISCORE_PROTOCOL_MANAGER::StopListenerChannel()  + 0x58 bytes	
 	w3wphost.dll!LISTENER_CHANNEL::HandleStopListenerChannel()  + 0x65 bytes	
 	w3wphost.dll!LISTENER_CHANNEL_STOP_WORKITEM::ExecuteWorkItem()  + 0x10 bytes	
 	w3wphost.dll!W3WP_HOST::ExecuteWorkItem()  + 0x10 bytes	
 	ntdll.dll!_RtlpTpWorkCallback@8()  - 0x2c9 bytes	
 	ntdll.dll!_TppWorkerThread@4()  - 0xbbc bytes	
 	kernel32.dll!@BaseThreadInitThunk@12()  + 0xe bytes	
 	ntdll.dll!___RtlUserThreadStart@8()  + 0x23 bytes	
 	ntdll.dll!__RtlUserThreadStart@8()  + 0x1b bytes
 [2009-02-03 21:19 UTC] tser at deltacontrols dot com
I have updated the bug with backtrace and have contacted the assigned developer directly (and convinced him that there is no extension involved in the crash).

However, since I am not the originator, I cannot change the Status.
Please change the status.
Thanks!
 [2009-02-05 07:24 UTC] sikle at stx dot net
yep, this is definitely a vista/php/isapi problem. It happens so frequently that I think a fix would really help!
 [2009-02-06 08:57 UTC] pajoye@php.net
As I can't reproduce it this bug, I wonder why you insist to use the ISAPI? There is now a fastcgi interface for II5/6/7 and it works _way_ better than the ISAPI.

Does the crash happen too when you use a simple script (say phpinfo()) and using the same procedure?
 [2009-02-10 20:52 UTC] tser at deltacontrols dot com
Yes, a simple phpinfo and then restart IIS is all it need to crash. (Note: I am using IIS on Vista 64, and have to create a new Application Pool and then enable 32-bit application)

As for why we stick with ISAPI:
1. We have an php extension for handling proprietary protocol and it has significant overhead on startup. We will try FastCGI, but in the meantime we keep in in ISAPI mode so that it won't get loaded and unloaded frequently.

2. FastCGI could be way better, but ISAPI is still a legitimate mode for PHP. So I am a bit surprise to see you persuade others to use FastCGI as a way to avoid this bug. Well of course, use Apache or Linux also "fix" this problem as well.


BTW, FastCGI is an excellent idea to make PHP more stable. But I am worry it becomes a way to hide all the thread-safe, memory leak issues and allow them not being fixed properly.
 [2009-02-10 20:55 UTC] tser at deltacontrols dot com
Just to clarify again.
The crash could be duplicated without any extension loaded, our own extension is not loaded neither.
 [2009-02-10 21:50 UTC] pajoye@php.net
Yes, a simple phpinfo and then restart IIS is all it need to crash.
(Note: I am using IIS on Vista 64, and have to create a new Application
Pool and then enable 32-bit application)

As for why we stick with ISAPI:
"1. We have an php extension for handling proprietary protocol and it has significant overhead on startup. We will try FastCGI, but in the
meantime we keep in in ISAPI mode so that it won't get loaded and
unloaded frequently."

That should not be a problem at all.

"2. FastCGI could be way better, but ISAPI is still a legitimate mode for PHP. So I am a bit surprise to see you persuade others to use FastCGI as a way to avoid this bug. Well of course, use Apache or Linux also "fix" this problem as well."

Nobody maintains it and it is likely to be dropped. It was never stable and it is very unlikely that we will fix it any time soon. It is also the recommend way, according to the IIS team (and I work with them on that).

"BTW, FastCGI is an excellent idea to make PHP more stable. But I am
worry it becomes a way to hide all the thread-safe, memory leak issues
and allow them not being fixed properly."

There is no tread safety issue with fastcgi because this SAPI is not threaded (like ISAPI or some apache2 sapi). I do not understand your point with the memory leaks.

 [2009-02-18 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-02-19 04:59 UTC] sikle at stx dot net
i've resorted to just using apache (via xampp) instead... hrmph.
but atleast now it doesn't crash =)
 [2009-03-04 18:46 UTC] info at cmiwebstudio dot com
PHP 5.2.9
IIS 6
WIN Server 2003 Standard
MySQL 5.1.31

Same problem indicating a problem with php_mbstring.dll .  Also getting 
"Invalid access to memory location." on PHP pages.
 [2009-03-04 20:05 UTC] pajoye@php.net
For the 100th time, never use mysql 5.1 DLL with PHP.

Closing this bug as well as no useful information has been provided and the ISAPI is going to be deprecated anyway. Use FastCGI istead with IIS5/6/7.
 [2010-10-20 18:12 UTC] santafe05-blog at yahoo dot com
I recently installed PHP on Vista.  I'm new to Open Source stuff and so after seeing the dates on this I was/am literally shocked to see this same bug that is experienced by so many people (A) stay in place for years, and (B) be judged as 'bogus'.  

And there are many other identical threads reporting the SAME problem.
http://bugs.php.net/bug.php?id=44047 

forums.techarena.in/showthread.php?t=686723
www.developersdex.com/asp/message.asp?p=592&r=6057007
www.issociate.de/board/post/468636/IIS_+_PHP_--_Worker_Process_alert_&_w3wp.exe_crash?.html
forums.techarena.in/showthread.php?t=821723
groups.google.com/group/comp.lang.php/browse_thread/thread/93aef1ff2f0ba3b0
www.thescripts.com/forum/thread742344.html
 [2010-10-20 18:14 UTC] pajoye@php.net
Use FastCGI with IIS, as described in the manual, and in the IIS documentation.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 09:01:29 2024 UTC