php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12620 PHP.exe is causing access violations when shutting down
Submitted: 2001-08-07 09:19 UTC Modified: 2002-02-04 04:09 UTC
From: peterd at telephonetics dot co dot uk Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 4.0.6 OS: Windows NT 4 Server
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: peterd at telephonetics dot co dot uk
New email:
PHP Version: OS:

 

 [2001-08-07 09:19 UTC] peterd at telephonetics dot co dot uk
I've been using the v4.06 windows binaries from this site and have been suffering repeated crashes as PHP closes down.  

The crash is either reported as just in PHP and other times OLEMainThreadWndName is reported in the error.  It varies between write and read violations too.

I've traced through the code and have tracked it down to an access violation in the function shutdown_memory_manager().

Also when using the win32 debug build of PHP the error does not occur, only with the release version.

The app I'm working on has database connections and uses COM objects.  The error seems to be slightly related to the database side although I've not been able to produce a small section of code that causes the same error.  I'm using the ADODB wrapper for database access although the same error has occurred when using the built-in ODBC functions.

I can't see that I'm doing anything wrong but there's definitely something that PHP isn't liking.

Below is the main function I use to get results from a database, when all the code is commented out inside this function the error doesn't occur but a lot of other stuff in the app doesn't happen either so that doesn't say much really.  Is there anything blatantly wrong with the code below?

function GetDirectoryQueryResults($szSQL)
{
	$objConn = &ADONewConnection('ado');

	$objConn->Connect("Directory");
	
	$objRS = &$objConn->Execute($szSQL);
	
	if (!$objRS->EOF) 
		$retval = &$objRS->GetRows();


	$objRS->Close();
	$objConn->Close();
	
	return $retval;
}



Cheers!

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-13 11:22 UTC] peterd at telephonetics dot co dot uk
PHP is still crashing in shutdown_memory_manager() although I've now found that if I compile PHP with ZEND_DISABLE_MEMORY_CACHE set to 1, the problems don't occur.

I'm still unable to provide a short section of code that reproduces the problem as doing something as simple as adding 

echo "hello"; 

to a page that crashes can stop it from crashing.  

If I remove a function that isn't even called it can sometimes stop crashing, other times it continues to crash no matter what you change, it seems quite random but if a page crashes it does it consistently.  It's just that changing them in the slightest way can seem to alter the behaviour significantly

Does anyone know anything that might cause the memory manager to fail like this, or even if compiling PHP with ZEND_DISABLE_MEMORY_CACHE 1 is a reasonable thing to do?
 [2002-02-04 02:14 UTC] yohgaki@php.net
The version of PHP that this bug was reported in is too old. Please
try to reproduce this bug in the latest version of PHP (available
from http://www.php.net/downloads.php

If you are still able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 02:01:29 2024 UTC