|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2014-11-19 17:06 UTC] pegasus at vaultwiki dot org
Description: ------------ On certain PHP scripts, the process hangs indefinitely. This is new behavior that I did not experience several days ago on an earlier build. I have not yet been able to determine what code block is related, but I am working on that now. As far as I can tell, there is no SIGSEV or other logged crash; the process just eventually times out. This behavior exists in both no-debug-non-zts and no-debug-zts builds. It does not occur in debug-non-zts (I have not tested debug-zts). Therefore, it suggests that one of the debug symbols that is removed in no-debug builds is actually needed for execution somewhere or that the removal of debug symbols might damage non-debug code in some way. The behavior persists if opcache is disabled. Here is the configure line, if it helps: ./configure --enable-bcmath --enable-libxml --enable-mbstring --enable-sockets --enable-fpm --enable-opcache --prefix=/home/php --with-curl --with-freetype-dir=/usr --with-gd --enable-gd-native-ttf --with-jpeg-dir=/usr --with-libdir=/lib64 --with-libxml-dir=/usr/lib64/ --with-mcrypt --with-mysql --with-mysqli --with-openssl=/usr --with-pic --with-png-dir=/usr --with-xpm-dir=/usr --with-xsl --with-zlib --with-zlib-dir=/usr --with-fpm-user --with-fpm-group Expected result: ---------------- Normal execution PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 17:00:02 2025 UTC |
As noted, I cannot reproduce this problem using this test script. However, this test script is lifted almost completely (with classes and methods renamed) from the script that hangs indefinitely. I am hoping that it at least gives you some idea as to the problem I am encountering. In the original script, the var_dump() line never occurs. However, as soon as the preceding $arr line is commented out, the var_dump() occurs. In the original script, it actually does not matter what the preceding line is: as long as the preceding line uses $item in some way, the script hangs. ### main script ### require_once('./hello.php'); $test = new Test(); $props = new Test_prop(); $test->set_info($props); $test->execute(); echo 'done'; exit; #### hello.php #### class Test_prop { public $id = 0; public $title = ''; } class Test { protected $stack = array(); function set_info($props) { $this->stack = array(); $item = $this->get_item(); if (!$item) { $item = array( 'id' => $props->id, 'title' => $props->title, 'key' => 'Error' ); $this->stack[] = $item; return; } } function get_item() { return false; } function execute($do_output = true) { reset($this->stack); $key = key($this->stack); $first =& $this->stack["$key"]; if ($first['key'] != 'Error') { return; } foreach ($this->stack AS &$item) { $arr = array($item); var_dump($item); } } }