Bug #63176 [Asn]: Segmentation fault when instantiate 2 persistent PDO to the same db server

2013-06-14 Thread jrbasso at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=63176&edit=1

 ID: 63176
 User updated by:jrbasso at gmail dot com
 Reported by:jrbasso at gmail dot com
 Summary:Segmentation fault when instantiate 2 persistent PDO
 to the same db server
 Status: Assigned
 Type:   Bug
 Package:PDO related
 Operating System:   Ubunt 12.04.1
 PHP Version:5.4.7
 Assigned To:wez
 Block user comment: N
 Private report: N

 New Comment:

@thz, the workaround I did was to create 2 DNS names for the same DB. So PHP 
will 
think they are 2 different servers and connect twice.


Previous Comments:

[2013-06-14 13:16:48] thz at plista dot com

Hi, we are experiencing the same error and it's preventing us from moving to 
PHP 
5.4. Are there any plans to fix this or are we going to have to live with not 
being able to derive from PDO?

We have done extensive debugging and may be able to provide some information as 
to why this happens, but due to a lack of internal knowledge of how the Zend 
engine works, we haven't been able to come up with a fix.


[2012-09-28 13:37:49] jrbasso at gmail dot com

I tested in my PHP 5.3.15 and the issue doesn't happen. It just happen in PHP 
5.4.x.


[2012-09-28 13:22:34] cjsaylor at gmail dot com

After looking at the patch, is denying persistent connections from derived PDO 
classes the actual proposed solution?  Not being able to extend \PDO with 
persistent connections would be a problem in many frameworks/appliances.


[2012-09-28 02:55:06] larue...@php.net

@wez, could you please look at this? the attached patch indicated where the 
problem came from. :)

thanks


[2012-09-28 02:47:52] larue...@php.net

The following patch has been added/updated:

Patch Name: bug63176.patch
Revision:   1348800472
URL:
https://bugs.php.net/patch-display.php?bug=63176&patch=bug63176.patch&revision=1348800472




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

https://bugs.php.net/bug.php?id=63176


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=63176&edit=1


Bug #63176 [Com]: Segmentation fault when instantiate 2 persistent PDO to the same db server

2012-09-28 Thread jrbasso at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=63176&edit=1

 ID: 63176
 Comment by: jrbasso at gmail dot com
 Reported by:jrbasso at gmail dot com
 Summary:Segmentation fault when instantiate 2 persistent PDO
 to the same db server
 Status: Assigned
 Type:   Bug
 Package:PDO related
 Operating System:   Ubunt 12.04.1
 PHP Version:5.4.7
 Assigned To:wez
 Block user comment: N
 Private report: N

 New Comment:

I tested in my PHP 5.3.15 and the issue doesn't happen. It just happen in PHP 
5.4.x.


Previous Comments:

[2012-09-28 13:22:34] cjsaylor at gmail dot com

After looking at the patch, is denying persistent connections from derived PDO 
classes the actual proposed solution?  Not being able to extend \PDO with 
persistent connections would be a problem in many frameworks/appliances.


[2012-09-28 02:55:06] larue...@php.net

@wez, could you please look at this? the attached patch indicated where the 
problem came from. :)

thanks


[2012-09-28 02:47:52] larue...@php.net

The following patch has been added/updated:

Patch Name: bug63176.patch
Revision:   1348800472
URL:
https://bugs.php.net/patch-display.php?bug=63176&patch=bug63176.patch&revision=1348800472


[2012-09-28 02:10:28] jrbasso at gmail dot com

Description:

Download the PHP version 5.4.7, compiled with ./configure --enable-debug --with-
pdo-mysql --enable-pcntl

Run the test script and it gives a segmentation fault when the script finish. 
If 
I remove the attribute from PDO2 it works fine. If the persistent option is 
disabled it works fine too.

gdb backtrace available on https://gist.github.com/3bda9d5253e7a86168e0


Test script:
---
db = new PDO2('mysql:host=localhost', 'root', 'root', 
array(PDO::ATTR_PERSISTENT => true));
$this->db->query('SELECT 1')->fetchAll();
}
}

$a = new ModelA();
$b = new ModelA();


Expected result:

No segmentation fault

Actual result:
--
Segmentation fault (core dumped)






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=63176&edit=1


[PHP-BUG] Bug #63176 [NEW]: Segmentation fault when instantiate 2 persistent PDO to the same db server

2012-09-27 Thread jrbasso at gmail dot com
From: jrbasso at gmail dot com
Operating system: Ubunt 12.04.1
PHP version:  5.4.7
Package:  PDO related
Bug Type: Bug
Bug description:Segmentation fault when instantiate 2 persistent PDO to the 
same db server

Description:

Download the PHP version 5.4.7, compiled with ./configure --enable-debug
--with-
pdo-mysql --enable-pcntl

Run the test script and it gives a segmentation fault when the script
finish. If 
I remove the attribute from PDO2 it works fine. If the persistent option is

disabled it works fine too.

gdb backtrace available on https://gist.github.com/3bda9d5253e7a86168e0


Test script:
---
db = new PDO2('mysql:host=localhost', 'root', 'root',
array(PDO::ATTR_PERSISTENT => true));
$this->db->query('SELECT 1')->fetchAll();
}
}

$a = new ModelA();
$b = new ModelA();


Expected result:

No segmentation fault

Actual result:
--
Segmentation fault (core dumped)

-- 
Edit bug report at https://bugs.php.net/bug.php?id=63176&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=63176&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=63176&r=trysnapshot53
Try a snapshot (trunk): 
https://bugs.php.net/fix.php?id=63176&r=trysnapshottrunk
Fixed in SVN:   https://bugs.php.net/fix.php?id=63176&r=fixed
Fixed in release:   https://bugs.php.net/fix.php?id=63176&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=63176&r=needtrace
Need Reproduce Script:  https://bugs.php.net/fix.php?id=63176&r=needscript
Try newer version:  https://bugs.php.net/fix.php?id=63176&r=oldversion
Not developer issue:https://bugs.php.net/fix.php?id=63176&r=support
Expected behavior:  https://bugs.php.net/fix.php?id=63176&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=63176&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=63176&r=submittedtwice
register_globals:   https://bugs.php.net/fix.php?id=63176&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63176&r=php4
Daylight Savings:   https://bugs.php.net/fix.php?id=63176&r=dst
IIS Stability:  https://bugs.php.net/fix.php?id=63176&r=isapi
Install GNU Sed:https://bugs.php.net/fix.php?id=63176&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63176&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=63176&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=63176&r=mysqlcfg



[PHP-BUG] Bug #62337 [NEW]: Randomly getting exhausted memory

2012-06-15 Thread jrbasso at gmail dot com
From: jrbasso at gmail dot com
Operating system: Linux 3.2.12-3.2.4.amzn1.x86_64
PHP version:  5.3.14
Package:  SOAP related
Bug Type: Bug
Bug description:Randomly getting exhausted memory

Description:

Randomly the SoapClient constructor is trying to allocate huge amounts of
memory 
and causing the error Error: Allowed memory size of 268435456 bytes
exhausted 
(tried to allocate 18446744072233156736 bytes)

The amount goes from 2GB to numbers like above.

This started to happen when we switched from 5.3.10 to 5.3.13 (and now
5.3.14).

I am not able to reproduce the error easily, once it do not happens in all
the 
requests. The constructor is always called with the same parameters.

Soap configuration:
Soap Client enabled
Soap Server enabled

Directive   Local Value
soap.wsdl_cache 1
soap.wsdl_cache_dir /tmp
soap.wsdl_cache_enabled 1
soap.wsdl_cache_limit   5
soap.wsdl_cache_ttl 86400


Test script:
---
$soap = new
SoapClient('https://ics2ws.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.47.wsdl',
array('merchantId' => '???', 'transactionKey' => '???'));


-- 
Edit bug report at https://bugs.php.net/bug.php?id=62337&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62337&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62337&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=62337&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62337&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62337&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62337&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=62337&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=62337&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=62337&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=62337&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=62337&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=62337&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=62337&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=62337&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=62337&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=62337&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=62337&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=62337&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=62337&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=62337&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=62337&r=mysqlcfg