php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30410 exit signal Segmentation fault (11)
Submitted: 2004-10-12 15:54 UTC Modified: 2004-10-29 00:16 UTC
Votes:5
Avg. Score:4.8 ± 0.4
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: csecret at free dot fr Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 5.0.2 OS: Solaris 8
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: csecret at free dot fr
New email:
PHP Version: OS:

 

 [2004-10-12 15:54 UTC] csecret at free dot fr
Description:
------------
When I ask Oracle for a query, I have sometimes (8 times out of 10) this error :
[client 0.0.0.0] PHP Warning:  Unknown: _oci_close_session OCIHandleAlloc OCI_HTYPE_SVCCTX: OCI_INVALID_HANDLE in Unknown on line 0
[client 0.0.0.0] PHP Warning:  Unknown: _oci_close_session: OCIAttrSet OCI_ATTR_SERVER: OCI_INVALID_HANDLE in Unknown on line 0
[client 0.0.0.0] PHP Warning:  Unknown: _oci_close_session: OCIAttrSet OCI_ATTR_SESSION: OCI_INVALID_HANDLE in Unknown on line 0
[client 0.0.0.0] PHP Warning:  Unknown: _oci_close_session: OCISessionEnd: OCI_INVALID_HANDLE in Unknown on line 0
[Tue Oct 12 15:45:35 2004] [notice] child pid 820 exit signal Segmentation fault (11)

I tried to find everywhere on internet for the solution, but.......

The code which generate this error is :

while (OCIFetchInto ($this->query, $this->results[], OCI_ASSOC)) {}

When the results is too big, the adding to the table stop, that cause 75% the table seen in the web !

Thanks if you can help me...

JMD


Reproduce code:
---------------
  function exe_select($query)
  {
   $this->nbresults = 0;
   $this->results=array();

   // Test de la connexion ? la bdd
   if (($this->verif != "nok") && ($this->verif != "ok")){$this->verif = "nok";}
   // Si la connexion est ok, on lance la requ?te
   else
   {
  	 // Lancement de la requ?te
  	 $this->query = oci_parse($this->connection, $query);
  	 if (oci_execute($this->query))
		 {
//print '********************************** OK ****************************';
  		 // On r?cup?re le nbre de colonne
  		 $this->numCols = oci_num_fields($this->query);

//print '<pre>';print_r($this->query);print'</pre>';
//$jmi=0;
       while (OCIFetchInto ($this->query, $this->results[], OCI_ASSOC)) {

       }
		   $this->verif1 = "ok";
		 }
	   else
		 {
//print '********************************** PAS OK ****************************';
       $this->verif1 = "nok";
     }

     }
   // -- Pour le mode debug : Mettre en commentaire
   //error_reporting(1);

   return $this->verif1;
  }


Expected result:
----------------
The fill my $this->results variable

Actual result:
--------------
When the results is too big, the adding to the table stop, that cause 75% the table seen in the web !

and segmentation fault error !

And the log show that :

[client 0.0.0.0] PHP Warning:  Unknown: _oci_close_session OCIHandleAlloc OCI_HTYPE_SVCCTX: OCI_INVALID_HANDLE in Unknown on line 0
[client 0.0.0.0] PHP Warning:  Unknown: _oci_close_session: OCIAttrSet OCI_ATTR_SERVER: OCI_INVALID_HANDLE in Unknown on line 0
[client 0.0.0.0] PHP Warning:  Unknown: _oci_close_session: OCIAttrSet OCI_ATTR_SESSION: OCI_INVALID_HANDLE in Unknown on line 0
[client 0.0.0.0] PHP Warning:  Unknown: _oci_close_session: OCISessionEnd: OCI_INVALID_HANDLE in Unknown on line 0
[Tue Oct 12 15:45:35 2004] [notice] child pid 820 exit signal Segmentation fault (11)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-12 15:57 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2004-10-13 12:14 UTC] csecret at free dot fr
I installed PHP 4.3.9 instead of 5 and no more problem...
 [2004-10-28 23:17 UTC] bobsledbob at yahoo dot com
I'm having this exact problem.

I'm using the latest PHP src from CVS (php5-STABLE-200410281830), with no luck or resolve to this issue.

Unfortuneatly, I can't easily produce a backtrace for you.  :(
 [2004-10-29 00:12 UTC] csecret at free dot fr
Go back to php 4, and your problem will be solved ;)

It's what I have done, and now everything is ok...

JM
 [2004-10-29 00:16 UTC] derick@php.net
User is unwilling to test mentioned snapshot.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 23:01:26 2024 UTC