Bug 6137 - httpd processes segfaulting when using php3 module and postgresql
httpd processes segfaulting when using php3 module and postgresql
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: mod_php3 (Show other bugs)
6.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Preston Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-10-20 09:49 EDT by chris
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-01-13 21:14:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description chris 1999-10-20 09:49:12 EDT
(At this stage I don't have a lot of information to deliver
on this one; I'll add further details as I track it down.
I'd appreciate a note if this has already been addressed
and I cant find it in bugzilla.)

We have a web-application using apache/php3/postgresql
(also python, but the python parts dont give us any
trouble).

Occasionally, but frequent enough that I can repeat it, an
access to a page (in php3, with some postgresql queries)
will cause the httpd process to segfault. When this
happens, the rest of the httpd processes also segfault. As
the processes die, the master process respawns then, and it
appears that once this has happened with all the processes,
its stable again for some time before the phenomenon
happens again.

This happens on a redhat-6.0 system as well, both 6.0 and
6.1 with the latest updates.

(Will be doing what we can this end to isolate the problem,
perhaps giving you a short segment of code that exhibits
the fault. Any recommendations on debugging options to turn
on, etc, in order to isolate the fault will be gratefully
received).

------- Additional Comments From   10/20/99 18:16 -------
The effect of the bug was not quite like I described above: If I
access a php3 page with the postgres queries, it will crash every
/third/ time /after/ the script runs. The frequency might have
something to do with the number of queries in the script.

Also, I've managed to stop the crashes happening with judicious use
of pg_free_result. The documententation indicates that using
pg_free_result is optional, but it seems to stop the crashes.

I believe now that the PostGreSQL connector for php3 is buggy, not
freeing the result buffers properly when the script terminates.
Comment 1 chris 1999-10-20 18:16:59 EDT
The effect of the bug was not quite like I described above: If I
access a php3 page with the postgres queries, it will crash every
/third/ time /after/ the script runs. The frequency might have
something to do with the number of queries in the script.

Also, I've managed to stop the crashes happening with judicious use
of pg_free_result. The documententation indicates that using
pg_free_result is optional, but it seems to stop the crashes.

I believe now that the PostGreSQL connector for php3 is buggy, not
freeing the result buffers properly when the script terminates.
Comment 2 chris 1999-10-26 09:44:59 EDT
Okay... just did a bit more experimenting, and it seems to have
nothing to do with postgresql, but simply the date function:

If I do this:
$thingy = 940739400;
$return_time = date("M j G:i", $thingy);

The httpd process will crash after the web page is serverd. If I
comment out just the 'date' statement, it doesnt crash (doesnt
display the date either :) If I wind the time back just a tad (in
fact, before Sunday UTC), it works again.

Different compiled versions of apache (the sample above was a compile
from scratch), start crashing at different values. (The default
redhat-6.1 shipment of apache crashes even before that Sunday; but
its too late at night for me to figure out what date exactly... I
don't think its that important anyway :)
Comment 3 chriscog 1999-10-27 02:55:59 EDT
Its a bug in PHP3 3.0.12. Viz: http://bugs.php.net/bugs.php3?id=2397

Sorry for filling up your disk, folks :)
Comment 4 Preston Brown 1999-10-27 11:08:59 EDT
not at all.  you did very thorough research on this one and we are
appreciative of your help.
Comment 5 Preston Brown 2000-01-13 21:14:59 EST
fixed in next release (which will include 3.0.14)

Note You need to log in before you can comment on or make changes to this bug.