php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41829 PDO Seg fault issues
Submitted: 2007-06-27 19:40 UTC Modified: 2007-07-04 11:22 UTC
From: john_judy at homedecorators dot com Assigned:
Status: Not a bug Package: PDO related
PHP Version: 5.2.3 OS: FreeBSD
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: john_judy at homedecorators dot com
New email:
PHP Version: OS:

 

 [2007-06-27 19:40 UTC] john_judy at homedecorators dot com
Description:
------------
When using PDO we experience random seg fault errors:  [Wed Jun 27 09:52:31 2007] [notice] child pid 82572 exit signal Segmentation fault (11)

Unfortunately it doesn't happen consistently on any given page or query select. We are using a set of wrapper classes to provide extra functionality to PDO (record counts, function names similar to what we are currently using, extra debugging info, caching soon).

The seg fault appears to happen when returning the result set from our PDOconnection object during execute(). Debugging code and unimportant functions have been removed below.

Reproduce code:
---------------
class PDOStatementx extends PDOStatement{
	function execute($input=null){
		$this->params=$input;
		parent::execute($input);
		$this->cursorPos=0;
	}
}
class PDOconnection extends PDO{
	function __construct($update){
		parent::__construct( "mysql:host=". $connServer .";dbname=".$db, $uid, $pwd);
		$this->setAttribute( PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
		$this->setAttribute( PDO::ATTR_STATEMENT_CLASS, array('PDOStatementx'));
		$this->setAttribute(PDO::ATTR_EMULATE_PREPARES,true);
	}
	function execute($SQL,$debug=false){//legacy wrapper function
		$this->result = $this->prepare($SQL);
		$this->result->execute();
		return $this->result;
	}





Actual result:
--------------
As of right now I do not have access to a backtrace. The only error we are receiving is the one listed above: "[Wed Jun 27 09:52:31 2007] [notice] child pid 82572 exit signal Segmentation fault (11)"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-27 19:48 UTC] tony2001@php.net
We can't fix it without having a reproduce case and/or a clear backtrace.
 [2007-07-03 18:31 UTC] john_judy at homedecorators dot com
After further testing in 5.2.3 we were unable to recreate it. It may have been just showing up on our less upgraded servers as we are in the middle of upgrading to 5.2.3 and so our error logs are sometimes mixed.
 [2007-07-04 11:22 UTC] tony2001@php.net
Ok, please let us know (and reopen the report) if you find something.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 19:01:29 2024 UTC