Bug #49770 [Com]: Thread Deadlocking Under Load
Edit report at https://bugs.php.net/bug.php?id=49770&edit=1
ID: 49770
Comment by: harrisbritt69 dot 04 dot 0 at gmail dot com
Reported by: wickham at affl dot com
Summary: Thread Deadlocking Under Load
Status: Open
Type: Bug
Package: Reproducible crash
Operating System: win32 only - Windows Server 2003
PHP Version: 5.2SVN-2009-10-04 (snap)
Block user comment: N
Private report: N
New Comment:
onesseemingly social phenomena through which this "great history" gains a new onedimension
and rich context.Fashion behind the Iron Curtain. Reflections on a Bookby Anna Pelka about Youth
Fashion in the People's Republicof Poland and the German Democratic RepublicThe history of
youth fashion behind the Iron Curtain (and more extensively - ananalysis of youth fashion at the
time of "real socialism") is but no means an unex-plored field in the social sciences,
both Polish and German. The prime asset of thepublication by Anna Pelka: With [political] fashion.
Youth fashion from the PRL and East Germany
https://failfake.com/pl/
Previous Comments:
------------------------------------------------------------------------
[2009-10-05 19:31:50] wickham at affl dot com
We are trying the FastCGI tonight. This issue only occurs during high load time and that will be
the next opportunity to see if it helps. I will update with any new information after that.
------------------------------------------------------------------------
[2009-10-05 18:39:39] pajoye@php.net
Take #2 (and last): Please try with the *NTS* version and FastCGI. That's the recommended SAPI
for IIS 5/6/7.
------------------------------------------------------------------------
[2009-10-05 18:17:36] Sjoerd@php.net
http://bugs.mysql.com/bug.php?id=12071#c48469
------------------------------------------------------------------------
[2009-10-04 23:53:06] wickham at affl dot com
Here is an updated comment by the Microsoft Engineer:
I managed to find public symbols for the version of PHP you have - this has allowed me to trace the
stack back further.
The deadlocking threads look like this:
ChildEBP RetAddr
0d0bd44c 7c827d29 ntdll!KiFastSystemCallRet 0d0bd450 7c83d266 ntdll!NtWaitForSingleObject+0xc
0d0bd48c 7c83d2b1 ntdll!RtlpWaitOnCriticalSection+0x1a3
0d0bd4ac 77bcb7a9 ntdll!RtlEnterCriticalSection+0xa8
0d0bd4bc 77bbf35d msvcrt!_lock+0x30
0d0bd4f8 77bbe1f0 msvcrt!_alloc_osfhnd+0x27 0d0bd530 77bbe303 msvcrt!_creat+0x52
0d0bd564 0203fee8 msvcrt!_dup+0x55
0d0bd580 0203da08 php5ts!php_stream_gzopen+0xc8
0d0bf5b8 01e7ce6b php5ts!zif_gzfile+0x68
0d0bf614 01e83105 php5ts!zend_do_fcall_common_helper_SPEC+0x7ab
0d0bf634 01e7c635 php5ts!ZEND_DO_FCALL_SPEC_CONST_HANDLER+0xe5
0d0bf684 01e7cf8a php5ts!execute+0x1c5
0d0bf6d0 01e83105 php5ts!zend_do_fcall_common_helper_SPEC+0x8ca
0d0bf6f0 01e7c635 php5ts!ZEND_DO_FCALL_SPEC_CONST_HANDLER+0xe5
0d0bf740 01e62e87 php5ts!execute+0x1c5
0d0bf778 01f1d30d php5ts!zend_execute_scripts+0x107
0d0bf944 10001f10 php5ts!php_execute_script+0x20d 0d0bfe40 5a322991
php5isapi!HttpExtensionProc+0x110 0d0bfe60 5a3968ff w3isapi!ProcessIsapiRequest+0x214
0d0bfe94 5a3a66f1 w3core!W3_ISAPI_HANDLER::IsapiDoWork+0x3fd
0d0bfeac 5a394c6f w3core!W3_ISAPI_HANDLER::OnCompletion+0x7e
0d0bfec4 5a394bf0 w3core!W3_HANDLER::MainOnCompletion+0x52
0d0bfee8 5a394baf w3core!W3_CONTEXT::ExecuteHandlerCompletion+0x23
0d0bff08 5a394fab w3core!W3_MAIN_CONTEXT::DoWork+0x91
0d0bff20 5a3618b2 w3core!W3_MAIN_CONTEXT::OnIoCompletion+0x37
0d0bff38 5a361650 w3dt!UL_NATIVE_REQUEST::DoStateProcess+0x48
0d0bff48 5a3616ca w3dt!UL_NATIVE_REQUEST::DoWork+0x7f
0d0bff5c 5a3024ce w3dt!OverlappedCompletionRoutine+0x1a
0d0bff8c 5a3026ac w3tp!THREAD_POOL_DATA::ThreadPoolThread+0x73
0d0bffa0 5a301da9 w3tp!THREAD_POOL_DATA::ThreadPoolThread+0x24
0d0bffb8 77e6482f w3tp!THREAD_MANAGER::ThreadManagerThread+0x39
0d0bffec 00000000 kernel32!BaseThreadStart+0x34
And this:
ChildEBP RetAddr
00fbd3b8 7c827d29 ntdll!KiFastSystemCallRet 00fbd3bc 7c83d266 ntdll!NtWaitForSingleObject+0xc
00fbd3f8 7c83d2b1 ntdll!RtlpWaitOnCriticalSection+0x1a3
00fbd418 77bbf3f4 ntdll!RtlEnterCriticalSection+0xa8
00fbd454 77bc02f3 msvcrt!_alloc_osfhnd+0xbe
00fbd484 77bc0480 msvcrt!_mktemp+0x266
00fbd4d0 01f2cb81 msvcrt!_open+0x2d
00fbd4f8 01f2ccf0 php5ts!_php_stream_fopen+0xc1 00fbd520 01f30003
php5ts!php_plain_files_stream_opener+0xa0
00fbd554 0203feb8 php5ts!_php_stream_open_wrapper_ex+0xc3
00fbd580 0203da08 php5ts!php_stream_gzopen+0x98
00fbf5b8 01e7ce6b php5ts!zif_gzfile+0x68
00fbf614 01e83105 php5ts!zend_do_fcall_common_helper_SPEC+0x7ab
00fbf634 01e7c635 php5ts!ZEND_DO_FCALL_SPEC_CONST_HANDLER+0xe5
00fbf684 01e7cf8a php5ts!execute+0x1c5
00fbf6d0 01e83105 php5ts!zend_do_fcall_common_helper_SPEC+0x8ca
00fbf6f0 01e7c635 php5ts!ZEND_DO_FCALL_SPEC_CONST_HANDLER+0xe5
00fbf740 01e62e87 php5ts!execute+0x1c5
00fbf778 01f1d30d php5ts!zend_execute_scripts+0x107
00fbf944 10001f10 php5ts!php_execute_script+0x20d 00fbfe40 5a322991
php5isapi!HttpExtensionProc+0x110 00fbfe60 5a3968ff w3isapi!ProcessIsapiRequest+0x214
00fbfe94 5a3a66f1 w3core!W3_ISAPI_HANDLER::IsapiDoWork+0x3fd
00fbfeac 5a394c6f w3core!W3_ISAPI_HANDLER::OnCompletion+0x7e
00fbfec4 5a394bf0 w3core!W3_HANDLER::MainOnCompletion+0x52
00fbfee8 5a394baf w3core!W3_CONTEXT::ExecuteHandlerCompletion+0x23
00fbff08 5a394fab w3core!W3_MAIN_CONTEXT::DoWork+0x91
00fbff20 5a3618b2 w3core!W3_MAIN_CONTEXT::OnIoCompletion+0x37
00fbff38 5a361650 w3dt!UL_NATIVE_REQUEST::DoStateProcess+0x48
00fbff48 5a3616ca w3dt!UL_NATIVE_REQUEST::DoWork+0x7f
00fbff5c 5a3024ce w3dt!OverlappedCompletionRoutine+0x1a
00fbff8c 5a3026ac w3tp!THREAD_POOL_DATA::ThreadPoolThread+0x73
00fbffa0 5a301da9 w3tp!THREAD_POOL_DATA::ThreadPoolThread+0x24
00fbffb8 77e6482f w3tp!THREAD_MANAGER::ThreadManagerThread+0x39
00fbffec 00000000 kernel32!BaseThreadStart+0x34
In trying to poke around the local variables for things like filename and such I was receiving a lot
of memory access errors due to the addresses being passed falling well under 0x0000FFFF. This is a
guard value - any address lower than this is automatically invalid.
0:033> kn
# ChildEBP RetAddr
00 0d0bd44c 7c827d29 ntdll!KiFastSystemCallRet
01 0d0bd450 7c83d266 ntdll!NtWaitForSingleObject+0xc
02 0d0bd48c 7c83d2b1 ntdll!RtlpWaitOnCriticalSection+0x1a3
03 0d0bd4ac 77bcb7a9 ntdll!RtlEnterCriticalSection+0xa8
04 0d0bd4bc 77bbf35d msvcrt!_lock+0x30
05 0d0bd4f8 77bbe1f0 msvcrt!_alloc_osfhnd+0x27
06 0d0bd530 77bbe303 msvcrt!_creat+0x52
07 0d0bd564 0203fee8 msvcrt!_dup+0x55
08 0d0bd580 0203da08 php5ts!php_stream_gzopen+0xc8
09 0d0bf5b8 01e7ce6b php5ts!zif_gzfile+0x68 0a 0d0bf614 01e83105
php5ts!zend_do_fcall_common_helper_SPEC+0x7ab
0b 0d0bf634 01e7c635 php5ts!ZEND_DO_FCALL_SPEC_CONST_HANDLER+0xe5
0c 0d0bf684 01e7cf8a php5ts!execute+0x1c5 0d 0d0bf6d0 01e83105
php5ts!zend_do_fcall_common_helper_SPEC+0x8ca
0e 0d0bf6f0 01e7c635 php5ts!ZEND_DO_FCALL_SPEC_CONST_HANDLER+0xe5
0f 0d0bf740 01e62e87 php5ts!execute+0x1c5 10 0d0bf778 01f1d30d php5ts!zend_execute_scripts+0x107
11 0d0bf944 10001f10 php5ts!php_execute_script+0x20d
12 0d0bfe40 5a322991 php5isapi!HttpExtensionProc+0x110
13 0d0bfe60 5a3968ff w3isapi!ProcessIsapiRequest+0x214 0:033> .frame 8
08 0d0bd580 0203da08 php5ts!php_stream_gzopen+0xc8 0:033> dv
wrapper = 0x03305c00
path = 0x00000019 "--- memory read error at address 0x00000019 ---"
mode = 0x00000011 "--- memory read error at address 0x00000011 ---"
options = 73325148
opened_path = 0x045eda94
context = 0x00000000
tsrm_ls = 0x00000001
fd = 25
From the PHP source for this function:
: php_stream *php_stream_gzopen(php_stream_wrapper *wrapper, char *path, char *mode, int options,
: char **opened_path, php_stream_context
*context STREAMS_DC TSRMLS_DC)
: {
I have no idea if this is how this code is supposed to work or if these values have been modified
from what was actually passed by the code that has been executed prior to the hang.
In any case this may be of use to the PHP support people to help determine what is going on.
------------------------------------------------------------------------
[2009-10-04 22:44:17] pajoye@php.net
Can you try with the NTS version and FastCGI please?
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=49770
--
Edit this bug report at https://bugs.php.net/bug.php?id=49770&edit=1
Thread (9 messages)