ID: 23038
Comment by: hewei at ied dot org dot cn
Reported By: black at sunshine dot krneki dot org
Status: Assigned
Bug Type: Scripting Engine problem
Operating System: linux debian
PHP Version: 4.3.2-RC
Assigned To: andrei
New Comment:
Similar problem happens to me. I either cannot reproduce the
situation because sometimes changing a irrelevant place will temporaily
wipe the problem away. But it will come back at an unexpected time.
The problem once caused Apache 2.0 crashing on Win32. But after some
irrelevant code restructuring, it now casues
error like this:
Fatal error: Call to undefined function: foo() in /path/bar.php on line
xxx
But foo() is surely an aggregated method. The strange but perhaps
useful point is that a print_r of aggregation_info() at the bug place
shows the function dose exists. Even I add the following codes the
error still exists:
if (!method_exists($this, "foo")) {
deaggregate($this, "CLASS_having_method_foo");
aggregate($this, "CLASS_having_method_foo");
}
This problem really stops me from doing any futher coding.
I tried ZendSafeGard, upgraded to the 4.3.2RC2, changed from Apache
module to CGI, and moved from Windows to Linux(RedHat 9.0). But none
seems to imporve the situation.
Since the problem is not easily reproduced outside my complex class
hierarchy, please instruct me of any other debug information I can
print out at the bug place. And because the PHP I'm using is
recompiled, I would even like to try do source codes debugging.
Previous Comments:
------------------------------------------------------------------------
[2003-04-06 16:22:40] black@php.net
just letting you know that its been a week now with not a single crash
after removing aggregate - contact me when/if you want/need the db
dump and code dump to analyze this/test it.
------------------------------------------------------------------------
[2003-04-03 19:45:12] sniper@php.net
.
------------------------------------------------------------------------
[2003-04-03 15:38:50] black@php.net
according to http://snaps.php.net there is?
and yeah, i guess you could mark it as bogus, as far as "simple"
scripts go, i doubt i could ever reproduce this in a simple one.. even
the collection of code i use has about 170k just core files (and its
clean non bloated code if you believe it ;))..
the best i can do is give you a cvs snapshot of a week ago when the
bug was still occuring.. after i removed aggregate i havent had a
crash..
as for my debugging knowledge goes, its pretty much what i gathered
from this page, and you cant really expect me to master gdb and
valgrind without experience with any of them before.
if you want to give it a shot then by all means, im willing to give you
everything that is in my power to do so, a short example script
however, is not.
------------------------------------------------------------------------
[2003-04-03 12:24:05] sniper@php.net
I'm tempted to bogusify this right away since you only
assume a lot here. Please provide real information we can
work with..like a simple example script.
(and FYI: there is no such thing as 4.5-dev officially)
------------------------------------------------------------------------
[2003-04-03 11:42:21] black at sunshine dot krneki dot org
On bugreport 21478 i've experienced the same problem and behaviour
when trying to debug, but i believe the bugs are generally unrelated.
I've been searching to the sollution for my segfaulting of apache in
various areas... output buffering, stream functions (file access,
file_get_contents), references... and since i got the crashes in 4.3
then
i thought of the only thing i added to the code which was 4.3 related,
and that was the use of aggregate..
i used aggregate to aggregate 3-4 classes to a main object, and after
removing and reforming the classes to preform a row of "extends" on
them.. the behaviour wen't away, and I didnt get a single segfault in
the last 3-4 days.
it is my opinion that aggregate either contains a memory leak
somewhere, or that the problem is located inside the scripting engine..
i dont have anything to reproduce it anymore, except old cvs
snapshots which could reproduce it if required, but removing aggregate
and with it the segfaults seems to be enough of an indication for me.
this seems to be related to 4.3.0 and later, and was reproduced on my
side on every php version up to 4.5-CVS
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23038&edit=1