Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: DBD::mysql Ping segmentation fault

by RndNoob (Initiate)
on Jun 12, 2015 at 13:36 UTC ( [id://1130194]=note: print w/replies, xml ) Need Help??


in reply to Re: DBD::mysql Ping segmentation fault
in thread DBD::mysql Ping segmentation fault

Trace:

>> ping DISPATCH (DBI::db=HASH(0xce2d58) rc1/1 @1 g2 ima405 + pid#3528) at test.pl line 20 -> ping for DBD::mysql::db (DBI::db=HASH(0xce2d58)~0xcf0178) thr#9 +a1010 <- ping= ( 1 ) [1 items] at test.pl line 20 OK >> ping DISPATCH (DBI::db=HASH(0xce2d58) rc1/1 @1 g2 ima405 + pid#3528) at test.pl line 20 -> ping for DBD::mysql::db (DBI::db=HASH(0xce2d58)~0xcf0178) thr#9 +a1010 <- ping= ( 1 ) [1 items] at test.pl line 20 OK >> ping DISPATCH (DBI::db=HASH(0xce2d58) rc1/1 @1 g2 ima405 + pid#3528) at test.pl line 20 -> ping for DBD::mysql::db (DBI::db=HASH(0xce2d58)~0xcf0178) thr#9 +a1010 <- ping= ( 1 ) [1 items] at test.pl line 20 OK >> ping DISPATCH (DBI::db=HASH(0xce2d58) rc1/1 @1 g2 ima405 + pid#3528) at test.pl line 20 -> ping for DBD::mysql::db (DBI::db=HASH(0xce2d58)~0xcf0178) thr#9 +a1010 imp_dbh->pmysql: d39230 my_login IMPSET but not ACTIVE so connect not skipped imp_dbh->my_login : dbname = test, uid = root, pwd = ,host = 127.0.0.1 +, port = 3306 imp_dbh->mysql_dr_connect: host = |127.0.0.1|, port = 3306, uid = root +, pwd = imp_dbh->bind_type_guessing: 0 imp_dbh->use_server_side_prepare: 0 imp_dbh->mysql_dr_connect: client_flags = 2 imp_dbh->mysql_dr_connect: <- --> do_error Can't connect to MySQL server on '127.0.0.1' (111) error 2003 recorded +: Can't connect to MySQL server on '127.0.0.1' (111) <-- do_error !! ERROR: 2003 'Can't connect to MySQL server on '127.0.0.1' (111) +' (err#0) <- ping= ( '' ) [1 items] at test.pl line 20 DBD::mysql::db ping failed: Can't connect to MySQL server on '127.0.0. +1' (111) at test.pl line 20. FAILED >> ping DISPATCH (DBI::db=HASH(0xce2d58) rc1/1 @1 g2 ima405 + pid#3528) at test.pl line 20 -> ping for DBD::mysql::db (DBI::db=HASH(0xce2d58)~0xcf0178) thr#9 +a1010 imp_dbh->pmysql: d39230 my_login IMPSET but not ACTIVE so connect not skipped imp_dbh->my_login : dbname = test, uid = root, pwd = ,host = 127.0.0.1 +, port = 3306 imp_dbh->mysql_dr_connect: host = |127.0.0.1|, port = 3306, uid = root +, pwd = imp_dbh->bind_type_guessing: 0 imp_dbh->use_server_side_prepare: 0 imp_dbh->mysql_dr_connect: client_flags = 2 imp_dbh->mysql_dr_connect: <-*** Error in `perl': double free or corru +ption (!prev): 0x0000000000d39230 *** Aborted

Seems that when Ping is called from connection established by itself and this connection failed, memory is not handled properly inside mysql_dr_connect. Maybe i must just check if Ping returned a valid conection before calling it again.

Anyways using DBI->connect_cached instead of Ping solved my problem.

although I still curious.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1130194]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (8)
As of 2024-04-23 12:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found