php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74337 php-cgi.exe crash on facebook callback
Submitted: 2017-03-30 07:15 UTC Modified: 2017-04-22 20:44 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: orsinimichele at hotmail dot com Assigned: ab (profile)
Status: Closed Package: *General Issues
PHP Version: 7.1.3 OS: Windows 2012
Private report: No CVE-ID: None
 [2017-03-30 07:15 UTC] orsinimichele at hotmail dot com
Description:
------------
php-cgi.exe crashes (no matter cgi or fastcgi) on windows 2012 IIS8 only when
the facebook callback was thrown, tested x86 and x64 version, Thread Safe and Non Thread Safe, the result is the same php-cgi.exe crashes on facebook callback

The browser outputs 502.2 Bad Gateway

On event viewer we have this:

Faulting application name: php-cgi.exe, version: 7.1.3.0, time stamp: 0x58c87e08
Faulting module name: php7.dll, version: 7.1.3.0, time stamp: 0x58c88218
Exception code: 0xc0000005
Fault offset: 0x0000000000480275
Faulting process id: 0x5b628
Faulting application start time: 0x01d2a889c6caa76c
Faulting application path: D:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP71x64\php-cgi.exe
Faulting module path: D:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP71x64\php7.dll
Report Id: 048f0b3d-147d-11e7-946a-d4ae52d40b64
Faulting package full name:
Faulting package-relative application ID:





Patches

php_stream_fopen_tmpfile (last revision 2017-04-13 13:30 UTC by aserbulov at plesk dot com)

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-03-30 07:22 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2017-03-30 07:22 UTC] laruence@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.


 [2017-03-31 10:01 UTC] orsinimichele at hotmail dot com
-Status: Feedback +Status: Open
 [2017-03-31 10:01 UTC] orsinimichele at hotmail dot com
I hope it helps, the backtrace generation in x64 debug diag is bit different from the guide in
https://bugs.php.net/bugs-generating-backtrace-win32.php

if something is missing, please let me know. 
Thanks


Thread 0 - System ID 479404



Entry point   php_cgi!mainCRTStartup 
Create time   31/03/2017 11.29.43 
Time spent in user mode   0 Days 00:00:00.421 
Time spent in kernel mode   0 Days 00:00:01.031 









  Source

php7!php_stream_temp_cast+95 [c:\php-sdk\php71\vc14\x64\php-7.1.3\main\streams\memory.c @ 512]   c:\php-sdk\php71\vc14\x64\php-7.1.3\main\streams\memory.c @ 512 
php7!_php_stream_cast+148 [c:\php-sdk\php71\vc14\x64\php-7.1.3\main\streams\cast.c @ 264 + a]   c:\php-sdk\php71\vc14\x64\php-7.1.3\main\streams\cast.c @ 264 + a 
php_curl!_php_curl_setopt+43a [c:\php-sdk\php71\vc14\x64\php-7.1.3\ext\curl\interface.c @ 2470 + 15]   c:\php-sdk\php71\vc14\x64\php-7.1.3\ext\curl\interface.c @ 2470 + 15 
php_curl!zif_curl_setopt_array+ac [c:\php-sdk\php71\vc14\x64\php-7.1.3\ext\curl\interface.c @ 2988 + f]   c:\php-sdk\php71\vc14\x64\php-7.1.3\ext\curl\interface.c @ 2988 + f 
php7!ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_UNUSED_HANDLER+376fb6 [c:\php-sdk\php71\vc14\x64\php-7.1.3\zend\zend_vm_execute.h @ 808]   c:\php-sdk\php71\vc14\x64\php-7.1.3\zend\zend_vm_execute.h @ 808 
php7!execute_ex+72 [c:\php-sdk\php71\vc14\x64\php-7.1.3\zend\zend_vm_execute.h @ 432 + 5]   c:\php-sdk\php71\vc14\x64\php-7.1.3\zend\zend_vm_execute.h @ 432 + 5 
php7!zend_call_function+3758a5 [c:\php-sdk\php71\vc14\x64\php-7.1.3\zend\zend_execute_api.c @ 848]   c:\php-sdk\php71\vc14\x64\php-7.1.3\zend\zend_execute_api.c @ 848 
php7!zif_call_user_func_array+13f [c:\php-sdk\php71\vc14\x64\php-7.1.3\ext\standard\basic_functions.c @ 4853 + 17]   c:\php-sdk\php71\vc14\x64\php-7.1.3\ext\standard\basic_functions.c @ 4853 + 17 
php7!ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_USED_HANDLER+25d [c:\php-sdk\php71\vc14\x64\php-7.1.3\zend\zend_vm_execute.h @ 887]   c:\php-sdk\php71\vc14\x64\php-7.1.3\zend\zend_vm_execute.h @ 887 
php7!execute_ex+72 [c:\php-sdk\php71\vc14\x64\php-7.1.3\zend\zend_vm_execute.h @ 432 + 5]   c:\php-sdk\php71\vc14\x64\php-7.1.3\zend\zend_vm_execute.h @ 432 + 5 
php7!zend_execute+159 [c:\php-sdk\php71\vc14\x64\php-7.1.3\zend\zend_vm_execute.h @ 475]   c:\php-sdk\php71\vc14\x64\php-7.1.3\zend\zend_vm_execute.h @ 475 
php7!zend_execute_scripts+119 [c:\php-sdk\php71\vc14\x64\php-7.1.3\zend\zend.c @ 1477]   c:\php-sdk\php71\vc14\x64\php-7.1.3\zend\zend.c @ 1477 
php7!php_execute_script+424 [c:\php-sdk\php71\vc14\x64\php-7.1.3\main\main.c @ 2537 + 1b]   c:\php-sdk\php71\vc14\x64\php-7.1.3\main\main.c @ 2537 + 1b 
php_cgi!main+1727 [c:\php-sdk\php71\vc14\x64\php-7.1.3\sapi\cgi\cgi_main.c @ 2654]   c:\php-sdk\php71\vc14\x64\php-7.1.3\sapi\cgi\cgi_main.c @ 2654 
php_cgi!__scrt_common_main_seh+11d [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 253 + 22]   f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 253 + 22 
kernel32!BaseThreadInitThunk+1a    
ntdll!RtlUserThreadStart+1d    




Thread 1 - System ID 263720



Entry point   ntdll!TppWorkerThread 
Create time   31/03/2017 11.29.43 
Time spent in user mode   0 Days 00:00:00.000 
Time spent in kernel mode   0 Days 00:00:00.000 









  Source

ntdll!NtWaitForWorkViaWorkerFactory+a    
ntdll!TppWorkerThread+275    
kernel32!BaseThreadInitThunk+1a    
ntdll!RtlUserThreadStart+1d    




Thread 2 - System ID 108864



Entry point   mswsock!SockAsyncThread 
Create time   31/03/2017 11.29.43 
Time spent in user mode   0 Days 00:00:00.000 
Time spent in kernel mode   0 Days 00:00:00.000 









  Source

ntdll!NtRemoveIoCompletion+a    
mswsock!SockAsyncThread+8f    
kernel32!BaseThreadInitThunk+1a    
ntdll!RtlUserThreadStart+1d
 [2017-04-02 01:08 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2017-04-02 01:08 UTC] ab@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

Thanks for the backtrace. So far to see that it is something cURL or streams related, but unfortunately things i tried so far to reproduce the crash brought nothing. I'd ask therefore yet for a reproducer. If a short snippet is not possible, it could be also some git repo with everything required to reproduce.

Thanks.
 [2017-04-09 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 [2017-04-13 13:25 UTC] aserbulov at plesk dot com
https://bugs.php.net/bug.php?id=68986
 [2017-04-13 13:40 UTC] aserbulov at plesk dot com
The issue is related to https://bugs.php.net/bug.php?id=68986
Path was added.
 [2017-04-13 13:43 UTC] aserbulov at plesk dot com
The issue is related to https://bugs.php.net/bug.php?id=68986
Patch was added. Please reopen the bug.
 [2017-04-14 07:43 UTC] aserbulov at plesk dot com
Steps to reproduce:
1. Create C:\TEMP folder
2. Create system user
3. Add Deny Full control access rights for created user on C:\
4. Remove Deny Full control access rights for created user on C:\TEMP
5. Add Allow Full control access rights for created user on C:\TEMP
6. Set TEMP and TMP system environment variables value to C:\TEMP
7. Execute script by created user:

<?php
$fp = fopen('php://temp', 'w+b');
$ch = curl_init();
curl_setopt($ch, CURLOPT_FILE, $fp);
 [2017-04-22 20:44 UTC] ab@php.net
-Status: No Feedback +Status: Closed -Assigned To: +Assigned To: ab
 [2017-04-22 20:44 UTC] ab@php.net
Merged per https://github.com/php/php-src/pull/2475 . Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 10:01:29 2024 UTC