Edit report at http://bugs.php.net/bug.php?id=50027&edit=1
ID: 50027
Comment by: lukas at twobits dot cz
Reported by: phpbugs at colin dot guthr dot ie
Summary: $this becomes a non-object
Status: Open
Type: Bug
Package: Reproducible crash
Operating System: Mandriva Linux (Cooker x86_64)
PHP Version: 5.3.1RC2
Block user comment: N
New Comment:
Bad news. Just got the same bug again, with PHP 5.3.3 and GC switched
OFF. Again, only one Apache process fails. The process begun failing
immediately after Apache restart. A simple reproduce class:
Reproduce code:
---------------
class Test
{
private $data = NULL;
public function __construct($data)
{
echo "<pre>";
var_dump($this);
echo "</pre>";
$this->data = $data;
}
public function getData()
{
echo "<pre>";
var_dump($this);
echo "</pre>";
return $this->data;
}
}
echo "PID: " . getmypid();
$foo = new Test('Hello');
echo $foo->getData();
Correct output:
---------------
PID: 22839
object(Test)#1 (1) {
["data":"Test":private]=>
NULL
}
object(Test)#1 (1) {
["data":"Test":private]=>
string(5) "Hello"
}
Hello
Malfunctioning Apache process output:
-------------------------------------
PID: 22818
object(Test)#1 (1) {
["data":"Test":private]=>
NULL
}
Warning: Attempt to assign property of non-object in
/var/www/html/testthis.php on line 16
object(Test)#1 (1) {
["data":"Test":private]=>
NULL
}
Previous Comments:
------------------------------------------------------------------------
[2010-05-15 19:06:58] phpbugs at colin dot guthr dot ie
Just for reference, I just tested and this bug is still a problem with
5.3.2.
------------------------------------------------------------------------
[2010-04-28 10:05:16] [email protected]
The way this bug tracker works is that the bug doesn't get automatically
re-opened from the Feedback status when someone posts a comment; it's
only if the original reporter or a PHP developer actually resets it to
Open.
Reopening, anyway, since feedback was provided.
------------------------------------------------------------------------
[2010-04-28 09:47:53] lukas at twobits dot cz
I am unfortunately unable to provide more feedback except that we have
never encountered this problem again with GC off. We have now been using
5.3.2. If we decide to test it with the garbage collector one once
again, I'll provide some more feedback.
------------------------------------------------------------------------
[2010-04-27 13:08:07] phpbugs at colin dot guthr dot ie
I'm curious as to why this bug is set to "No Feedback"... Lukas has
provided more information about the topic to nail it down to a Garbage
Collection issue.
I will try and upgrade sometime soon on my development machine to see if
I can retrigger the problem, but in the meantime, has there been any
progress? Are there now some potentially duplicate bugs and even a fix?
Does the issue still cause you problems Lukas?
Thanks :)
------------------------------------------------------------------------
[2010-01-04 12:22:00] lukas at twobits dot cz
We now have about three weeks of successful operation with
zend.enable_gc = Off
I assume it is safe to say that this bug indeed is GC related.
------------------------------------------------------------------------
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
http://bugs.php.net/bug.php?id=50027
--
Edit this bug report at http://bugs.php.net/bug.php?id=50027&edit=1