Bug #72451 [Asn]: Wordpress/ stream_get_wrappers causes crash

From: Date: Wed, 08 Mar 2017 17:47:13 +0000
Subject: Bug #72451 [Asn]: Wordpress/ stream_get_wrappers causes crash
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207748@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72451&edit=1 ID: 72451 Updated by: ab@php.net Reported by: oldbucsfan at hotmail dot com Summary: Wordpress/ stream_get_wrappers causes crash Status: Assigned Type: Bug Package: Apache2 related Operating System: Windows Server 2012 R2 PHP Version: 7.0.7 Assigned To: ab Block user comment: N Private report: N New Comment: Please check the current master snapshots, a comprehensive patch fixing this kind of issues has landed there. thanks. Previous Comments: ------------------------------------------------------------------------ [2017-02-27 15:19:18] stumpe at gmail dot com Hello, i came across this error and can reproduce it. i compiled apache and php myself (on Linux hostname 3.12.62-60.64.8-default #1 SMP Tue Oct 18 12:21:38 UTC 2016 (42e0a66) x86_64 x86_64 x86_64 GNU/Linux) and saw this error pop up in the wordpress-instance PHP Fatal error: Allowed memory size of 6442450944 bytes exhausted (tried to allocate 15126708878888855354 bytes) in wp-includes/functions.php on line 5161 which is this function: function wp_is_stream( $path ) { $wrappers = stream_get_wrappers(); $wrappers_re = '(' . join('|', $wrappers) . ')'; return preg_match( "!^$wrappers_re://!", $path ) === 1; } so i tried this code - to take a look if this is a wordpress-problem <?php print_r(stream_get_wrappers()); ?> first time i called the URL for this code i got error 500 and another PHP Fatal Error in the log apache let the corrupted child die [Mon Feb 27 15:50:34.341436 2017] [core:notice] [pid 10599:tid 139796708411136] AH00052: child pid 5329 exit signal Segmentation fault (11) second time calling the script i got the output: Array ( [0] => https [1] => ftps [2] => compress.zlib [3] => php [4] => file [5] => glob [6] => data [7] => http [8] => ftp [9] => phar [10] => zip ) something is still weird apache 2.4.25 php 7.1.2 openssl 1.0.2k ------------------------------------------------------------------------ [2017-01-31 15:47:16] boldini at softcodex dot ch hi, I tried to run also ab and abs with -n 1000 -c 10 with the code $wrappers = stream_get_wrappers(); print_r($wrappers); $wrappers_re = '(' . join('|', $wrappers) . ')'; print($wrappers_re); but no crash happens! I can say my cash happen every 2/3 weeks Only have 1 site with phpmyadmin that use https, so few connections per day.. All other are normal http ------------------------------------------------------------------------ [2017-01-12 19:33:39] oldbucsfan at hotmail dot com Thanks ab. All Apache/PHP/etc are all using OpenSSL/1.0.2j. So they aren't different versions. I have made sure that the right dlls are being loaded, so it's not a missing or conflicting dll. I'll get another backtrace for you. Apache 2.4.25 (x64 vc14 ApacheLounge binaries) PHP 7.1.0 (x64 thread safe from php.net) boldini, are you also running with https enabled in Apache? It sounds like your error is much less frequent, but I was getting hit over https a few times a second, so a server with less load may not have this error appear but sparingly. It may be something where you need to have all 4 of these to get the error. 1. Apache enabled and fairly often hit over https 2. PHP 7 3. Windows Server 2012? - may or may not be a requirement 4. Some sort of code that triggers the error like the stream_get_wrappers(), although this may be more of a symptom than the source of the problem. ------------------------------------------------------------------------ [2017-01-12 17:21:19] ab@php.net @oldbucsfan as now there seems to be more or less stable reproduce case, could you please post the backtrace for it? The last backtrace in your comment from 2016-07-08 13:47 UTC did show only issue with Apache SSL module, no PHP. An accompanying thing could be to check, whether OpenSSL in your PHP and Apache are from the same series. Also, as per @boldini, is that still with or without Opcache? Thanks. ------------------------------------------------------------------------ [2017-01-12 16:57:38] oldbucsfan at hotmail dot com Related To: Bug #73706 ------------------------------------------------------------------------ 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=72451 -- Edit this bug report at https://bugs.php.net/bug.php?id=72451&edit=1

« previous php.bugs (#207748) next »