php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75761 CGI / FastCGI has stopped working
Submitted: 2018-01-04 18:00 UTC Modified: 2018-01-15 16:41 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: tchepelsky at gmail dot com Assigned: ab (profile)
Status: Closed Package: Reproducible crash
PHP Version: 7.0Git-2018-01-04 (Git) OS: Windows 10 x64 LTSB
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: tchepelsky at gmail dot com
New email:
PHP Version: OS:

 

 [2018-01-04 18:00 UTC] tchepelsky at gmail dot com
Description:
------------
Summary:

"CGI / FastCGI has stopped working" (site crash) is triggered with PHP 7.1.13 VC14 Thread Safe (x64), specifically when trying to log into a registered phpBB account. This did not happen with PHP 7.1.12 VC14 Thread Safe (x64).

Setup:

1) Windows 10 Enterprise LTSB (x64)
2) Microsoft Visual C++ 2013 (and 2015) Redistributable (x64)
3) Nginx 1.12.2
4) CloudFlare with SSL/TLS (Full)
5) PHP 7.1.13 VC14 Thread Safe (x64)
6) MySQL Community Server 5.7.20 (x64)
7) phpMyAdmin 4.7.7
8) phpBB 3.2.1
9) WordPress 4.9.1 en-CA

No errors are produced in the error.log file when the crash occurs.

I use a "start.bat" and "stop.bat" batch file to start and stop my website. For testing purposes, I am providing the code below.


start.bat:

@ECHO OFF
start C:\nginx\nginx.exe
start C:\php\php-cgi.exe -b 127.0.0.1:9000 -c C:\php\php.ini
ping 127.0.0.1 -n 1>NUL
echo starting nginx
echo .
echo ..
echo ...
ping 127.0.0.1 >NUL
EXIT
pause > null


stop.bat:

@ECHO OFF
taskkill /f /IM nginx.exe
taskkill /f /IM php-cgi.exe
Exit



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-01-04 20:36 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2018-01-04 20:36 UTC] requinix@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.


 [2018-01-04 21:47 UTC] tchepelsky at gmail dot com
The bug generating backtrace for "Win32" does not provide adequate instructions to my specific situation. I will need further help for this case.

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

From the link above, this is what I have done so far:

1) Downloaded and installed Microsoft Visual Studio Community 2017.
2) Downloaded and extracted the "debug-pack" into my "php" folder which contains PHP 7.1.13 VC14 Thread Safe (x64).
3) Started my website and tried to log into my phpBB forum account, which resulted in the same "CGI / FastCGI has stopped working" message again. There was no additional or alternative option to click "Cancel" in order to debug the process, as the instructions state as being the expected outcome. As a result, I cannot provide a backtrace until these steps have been clarified.
 [2018-01-04 21:48 UTC] tchepelsky at gmail dot com
-Status: Feedback +Status: Open
 [2018-01-04 21:48 UTC] tchepelsky at gmail dot com
See previous comment.
 [2018-01-04 22:05 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2018-01-04 22:05 UTC] requinix@php.net
Read the rest of the instructions. Like the "Generating backtrace, without compiler, on Windows" section.
 [2018-01-05 00:11 UTC] tchepelsky at gmail dot com
I hope I got this right. Let me know if you need anything else. There are a total of 3 Threads.

==========================================================
THREAD 1
==========================================================



3 Threads (60% of all threads) have this same call stack.
Note: Grouping of identical threads can be disabled in the 'Preferences' tab of the Analysis Options


Thread 1 - System ID 1768



Entry point   ntdll!TppWorkerThread 
Create time   2018-01-04 5:46:24 PM 
Time spent in user mode   0 Days 00:00:00.000 
Time spent in kernel mode   0 Days 00:00:00.000 









  
  
  
  









  
  
  
  









ntdll!NtWaitForWorkViaWorkerFactory+14 
ntdll!TppWorkerThread+76e 
kernel32!BaseThreadInitThunk+14 
ntdll!RtlUserThreadStart+21 




Thread 0 - System ID 6308



Entry point   php_cgi+3870 
Create time   2018-01-04 5:39:12 PM 
Time spent in user mode   0 Days 00:00:00.562 
Time spent in kernel mode   0 Days 00:00:00.250 


This thread is not fully resolved and may or may not be a problem. Further analysis of these threads may be required.








ntdll!RtlReportCriticalFailure+97 
ntdll!RtlpHeapHandleError+12 
ntdll!RtlpLogHeapFailure+96 
ntdll!RtlFreeHeap+143 
ucrtbase!_free_base+1b 
php7ts!libiconv_set_relocation_prefix+4a46c 
php7ts!php_base64_decode+2467 
php7ts!array_init+b93 
php7ts!execute_ex+bf 
php7ts!zend_execute+1c9 
php7ts!zend_execute_scripts+b7 
php7ts!php_execute_script+287 
php_cgi+8455 
php_cgi+3809 
kernel32!BaseThreadInitThunk+14 
ntdll!RtlUserThreadStart+21 




Thread 4 - System ID 6524



Entry point   mswsock!SockAsyncThread 
Create time   2018-01-04 5:46:24 PM 
Time spent in user mode   0 Days 00:00:00.000 
Time spent in kernel mode   0 Days 00:00:00.000 









ntdll!NtRemoveIoCompletion+14 
mswsock!SockAsyncThread+79 
kernel32!BaseThreadInitThunk+14 
ntdll!RtlUserThreadStart+21 



Exception Information


NTDLL!RTLREPORTCRITICALFAILURE+97In php-cgi__PID__3448__Date__01_04_2018__Time_05_46_36PM__287__Second_Chance_Exception_C0000374.dmp the assembly instruction at ntdll!RtlReportCriticalFailure+97 in C:\Windows\System32\ntdll.dll from Microsoft Corporation has caused a corrupted heap exception (0xC0000374) when trying to perform an unknown operation on memory location 0xc2d0f800 on thread 0

Heap corruption was detected in php-cgi__PID__3448__Date__01_04_2018__Time_05_46_36PM__287__Second_Chance_Exception_C0000374.dmp
However pageheap was not enabled in this dump. Please follow the instructions in the recommendation section for troubleshooting heap corruption issues.

Current NTGlobalFlags value: 0x0



Module Information 

Image Name: C:\Windows\System32\ntdll.dll   Symbol Type:  PDB 
Base address: 0x00000003`00905a4d   Time Stamp:  Wed Sep 06 22:51:10 2017  
Checksum: 0x00000000`00000000   Comments:   
COM DLL: False   Company Name:  Microsoft Corporation 
ISAPIExtension: False   File Description:  NT Layer DLL 
ISAPIFilter: False   File Version:  10.0.14393.1715 (rs1_release_inmarket.170906-1810) 
Managed DLL: False   Internal Name:  ntdll.dll 
VB DLL: False   Legal Copyright:  © Microsoft Corporation. All rights reserved. 
Loaded Image Name:  ntdll.dll   Legal Trademarks:   
Mapped Image Name:     Original filename:  ntdll.dll 
Module name:  ntdll   Private Build:   
Single Threaded:  False   Product Name:  Microsoft® Windows® Operating System 
Module Size:  1.82 MBytes   Product Version:  10.0.14393.1715 
Symbol File Name:  c:\symbols\ntdll.pdb\9E47088A32754925B127035E16E949C41\ntdll.pdb   Special Build:  & 



==========================================================
THREAD 2
==========================================================



3 Threads (60% of all threads) have this same call stack.
Note: Grouping of identical threads can be disabled in the 'Preferences' tab of the Analysis Options






  
  
  
  





Thread 2 - System ID 2772



Entry point   ntdll!TppWorkerThread 
Create time   2018-01-04 5:46:24 PM 
Time spent in user mode   0 Days 00:00:00.000 
Time spent in kernel mode   0 Days 00:00:00.000 









  
  
  
  









ntdll!NtWaitForWorkViaWorkerFactory+14 
ntdll!TppWorkerThread+76e 
kernel32!BaseThreadInitThunk+14 
ntdll!RtlUserThreadStart+21 




Thread 0 - System ID 6308



Entry point   php_cgi+3870 
Create time   2018-01-04 5:39:12 PM 
Time spent in user mode   0 Days 00:00:00.562 
Time spent in kernel mode   0 Days 00:00:00.250 


This thread is not fully resolved and may or may not be a problem. Further analysis of these threads may be required.








ntdll!RtlReportCriticalFailure+97 
ntdll!RtlpHeapHandleError+12 
ntdll!RtlpLogHeapFailure+96 
ntdll!RtlFreeHeap+143 
ucrtbase!_free_base+1b 
php7ts!libiconv_set_relocation_prefix+4a46c 
php7ts!php_base64_decode+2467 
php7ts!array_init+b93 
php7ts!execute_ex+bf 
php7ts!zend_execute+1c9 
php7ts!zend_execute_scripts+b7 
php7ts!php_execute_script+287 
php_cgi+8455 
php_cgi+3809 
kernel32!BaseThreadInitThunk+14 
ntdll!RtlUserThreadStart+21 




Thread 4 - System ID 6524



Entry point   mswsock!SockAsyncThread 
Create time   2018-01-04 5:46:24 PM 
Time spent in user mode   0 Days 00:00:00.000 
Time spent in kernel mode   0 Days 00:00:00.000 









ntdll!NtRemoveIoCompletion+14 
mswsock!SockAsyncThread+79 
kernel32!BaseThreadInitThunk+14 
ntdll!RtlUserThreadStart+21 



Exception Information


NTDLL!RTLREPORTCRITICALFAILURE+97In php-cgi__PID__3448__Date__01_04_2018__Time_05_46_36PM__287__Second_Chance_Exception_C0000374.dmp the assembly instruction at ntdll!RtlReportCriticalFailure+97 in C:\Windows\System32\ntdll.dll from Microsoft Corporation has caused a corrupted heap exception (0xC0000374) when trying to perform an unknown operation on memory location 0xc2d0f800 on thread 0

Heap corruption was detected in php-cgi__PID__3448__Date__01_04_2018__Time_05_46_36PM__287__Second_Chance_Exception_C0000374.dmp
However pageheap was not enabled in this dump. Please follow the instructions in the recommendation section for troubleshooting heap corruption issues.

Current NTGlobalFlags value: 0x0



Module Information 

Image Name: C:\Windows\System32\ntdll.dll   Symbol Type:  PDB 
Base address: 0x00000003`00905a4d   Time Stamp:  Wed Sep 06 22:51:10 2017  
Checksum: 0x00000000`00000000   Comments:   
COM DLL: False   Company Name:  Microsoft Corporation 
ISAPIExtension: False   File Description:  NT Layer DLL 
ISAPIFilter: False   File Version:  10.0.14393.1715 (rs1_release_inmarket.170906-1810) 
Managed DLL: False   Internal Name:  ntdll.dll 
VB DLL: False   Legal Copyright:  © Microsoft Corporation. All rights reserved. 
Loaded Image Name:  ntdll.dll   Legal Trademarks:   
Mapped Image Name:     Original filename:  ntdll.dll 
Module name:  ntdll   Private Build:   
Single Threaded:  False   Product Name:  Microsoft® Windows® Operating System 
Module Size:  1.82 MBytes   Product Version:  10.0.14393.1715 
Symbol File Name:  c:\symbols\ntdll.pdb\9E47088A32754925B127035E16E949C41\ntdll.pdb   Special Build:  & 



==========================================================
THREAD 3
==========================================================



3 Threads (60% of all threads) have this same call stack.
Note: Grouping of identical threads can be disabled in the 'Preferences' tab of the Analysis Options






  
  
  
  









  
  
  
  





Thread 3 - System ID 4108



Entry point   ntdll!TppWorkerThread 
Create time   2018-01-04 5:46:24 PM 
Time spent in user mode   0 Days 00:00:00.000 
Time spent in kernel mode   0 Days 00:00:00.000 









ntdll!NtWaitForWorkViaWorkerFactory+14 
ntdll!TppWorkerThread+76e 
kernel32!BaseThreadInitThunk+14 
ntdll!RtlUserThreadStart+21 




Thread 0 - System ID 6308



Entry point   php_cgi+3870 
Create time   2018-01-04 5:39:12 PM 
Time spent in user mode   0 Days 00:00:00.562 
Time spent in kernel mode   0 Days 00:00:00.250 


This thread is not fully resolved and may or may not be a problem. Further analysis of these threads may be required.








ntdll!RtlReportCriticalFailure+97 
ntdll!RtlpHeapHandleError+12 
ntdll!RtlpLogHeapFailure+96 
ntdll!RtlFreeHeap+143 
ucrtbase!_free_base+1b 
php7ts!libiconv_set_relocation_prefix+4a46c 
php7ts!php_base64_decode+2467 
php7ts!array_init+b93 
php7ts!execute_ex+bf 
php7ts!zend_execute+1c9 
php7ts!zend_execute_scripts+b7 
php7ts!php_execute_script+287 
php_cgi+8455 
php_cgi+3809 
kernel32!BaseThreadInitThunk+14 
ntdll!RtlUserThreadStart+21 




Thread 4 - System ID 6524



Entry point   mswsock!SockAsyncThread 
Create time   2018-01-04 5:46:24 PM 
Time spent in user mode   0 Days 00:00:00.000 
Time spent in kernel mode   0 Days 00:00:00.000 









ntdll!NtRemoveIoCompletion+14 
mswsock!SockAsyncThread+79 
kernel32!BaseThreadInitThunk+14 
ntdll!RtlUserThreadStart+21 



Exception Information


NTDLL!RTLREPORTCRITICALFAILURE+97In php-cgi__PID__3448__Date__01_04_2018__Time_05_46_36PM__287__Second_Chance_Exception_C0000374.dmp the assembly instruction at ntdll!RtlReportCriticalFailure+97 in C:\Windows\System32\ntdll.dll from Microsoft Corporation has caused a corrupted heap exception (0xC0000374) when trying to perform an unknown operation on memory location 0xc2d0f800 on thread 0

Heap corruption was detected in php-cgi__PID__3448__Date__01_04_2018__Time_05_46_36PM__287__Second_Chance_Exception_C0000374.dmp
However pageheap was not enabled in this dump. Please follow the instructions in the recommendation section for troubleshooting heap corruption issues.

Current NTGlobalFlags value: 0x0



Module Information 

Image Name: C:\Windows\System32\ntdll.dll   Symbol Type:  PDB 
Base address: 0x00000003`00905a4d   Time Stamp:  Wed Sep 06 22:51:10 2017  
Checksum: 0x00000000`00000000   Comments:   
COM DLL: False   Company Name:  Microsoft Corporation 
ISAPIExtension: False   File Description:  NT Layer DLL 
ISAPIFilter: False   File Version:  10.0.14393.1715 (rs1_release_inmarket.170906-1810) 
Managed DLL: False   Internal Name:  ntdll.dll 
VB DLL: False   Legal Copyright:  © Microsoft Corporation. All rights reserved. 
Loaded Image Name:  ntdll.dll   Legal Trademarks:   
Mapped Image Name:     Original filename:  ntdll.dll 
Module name:  ntdll   Private Build:   
Single Threaded:  False   Product Name:  Microsoft® Windows® Operating System 
Module Size:  1.82 MBytes   Product Version:  10.0.14393.1715 
Symbol File Name:  c:\symbols\ntdll.pdb\9E47088A32754925B127035E16E949C41\ntdll.pdb   Special Build:  &
 [2018-01-05 03:34 UTC] tchepelsky at gmail dot com
-Status: Feedback +Status: Open
 [2018-01-05 03:34 UTC] tchepelsky at gmail dot com
Feedback provided.

Changed from Feedback to Open.
 [2018-01-12 16:54 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2018-01-12 16:54 UTC] ab@php.net
I'm unable to reproduce the crash locally :( Were it possible you to provide a crash dump? Perhaps that could help.

Thanks.
 [2018-01-13 14:17 UTC] ab@php.net
A fix was pushed, could you check the latest snapshots, please?

Thanks.
 [2018-01-14 20:53 UTC] tchepelsky at gmail dot com
-Status: Feedback +Status: Closed
 [2018-01-14 20:53 UTC] tchepelsky at gmail dot com
The snapshot release has fixed the problem. Thank you!

Tested version:

PHP 7.1
VC14 x64 Thread Safe
Revision: r089a321 (January 14 2018, 18:19:59)

Status changed from Open to Closed.
 [2018-01-15 16:41 UTC] ab@php.net
-Assigned To: +Assigned To: ab
 [2018-01-15 16:41 UTC] ab@php.net
Thanks for the check!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 16:01:29 2024 UTC