DBI 1.605 $dbh->ping crashes Perl (seg fault) when autoreconnect=1 and connection goes away (at least with DBD::mysql)
- From: archon810@xxxxxxxxx (Archon810)
- Date: Mon, 7 Jul 2008 20:24:54 -0700 (PDT)
So I've been tracing this extremely weird segfault in my code for
about half a year now mostly due to the evasive nature of the crash
and finally traced it down to these specific steps:
- perl 5.10 (happened in 5.8 too)
- DBI 1.605
- DBD::mysql 4.007
- $dbh = DBI->connect($dsn, $db_user, $db_passwd,
{mysql_auto_reconnect => 1})
- establish connection
- kill the connection on the server side or let it time out
- call $dbh->ping
- experience a consistent seg fault
Now, if I called DBI->connect_cached() instead of ping() and DBI-
connect(), which is what I was doing before, the crash would occur as
well.
Here's the kicker: if I remove mysql_auto_reconnect, no crash occurs
during $dbh->ping.
Is there something in DBI that would do this? I'm doing additional
analysis and talking to the writer of DBD::mysql in hopes of solving
this problem but it looks like DBD::mysql doesn't implement its own
ping(), so it's probably something DBI does...
.
- Follow-Ups:
- Prev by Date: Re: Detecting auto-incrementing primary keys
- Next by Date: Re: DBI 1.605 $dbh->ping crashes Perl (seg fault) when autoreconnect=1 and connection goes away (at least with DBD::mysql)
- Previous by thread: DBD::CSV group by on multiple columns not working
- Next by thread: Re: DBI 1.605 $dbh->ping crashes Perl (seg fault) when autoreconnect=1 and connection goes away (at least with DBD::mysql)
- Index(es):
Relevant Pages
|