ID: 30412
User updated by: subscription at nazarenko dot net
Reported By: subscription at nazarenko dot net
-Status: Feedback
+Status: Open
Bug Type: OCI8 related
Operating System: SuSE Linux 8.2
-PHP Version: 5.0.2
+PHP Version: 5.0.3RC1
New Comment:
Let me confirm it again after some more testing today that I still do
get segfaults, but not that often than before.
Also, let me point out that it seems to be exclusively Apache/PHP
problem. The same script is run from the shell environment with no
problems at all.
Now to the example that you have asked for. It is really simple. In
fact *any* Oracle query will cause occasional browser "hanging". Here
is a bit of code I used today for testing:
<?php
$db_conn = ocilogon( "user", "password",
"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myoracle)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=CRPT)))")
or die("Critical Error: No connection to Oracle!");
$cmdstr = "
SELECT DISTINCT
TRIM(XM.X_MEMBER_ID) MEMBER_ID,
S.X_MEMBER_ID DBS_ID
FROM
TABLE_SITE_PART SP,
TABLE_SITE_PART SP2,
TABLE_X_MEMBERDATA XM,
TABLE_SITE S
WHERE
SP2.X_CLASS_KEY = 9
AND SP2.LEVEL_TO_BIN IN (0,1,2,3,4,5)
AND SP2.SITE_PART2SITE_PART = SP.OBJID
AND SP2.X_SITE_PART2MEMBERDATA = XM.OBJID
AND SP.ALL_SITE_PART2SITE = S.OBJID
AND XM.X_STATUS = 'Active'
AND S.STATUS = '0'
ORDER BY
TRIM(XM.X_MEMBER_ID)
";
$parsed = ociparse($db_conn, $cmdstr);
ociexecute($parsed);
$boxrows = ocifetchstatement($parsed, $listbox);
OCIFreeStatement($parsed);
print_r($listbox);
?>
Most of the times this would work fine returning me an array of data.
But sometimes the browser would just wait with nothing happening. And
very rarely the page would fail immediately (producing a segfault in
apache's error log)
Hope this helps.
Previous Comments:
------------------------------------------------------------------------
[2004-12-02 01:20:38] [EMAIL PROTECTED]
>[Thu Dec 02 00:57:47 2004] [warn] child process 18167 still did not
exit, sending a SIGTERM
I don't think PHP/OCI8 is causing this.
I saw this problem many times without OCI8 enabled or even without any
module enabled at all.
>Some page loads are unsuccessful, but there
>is no segfault! The browser just keeps waiting and waiting
>and nothing
I would be very thankful if you provide tiny reproduce script, that I
can use to reproduce your problem.
happens.
------------------------------------------------------------------------
[2004-12-02 01:05:47] subscription at nazarenko dot net
Marking it as open...
------------------------------------------------------------------------
[2004-12-02 01:02:06] subscription at nazarenko dot net
Hello again,
Today I tried PHP 5.0.3RC1 with Apache 2.0.52 Worker and Oracle 9.2.0.4
Client for Linux.
I'd say there has been improvement made! But not perfect.
In fact the Bug #28603 which was reported by me some time ago and later
marked as "Bogus" has been fixed with this new release!!
What I mean is that Apache does not crash on graceful restart anymore.
Even the Apache-Worker behaves fine. I am getting debug messages in the
error log file, but I guess that will be removed in the release
version:
[Thu Dec 02 00:42:28 2004] [notice] Apache/2.0.52 (Linux/SUSE)
configured -- resuming normal operations
[Thu Dec 02 00:43:28 2004] [notice] SIGUSR1 received. Doing graceful
restart
OCIDebug: START php_mshutdown_oci<br />
OCIDebug: END php_mshutdown_oci<br />
OCIDebug: START php_mshutdown_oci<br />
OCIDebug: END php_mshutdown_oci<br />
OCIDebug: START php_mshutdown_oci<br />
OCIDebug: END php_mshutdown_oci<br />
OCIDebug: START php_mshutdown_oci<br />
OCIDebug: END php_mshutdown_oci<br />
[Thu Dec 02 00:43:29 2004] [notice] Apache/2.0.52 (Linux/SUSE)
configured -- resuming normal operations
OCIDebug: START php_mshutdown_oci<br />
OCIDebug: END php_mshutdown_oci<br />
OCIDebug: START php_mshutdown_oci<br />
OCIDebug: END php_mshutdown_oci<br />
It is somewhat strange that I get some OCIDebug START and END messages
*after* the Apache has started, as shown above.
If I do full restart via "/etc/init.d/apache2 restart", then sometimes
I get the following:
OCIDebug: START php_mshutdown_oci<br />
OCIDebug: END php_mshutdown_oci<br />
OCIDebug: START php_mshutdown_oci<br />
OCIDebug: END php_mshutdown_oci<br />
OCIDebug: START php_mshutdown_oci<br />
OCIDebug: END php_mshutdown_oci<br />
[Thu Dec 02 00:57:47 2004] [warn] child process 18167 still did not
exit, sending a SIGTERM
[Thu Dec 02 00:57:47 2004] [warn] child process 18259 still did not
exit, sending a SIGTERM
[Thu Dec 02 00:57:51 2004] [error] child process 18167 still did not
exit, sending a SIGKILL
[Thu Dec 02 00:57:51 2004] [error] child process 18259 still did not
exit, sending a SIGKILL
[Thu Dec 02 00:58:08 2004] [notice] SIGHUP received. Attempting to
restart
[Thu Dec 02 00:58:08 2004] [notice] Apache/2.0.52 (Linux/SUSE)
configured -- resuming normal operations
...which i guess is ok, since Apache restarts successfully after all.
Now to the not so good news: Apache gives significantly less segfaults
than before when performing Oracle queries but they still do happen
occasionally.
Actually, I get *really* very few segfaults now, but there is a new
behaviour not seen before. Some page loads are unsuccessful, but there
is no segfault! The browser just keeps waiting and waiting and nothing
happens. No segfault, no data coming in from Apache. This happens on
average for 30% of page requests containing Oracle queries.
Well, I hope that since we have seen some imporvement now it could be
made working 100% sometime in the future.
Thanks so much for addressing this issue!
Regards,
Andrei
------------------------------------------------------------------------
[2004-11-01 01:00:02] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2004-10-23 11:39:01] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php5-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.0-win32-latest.zip
------------------------------------------------------------------------
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/30412
--
Edit this bug report at http://bugs.php.net/?id=30412&edit=1