Bug #61411 [Com]: PDO Segfaults with PERSISTENT == TRUE && EMULATE_PREPARES == FALSE

From: Date: Wed, 14 Jan 2015 22:05:43 +0000
Subject: Bug #61411 [Com]: PDO Segfaults with PERSISTENT == TRUE && EMULATE_PREPARES == FALSE
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189958@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=61411&edit=1

 ID:                 61411
 Comment by:         don at smugmug dot com
 Reported by:        julien at palard dot fr
 Summary:            PDO Segfaults with PERSISTENT == TRUE &&
                     EMULATE_PREPARES == FALSE
 Status:             Re-Opened
 Type:               Bug
 Package:            PDO MySQL
 Operating System:   Linux 2.6.32-5-amd64
 PHP Version:        5.4.0
 Assigned To:        uw
 Block user comment: N
 Private report:     N

 New Comment:

We've been running with PERSISTENT = TRUE && EMULATE_PREPARES = FALSE on our testbed
since December 23rd, with no segfaults or any other problems with connections, including the ones
described by Fundom02.  We'll likely push this change to production shortly.


Previous Comments:
------------------------------------------------------------------------
[2015-01-14 18:24:50] Fundom02 at yahoo dot com

I get an error, caused by php returning a cached connection that's expired.

If you run my code you will see the problem.

------------------------------------------------------------------------
[2015-01-14 18:17:23] mike@php.net

Are you experiencing a crash?

------------------------------------------------------------------------
[2015-01-13 11:31:04] fundom02 at yahoo dot com

Any news on this?

------------------------------------------------------------------------
[2014-12-26 18:52:16] Fundom02 at yahoo dot com

This is a bug.

$pdo creates a new connection. 2 seconds later MySQL closes that connection. 3 seconds later $pdo1
requests a completely new connection which is instantly reported as lost connection.

I believe that php-pdo is caching all connections and not checking if cached connections are closed.

If this weren't the case then $pdo1 would successfully create a new connection.

------------------------------------------------------------------------
[2014-12-26 18:45:26] don at smugmug dot com

Ahhh... That doesn't sound like a bug, actually.  The connection is properly timing out on the
MySQL side because enough seconds have passed.  Just reconnect and continue on?

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


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=61411


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


Thread (21 messages)

« previous php.bugs (#189958) next »