#30412 [NoF->Opn]: Apache Segmentation Fault (11)

From: Date: Thu, 10 Feb 2005 20:17:25 +0000
Subject: #30412 [NoF->Opn]: Apache Segmentation Fault (11)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-73781@lists.php.net to get a copy of this message
 ID:               30412
 User updated by:  subscription at nazarenko dot net
 Reported By:      subscription at nazarenko dot net
-Status:           No Feedback
+Status:           Open
 Bug Type:         OCI8 related
 Operating System: SuSE Linux 8.2
-PHP Version:      5.0.3RC1
+PHP Version:      5.0.4-Dev
 New Comment:

Hello it is me again,

Tested both 5.0.3 release and the latest snapshot
php5-STABLE-200502101130 with both Apache 2.0.52 Prefork and Worker
MPMs.

5.0.3 and the snapshot behave identically.

Under Prefork MPM everything is 100% ok.

Under Worker the same problem as before: some page loads are
unsuccessful with no segfault. The browser just keeps waiting and
waiting and nothing happens. This happens on
average for 30% of page requests containing Oracle queries.

Don't know if you want to pursue this further as the Prefork works fine
now.

Many thanks for your time and effort!!


Previous Comments:
------------------------------------------------------------------------

[2005-01-21 01:00:08] 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".

------------------------------------------------------------------------

[2005-01-13 01:27:24] tony2001@php.net

Please, try latest snapshot with non-threaded Apache.
Are you still able to replicate the problem ?

------------------------------------------------------------------------

[2004-12-03 11:52:49] rathamahata at ehouse dot ru

Sorry, please ignore previous post. That was apache with 
MPM=prefork + php compiled against apache with mpm=worker.  
I don't know how did it work. After i recompiled php 
against current apache problem had disappeared.

------------------------------------------------------------------------

[2004-12-03 11:31:54] rathamahata at ehouse dot ru

It looks like this happens (the browser would just wait 
with nothing happening) even with prefork mpm. 
strace shows 
Process 27641 attached - interrupt to quit 
futex(0x83967f0, FUTEX_WAIT, 2, NULL 
 
which is strange becouse apache is compiled with 
mpm=prefork 
 
`apache2 -l' 
Compiled in modules: 
  core.c 
  mod_access.c 
  mod_auth.c 
  mod_include.c 
  mod_deflate.c 
  mod_log_config.c 
  mod_expires.c 
  mod_setenvif.c 
  prefork.c 
  http_core.c 
  mod_mime.c 
  mod_status.c 
  mod_autoindex.c 
  mod_info.c 
  mod_cgi.c 
  mod_dir.c 
  mod_alias.c 
  mod_rewrite.c 
  mod_so.c

------------------------------------------------------------------------

[2004-12-02 15:17:32] subscription at nazarenko dot net

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.

------------------------------------------------------------------------

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


Thread (22 messages)

« previous php.bugs (#73781) next »