新的WinDBG调用堆栈。似乎与MySQL有关。
--- --- UPDATE
在Windows Server 2012上,在Amazon EC2上使用Java 7和PHP 5.3.29我运行了一个Java程序,它启动了我非常简单的PHP脚本(无法显示,因为它依赖于多个依赖项 - 很多代码)。如果出现问题,PHP脚本只会从mysql中获取内容并通过电子邮件发送给我。
此PHP脚本不会退出! 我调用exit();在PHP文件的末尾。将此作为子进程启动的Java代码将错误流重定向到输入流,因此不会发生臭名昭着的缓冲区死锁。 Procmon不显示任何PHP.exe活动。
该过程的图片(约2小时 - 下午4:51 UTC):
显示0 CPU使用率的图片:
图片显示该过程仅持续约1秒钟:
最后一张照片是我最关心的照片,我的剧本持续约10秒,不到1秒!
Process Explorer PHP.exe堆栈:
ntoskrnl.exe!KeSynchronizeExecution+0x2246
ntoskrnl.exe!KeRemoveQueueEx+0x108e
ntoskrnl.exe!KeRemoveQueueEx+0xae9
ntoskrnl.exe!KeWaitForMutexObject+0x22a
ntoskrnl.exe!KeSetBasePriorityThread+0x4ec
ntoskrnl.exe!KeRemoveQueueEx+0x281d
ntoskrnl.exe!KeRemoveQueueEx+0x121a
ntoskrnl.exe!KeRemoveQueueEx+0xae9
ntoskrnl.exe!KeWaitForMutexObject+0x22a
ntoskrnl.exe!NtWaitForSingleObject+0xb2
ntoskrnl.exe!setjmpex+0x34b3
wow64cpu.dll!TurboDispatchJumpAddressEnd+0x598
wow64cpu.dll!TurboDispatchJumpAddressEnd+0x3e4
wow64.dll!Wow64LdrpInitialize+0x22e
wow64.dll!Wow64LdrpInitialize+0x172
ntdll.dll!LdrInitShimEngineDynamic+0x2383
ntdll.dll!memset+0xf36a
ntdll.dll!LdrInitializeThunk+0xe
ntdll.dll!ZwWaitForSingleObject+0xc
mswsock.dll!NSPStartup+0x298
WS2_32.dll!select+0x17d
ntdll.dll!RtlAllocateHeap+0xca
PHP.exe转储文件分析了调用堆栈:
00 ntdll!NtWaitForSingleObject+0xc
01 mswsock!SockWaitForSingleObject+0x154
02 mswsock!WSPSelect+0x355
03 ws2_32!select+0x17d
04 php5ts!php_poll2+0x1e0
05 php5ts!php_stream_xport_create+0x371e
06 php_openssl!get_module+0x9b39
07 php5ts!php_stream_alloc+0x3f4
08 php5ts!php_stream_fill_read_buffer+0x2a4
0a php5ts!php_mysqlnd_net_network_read_pub+0x4b
0b php5ts!php_mysqlnd_net_receive_pub+0x149
0c php5ts!php_mysqlnd_read_row_ex+0x9c
0d php5ts!php_mysqlnd_rowp_read+0x4d
0e php5ts!php_mysqlnd_res_store_result_fetch_data_pub+0x21f
0f php5ts!php_mysqlnd_res_store_result_pub+0xc0
10 php5ts!php_mysqlnd_conn_store_result_pub+0x160
11 php_mysqli!zif_mysqli_query+0x2e2
12 php5ts!zend_do_fcall_common_helper_SPEC+0x8af
13 php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+0xd
14 php5ts!execute+0x2e8
15 php5ts!zend_execute_scripts+0xfe
16 php5ts!php_execute_script+0x24c
17 php!main+0xc1b
18 php!__tmainCRTStartup+0x10f
19 kernel32!BaseThreadInitThunk+0xe
1a ntdll!__RtlUserThreadStart+0x20
1b ntdll!_RtlUserThreadStart+0x1b
任何人都可以推荐下一步行动或者您之前遇到过这种情况吗?谢谢!
剧本:
<?php
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
require_once('common.php');
DB::overwriteInstanceWithHost('db'); // exists in hosts
date_default_timezone_set("UTC");
DB::overrideCommonDBWithHost("common.db.com"); // not real, but exists
$fetcher = new DataFetcher();
$weatherData = $fetcher->fetchByLatLng(latHere,longHere);
if($weatherData){
echo $weatherData->getCity();
} else {
echo "couldn't get station lat/lng";
}
exit();