php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49191 Unknown exception at 0x000006c5
Submitted: 2009-08-07 16:43 UTC Modified: 2009-08-31 10:04 UTC
Votes:6
Avg. Score:3.3 ± 1.4
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:1 (25.0%)
From: bmhrules at hotmail dot com Assigned:
Status: Wont fix Package: IIS related
PHP Version: 5.2SVN-2009-08-07 (snap) OS: Windows Server 2003 Ent. X64
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bmhrules at hotmail dot com
New email:
PHP Version: OS:

 

 [2009-08-07 16:43 UTC] bmhrules at hotmail dot com
Description:
------------
While running PHP in isapi I was getting quite a few different access violation errors. They are not constant but sporadic.

PHP has encountered an Access Violation at 027033E4
PHP has encountered an Access Violation at 026DA5BA
PHP has encountered an Access Violation at 0264ACB2

I've disabled most of my extensions in the php.ini, but so far no luck in getting these random errors to vanish.

Reproduce code:
---------------
n/a

Expected result:
----------------
n/a

Actual result:
--------------
My feeble attempts at backtraces would sometimes get:
*** WARNING: Unable to verify checksum for \\?\C:\PHP\php5ts.dll
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for \\?\C:\PHP\php5ts.dll - 
014ef1a4 02e07c3d 00000004 00000000 0000000a ntdll!RtlDetermineDosPathNameType_U+0x330
014ef1c8 02e085b1 0000002b 00000000 00000000 php5ts!php_gcvt+0x28d
014ef4b0 02d4bdc9 00000000 00000000 0230d968 php5ts!ap_php_slprintf+0x4c1
00000000 00000000 00000000 00000000 00000000 php5ts!emalloc+0x39

Sometimes this:
*** WARNING: Unable to verify checksum for C:\PHP\LIBMYSQL.dll
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\PHP\LIBMYSQL.dll - 
0166ec1c 0338fe86 0397c888 0397c888 0336d060 WS2_32!gethostbyname+0x8d
0166ec28 0336d060 0397c888 0166ec64 0166ed38 LIBMYSQL!mysql_sqlstate+0x2b5ce
0166ecbc 7d625062 0166f1f4 0000000c 0166ecf4 LIBMYSQL!mysql_sqlstate+0x87a8
0166ecf0 7d61f7d4 00151378 0166ef24 7d61f768 ntdll!RtlUnicodeStringToAnsiString+0x6e
0166ef70 00000000 00000000 00000000 00000000 ntdll!RtlAllocateHeap+0x14e


You will have to excuse my potentially useless report and walk me through to help figure out what is causing conflicts since I am not at all knowledgeable with debugging on x64, or any OS for that matter.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-07 16:50 UTC] pajoye@php.net
Please try using FastCGI instead, it is the recommended interface for IIS.

If you have to use ISAPI, we will need a reproduce script to be able to fix these crashes.
 [2009-08-07 17:24 UTC] bmhrules at hotmail dot com
<?php
$db = new mysqli($mysql_host,$mysql_user,$mysql_pass,$mysql_db) or die("DB failed to connect.");
$db->set_charset('utf8');
?>

Result:


0156ea94 71c07d2e 0156eac4 0000013c 0442b878 WS2_32!getxyDataEnt+0xa1
*** WARNING: Unable to verify checksum for C:\PHP\LIBMYSQL.dll
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\PHP\LIBMYSQL.dll - 
0156ecd0 0338fe86 0442b878 0442b878 0336d060 WS2_32!gethostbyname+0xb4
WARNING: Stack unwind information not available. Following frames may be wrong.
0156ecdc 0336d060 0442b878 0156ed18 0156edec LIBMYSQL!mysql_sqlstate+0x2b5ce
0156ed20 7d61f7d4 00000002 00000000 00000000 LIBMYSQL!mysql_sqlstate+0x87a8
00330000 00000000 eeffeeff 00001002 00000000 ntdll!RtlpAllocateFromHeapLookaside+0x13
[8/7/2009 12:22:13 PM] Thread exited. Exiting thread system id - 11956. Exit code - 0x00000000

Other result from dmp:

Function     Arg 1     Arg 2     Arg 3   Source 
kernel32!RaiseException+53     000006c5     00000001     00000000    
rpcrt4!RpcpRaiseException+24     000006c5     76ed44e5     0146d07c    
rpcrt4!NdrpUnionMemorySize+1f9     0146d07c     76ed43ae     0017db18    
rpcrt4!NdrNonEncapsulatedUnionMemorySize+2b     0146d07c     76ed4307     0017dacc    
rpcrt4!NdrComplexStructMemorySize+364     0046d07c     76ed44f0     0146d474    
rpcrt4!NdrComplexStructUnmarshall+d3     0046d07c     0146d474     76ed44dc    
rpcrt4!NdrpPointerUnmarshall+216     00000000     76ed44d4     0146d474    
rpcrt4!NdrPointerUnmarshall+30     0146d07c     0146d474     76ed43a0    
rpcrt4!NdrpPointerUnmarshall+216     00000000     76ed43a0     0146d474    
rpcrt4!NdrPointerUnmarshall+30     0146d07c     0146d44c     76ed439c    
rpcrt4!NdrpClientUnMarshal+122     0146d07c     0146d17c     00000000    
rpcrt4!NdrClientCall2+2dd     76ed42d8     76ed421c     0146d43c    
dnsapi!R_ResolverQuery+1c     00000000     02261f8c     00000001    
dnsapi!Query_PrivateExW+187     02261f8c     00000001     14000040    
dnsapi!DnsQuery_W+3a     02261f8c     00000001     14000040    
mswsock!SaBlob_Query+2d     02261f8c     00000001     14000040    
mswsock!Rnr_DoDnsLookup+f0     00000000     00eb4270     00eb4258    
mswsock!Dns_NSPLookupServiceNext+24b     02261f28     00000000     0146d874    
ws2_32!NSPROVIDER::NSPLookupServiceNext+17     00eb42a8     02261f28     00000000    
ws2_32!NSPROVIDERSTATE::LookupServiceNext+1c     00eb48e8     00000000     0146d874    
ws2_32!NSQUERY::LookupServiceNext+ae     00eb4270     00000000     0146d874    
ws2_32!WSALookupServiceNextW+78     00eb4258     00000000     0146d874    
ws2_32!WSALookupServiceNextA+63     00eb4258     00000000     0000013c    
ws2_32!getxyDataEnt+a1     0146d8c0     0000013c     03b2cf48    
ws2_32!gethostbyname+b4     03b2cf48     03b2cf48     0336d060    
libmysql!mysql_sqlstate+2b5ce     03b2cf48     0146db14     0146dbe8    
libmysql!mysql_sqlstate+87a8     00000002     00000000     00000000    
ntdll!RtlpAllocateFromHeapLookaside+13     eeffeeff     00001002     00000000    

In w3wp__PID__25784__Date__08_07_2009__Time_12_16_54PM__654__First chance exception 0X000006C5.dmp the assembly instruction at kernel32!RaiseException+53 in C:\WINDOWS\SysWOW64\kernel32.dll from Microsoft Corporation has caused an unknown exception (0x000006c5) on thread 6

This exception originated from rpcrt4!RpcpRaiseException+24. 

I've attempted using FastCGI with IIS but I keep getting errors saying the process unexpectedly exited.
 [2009-08-07 17:27 UTC] pajoye@php.net
Did you update to a recent mysql after having installed PHP? Or is libmysql not the DLL present in the PHP releases?
 [2009-08-07 17:33 UTC] bmhrules at hotmail dot com
As of using the 5.2.11-dev(snap), MySQL has not been upgraded. Before the dev, I may have upgraded MySQL, but my memory fails me. All files in the PHP directory are those that came with the ZIP and nothing else. 

There is a libmysql.dll in the MySQL/bin folder though. I am currently running MySQL 5.1.36.
 [2009-08-07 17:36 UTC] pajoye@php.net
Do not use mysql's libmysql with PHP but only the DLL provided in our releases. Add c:\php first in your PATH (or whatever is the path to PHP).
 [2009-08-07 17:40 UTC] bmhrules at hotmail dot com
As was stated, all files in the php directory are those that came in the ZIP. I was just making a note that there seems to be a file called libmysql.dll in the MySQL/bin folder. 

I believe that was placed there by the MySQL installer. I have no clue as of why there is one there or if it is even required.
 [2009-08-08 04:39 UTC] bmhrules at hotmail dot com
As was stated I am not using the libmysql.dll that MySQL supplies in my PHP directory. I hope that this apparent misunderstanding is not the cause for this bug reports permanent closure.
 [2009-08-09 09:16 UTC] pajoye@php.net
"As was stated I am not using the libmysql.dll that MySQL supplies in my PHP directory. "

You have to use libmysql.dll provided in the PHP directory.
 [2009-08-09 13:34 UTC] bmhrules at hotmail dot com
You have me very confused. I think there is a breakdown in communications somewhere. Perhaps I should just say that the C:\PHP\libmysql.dll is the one from the ZIP that you guys supply.

I notice that MySQL installs their own libmysql.dll in their own directory "C:\Program Files\MySQL\MySQL Server 5.1\bin". 

Did you want me to copy the C:\PHP\libmysql.dll to the "C:\Program Files\MySQL\MySQL Server 5.1\bin" folder?
 [2009-08-09 13:47 UTC] pajoye@php.net
No, you have to add C:\PHP\ to your system PATH. It has to be first in the list.

Please ask further question in the php install mailing list or one of the numerous PHP forums.
 [2009-08-09 17:29 UTC] bmhrules at hotmail dot com
The path is fine. PHP is installed correctly.
 [2009-08-12 13:28 UTC] pajoye@php.net
no more private discussion, please check this problem with the mysql team.
 [2009-08-12 20:40 UTC] bmhrules at hotmail dot com
It would appear not matter how many times I say it isn't using libmysql.dll from the MySQL team, you keep telling me it is. The only lib that is on the drive is the one the ZIP file you guys supplied. If you still believe it is MySQL's supplied lib, then someone has committed the wrong file to your svn. There is no other reasoning for it.

Anyway, you've made it painfully obvious that it is apparently a waste of time to report and I have other things to do rather than constantly try to convince you that I am using the libmysql.dll file that you guys gave in the snapshot. 

If it is loading the lib from another folder, as you say, I would like to know where so I can remove this problem. Because honestly, I do not see it in the trace or on the drive.
 [2009-08-12 21:21 UTC] bmhrules at hotmail dot com
MD5 hash of the lib in the ZIP: 9234bfba1f555ffcfed310ca9eef2d49
 [2009-08-12 22:57 UTC] pajoye@php.net
If you are confused in your comments, I can't really help and won't either. You stated two or more times that you have that lib in the mysql directory. You mentioned only in your last private mail that you renamed it (or delete it).

Now I re opened this bug and assigned it to the mysql team. Wait for an asnwer. But you will need to provide a script to reproduce it.

I also have to strongly recommend to use the FastCGI interface with IIS, not the ISAPI (even with php 5.2).
 [2009-08-12 23:03 UTC] bmhrules at hotmail dot com
I only renamed because you kept insisting that was the problem. So I decided it wasn't worth fighting and just renamed it to be certain. You would not take my word that it is installed correctly and is loading the lib from your directory. 

Anyway, I misunderstood your message about the mysql team and opened a ticket there linking to here. Hopefully this doesn't affect the issue at all.
 [2009-08-13 09:55 UTC] miracee at sun dot com
This neither is related to MySQL nor to PHP.

All works fine via command line and also via Apache.

Problem is related to IIS.

Also see http://bugs.mysql.com/46683
 [2009-08-19 10:21 UTC] bmhrules at hotmail dot com
[8/19/2009 4:42:08 AM] First chance exception - 0x000006c5 caused by thread with system id 8176
Script Error
Error Code - 0x80004005
Error Source [Unavailable]
Error Description [Could not obtain System ID for this thread]
Line 116, Column 2

An update to this ticket.
As was said, I've been getting tons of those 6c5 errors and actually managed to get a dump file for a second chance error which I guess was triggered on the 80004005 error thing. For what ever reason, I am not able to open it and view the information contained within. Would I be able to attach it here for another dev person to view it or does it need to be processed on my server?

To please the devs here and at MySQL, I've submitted a ticket with Microsoft, with much difficulty, as I had to send one email a day for 5 days. They will not email me back in regards to the resolution.
 [2009-08-19 10:35 UTC] bmhrules at hotmail dot com
Entry point   0x00338900 
Create time   8/19/2009 1:58:42 AM 
Time spent in user mode   0 Days 0:0:10.0 
Time spent in kernel mode   0 Days 0:0:3.250 

Function     Arg 1     Arg 2     Arg 3   Source 
0x014efe42     00000000     00000000     00000000    

It appears IE does not wish to open on the server for some reason. I opened the report on my PC and that is what shows under Thread 5 - System ID 21320.

#Detailed stack corruption analysis for thread 5
Call stack with StackWalk#

Index Return Address 
1 0x014efe42 

Call stack - Heuristic

Index Stack Address Child EBP Return Address Destination 
1 0x00000000 0x00000000 0x014efe42 0x00000000 
2 0x014ef8a8 0x77bc002b msvcrt!longjmp+41 0x00000000 
3 0x014ef8b0 0x014ef870 php5ts!_zend_bailout+ad msvcrt!longjmp 
4 0x014ef8bc 0xffffffff php5ts!php_handle_aborted_connection+52 php5ts!_zend_bailout 
5 0x014ef8c8 0x00000823 php5isapi!sapi_isapi_ub_write+3c php5ts!php_handle_aborted_connection 
6 0x014ef8cc 0x1000117c php5isapi!php_isapi_report_exception+99 php5isapi!sapi_isapi_ub_write 
7 0x014ef8f8 0x00000000 php5isapi!HttpExtensionProc+2e0 php5isapi!php_isapi_report_exception 
8 0x014efa08 0x014efeec w3core!W3_STATE_AUTHENTICATION::DoWork+8d5 0x00000000 
9 0x014efad8 0x014efae4 w3core!TOKEN_CACHE_ENTRY::QueryImpersonationToken+16c w3core!TOKEN_CACHE_ENTRY::QueryDisBackupPriToken 
10 0x014efb08 0x014efb34 w3cache!OBJECT_CACHE::IncHits+18 0x00000000 
11 0x014efb18 0x01bd2440 w3cache!CACHE_ENTRY::Checkout+38 w3cache!OBJECT_CACHE::IncHits 
12 0x014efb20 0x01bd2440 w3core!W3_FILE_INFO::Checkout+79 w3cache!CACHE_ENTRY::Checkout 
13 0x014efb38 0x014efb50 w3core!W3_URL_INFO::GetFileInfo+be w3core!W3_FILE_INFO::DoAccessCheck 
14 0x014efba8 0x00000000 w3core!W3_SITE::IncIsapiExtReqs+1e 0x00000000 
15 0x014efbb8 0x018411b8 w3core!W3_ISAPI_HANDLER::W3_ISAPI_HANDLER+13b w3core!W3_SITE::IncIsapiExtReqs 
16 0x014efbcc 0x014efec4 w3core!W3_CONTEXT::InternalDetermineHandler+5ae w3core!W3_ISAPI_HANDLER::W3_ISAPI_HANDLER 
17 0x014efe08 0x014efe24 w3isapi!ProcessIsapiRequest+214 0x00000000 
18 0x014efe28 0x014efe58 w3core!W3_ISAPI_HANDLER::IsapiDoWork+3fd w3isapi!ProcessIsapiRequest 
19 0x014efe5c 0x014efe78 w3core!W3_ISAPI_HANDLER::DoWork+b0 w3core!W3_ISAPI_HANDLER::IsapiDoWork 
20 0x014efe7c 0x014efe98 w3core!W3_HANDLER::MainDoWork+16e 0x00000000 
21 0x014efe9c 0x014efea8 w3core!W3_CONTEXT::ExecuteCurrentHandler+53 w3core!W3_HANDLER::MainDoWork 
22 0x014efeac 0x014efec4 w3core!W3_CONTEXT::ExecuteHandler+51 w3core!W3_CONTEXT::ExecuteCurrentHandler 
23 0x014efec8 0x014efeec w3core!W3_STATE_HANDLE_REQUEST::DoWork+9a w3core!W3_CONTEXT::ExecuteHandler 
24 0x014efef0 0x014eff10 w3core!W3_MAIN_CONTEXT::DoWork+a6 0x00000000 
25 0x014eff14 0x014eff2c w3core!W3_MAIN_CONTEXT::OnNewRequest+55 w3core!W3_MAIN_CONTEXT::DoWork 
26 0x014eff30 0x014eff48 w3dt!UL_NATIVE_REQUEST::DoStateProcess+48 w3core!W3_MAIN_CONTEXT::OnNewRequest 
27 0x014eff3c 0x0183faa0 w3dt!UL_NATIVE_REQUEST::DoWork+7f w3dt!UL_NATIVE_REQUEST::DoStateProcess 
28 0x014eff4c 0x014eff5c w3dt!OverlappedCompletionRoutine+1a 0x00000000 
29 0x014eff60 0x014eff8c w3tp!THREAD_POOL_DATA::ThreadPoolThread+73 0x00000000 
30 0x014eff90 0x014effa0 w3tp!THREAD_POOL_DATA::ThreadPoolThread+24 w3tp!THREAD_POOL_DATA::ThreadPoolThread 
31 0x014effa4 0x014effb8 w3tp!THREAD_MANAGER::ThreadManagerThread+39 0x00000000 
32 0x014effbc 0x014effec kernel32!BaseThreadStart+34 0x00000000 
In w3wp__PID__23748__Date__08_19_2009__Time_02_24_07AM__102__Second_Chance_Exception_C0000005.dmp the assembly instruction at 0x014efe42 which does not correspond to any known native module in the process has caused an access violation exception (0xC0000005) when trying to write to memory location 0x77bcac67 on thread 5
 [2009-08-19 11:35 UTC] pajoye@php.net
You should still use the FastCGI interface instead of the ISAPI. We won't fix the ISAPI in php and it is not available anymore in 5.3 or later.
 [2009-08-31 09:40 UTC] andrey@php.net
not a mysql but PHP/IIS problem
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 17:01:29 2024 UTC