php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19517 the oci8 function cause apache to crash
Submitted: 2002-09-20 03:30 UTC Modified: 2002-12-06 19:14 UTC
Votes:6
Avg. Score:4.0 ± 1.2
Reproduced:4 of 4 (100.0%)
Same Version:0 (0.0%)
Same OS:3 (75.0%)
From: f dot labanvoye at cg70 dot fr Assigned:
Status: No Feedback Package: OCI8 related
PHP Version: 4.2.3 OS: windows 2000 and linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
46 + 7 = ?
Subscribe to this entry?

 
 [2002-09-20 03:30 UTC] f dot labanvoye at cg70 dot fr
on medium/high load and on multi-threaded serveurs ( apache 1.3.X windows and apache 2.0.X (mpm=worker) on linux), oci cause segmentation fault to apache.

I test with apache 1.3.26 / 2.0.40 on windows 2000 server and professionnal, php 4.2.3, oracle 8.1.7.0 and 9.0.1 ( on the same and different Pc). 
I test with and without autocommit. 
i always get the same result.

the script:
<?

$c = ocilogon ( 'test', "test", "db9");

$sql = "select count(id) as nb_row from test";

$stmt = ociparse ( $c, $sql );
ociexecute ( $stmt );
ocifetchinto ( $stmt, $tab );
print_r ( $tab );

ocilogoff ( $c );
?>

i run test with microsoft  web apllication stress tools and ab.

the error message is :
_oci_open_server: ORA12154 TNS: could not resolve service name.

All works fine with linux / apache 1.3.X. 





Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-05 14:13 UTC] willie_gollino at hp dot com
I get this error in my apache error log when multithreading is turned on:
[notice] child pid 28373 exit signal Segmentation fault (11)

Apache: 2.0.X (mpm worker)
OS: HP-UX 11.00 (with linker patches)
PHP: 4.2.2 dso with oci8 extension
Oracle: 8.1.6

If I set ThreadsPerChild to 1 (single threaded), I don't get any segfaults. With ThreadsPerChild set to 2 (or higher) I get the segmentation faults with as few as 2 concurrent requests (ab -n 10 -c 2 http://testurl/).

With particularly high load (>100 concurrent requests) Apache 2 hangs, and has to be killed.

I also get this error message in my php log:
"PHP Warning:  _oci_open_server: ORA-12154: TNS:could not resolve service name"

On the same system, Apache 1.3.26 with PHP as CGI works perfectly.
 [2002-11-26 15:33 UTC] maxim@php.net
This might be an Apache 2 problem. Can you reproduce the crash with the latest CVS release on Apache over 2.0.43?
 [2002-11-26 20:14 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-12-06 19:14 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2003-05-11 16:46 UTC] flop dot m at usa dot net
Hello,

I'm having the same trouble (not always, but often - when server is receiving lots of user queries).

TNS-12154 when executing OCILogon method.

It seems that an error occurs at the same time on the Oracle side, at least, in the sqlnet.log, some errors is logged, and I could not find the description of that error on Oracle's web site.

Thus, I changed my OCILogon from

OCILogon('user', 'pass', 'tns alias');

to

$tns = <the actual line describing my listener from the tnsnames.ora file>;
OCILogon('user', 'pass', $tns);

and bingo, no more crashes ;)

My guess is when PHP sends too many lookups in a short time,  something in the oci call crashs. So, is it in PHP side, or Oracle side, I don't know.

I hope this will help to pinpoint/correct that pretty much annoying bug.
 [2004-07-26 22:05 UTC] aimart at tutopia dot com
Thank !!!!!!!!

Cha gracias in spanishhh
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 06:01:28 2024 UTC