php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62463 multi_master + PDO beginTransaction -> PHP process crashed
Submitted: 2012-07-02 14:34 UTC Modified: 2013-02-18 00:35 UTC
From: ppcharli at gmail dot com Assigned:
Status: No Feedback Package: mysqlnd_ms (PECL)
PHP Version: 5.4.4 OS: Centos 6.2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-07-02 14:34 UTC] ppcharli at gmail dot com
Description:
------------
Centos 6.2
nginx 1.2
php 5.4.4
mysqlnd-ms 1.3.2
Percona XtraDB Cluster 5.5


When I run test.php -> randomly PHP process crashed with a segfault ("signal 11 
SIGSEGV")

If I remove "$conn->beginTransaction()" from test.php -> work OK

If I remove master_0 or master_1 from /etc/mysqlnd_ms.json -> work OK




Test script:
---------------
/etc/php.d/mysqlnd_ms.ini
--------------------------
extension=mysqlnd_ms.so
mysqlnd_ms.enable = 1
mysqlnd_ms.ini_file = "/etc/mysqlnd_ms.json"
mysqlnd_ms.multi_master = 1
mysqlnd_ms.disable_rw_split = 1

/etc/mysqlnd_ms.json
---------------------
{
    "test": {
        "master": {
            "master_0": {
                "host": "192.168.64.205",
                "port": "3306"
            },
            "master_1": {
                "host": "192.168.64.206",
                "port": "3306"
            }
        },
        "slave":{
        },
        "failover": "master"
    }
}

test.php
----------
<?php
$conn = new PDO("mysql:host=test", "root", "datadec");
$conn->beginTransaction();
$ret = $conn->query("SELECT @@hostname");
echo "<br> Connect to ".$ret->fetch(PDO::FETCH_ASSOC)['@@hostname']."<br>";
$conn->commit();
$conn = null;
?>




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-07-23 12:02 UTC] uw@php.net
-Status: Open +Status: Feedback
 [2012-07-23 12:02 UTC] uw@php.net
Please try using this snapshot:

  http://snaps.php.net/php-trunk-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

Please, try the latest version. I fail to reproduce the issue using trunk (ms 1.4.0 alpha) and the newly added test tests/mysqlnd_ms_pdo_begin_trx.phpt .
 [2013-02-18 00:35 UTC] pecl-dev at lists dot php dot 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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 11 00:01:31 2024 UTC