Skip Menu |
 

This queue is for tickets about the DBD-mysql CPAN distribution.

Report information
The Basics
Id: 39866
Status: rejected
Priority: 0/
Queue: DBD-mysql

People
Owner: Nobody in particular
Requestors: ELACOUR [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 4.007
  • 4.008
Fixed in: (no value)



Subject: segfault on mysql_ping
Download (untitled) / with headers
text/plain 975b
Hi, I would like to report information about this problem (see also http://bugs.mysql.com/bug.php?id=36810). Using RT on Debian lenny, and fastcgi, we encouter sometimes this problem (the fastcgi process segfault). It's in the DBD::mysql ping function, here are the steps I used to reproduce it: - set low timeout in my.cnf (10s) - start the app (RT) * I show a first connect and ping - wait for timeout using SHOW FULL PROCESSLIST - connect to the app * works fine, RT reconnects, ping works, adding debug in mysql_db_reconnect function I see that "imp_dbh->auto_reconnect" is false and so there is no automatic reconnect from DBD, but RT has code to do it and does it. - wait timeout another time - reconnect to the app * mysql_db_reconnect detect now that auto_reconnect is on (why???) try to reconnect, return TRUE, then the next call to mysql_ping in the DBD::mysql ping function segfault. Please don't hesitate to ask if you need more debugging to solve this :)
Download (untitled) / with headers
text/plain 196b
On Tue Oct 07 11:38:43 2008, ELACOUR wrote: Show quoted text
> It's in the DBD::mysql ping function, here are the steps I used to > reproduce it:
Here's a simpler way to reproduce it. Run the attached program :)
Download dbd_mysql_test.pl
text/x-perl 750b
#!/usr/bin/perl -w use strict; use warnings; use DBI; my ($host, $database, $username, $password) = @ARGV; die "Usage: $0 host database username password\n" unless $password; my $dbh = DBI->connect("DBI:mysql:database=$database;host=$host", $username, $password); die "Connection failed " . DBI->errstr() unless $dbh; $dbh->{mysql_auto_reconnect} = 1; my $threadid = $dbh->{mysql_thread_id}; my $dbh2 = DBI->connect("DBI:mysql:database=$database;host=$host", $username, $password); die "Connection failed " . DBI->errstr() unless $dbh2; $dbh2->do("KILL $threadid"); $dbh2->disconnect(); sleep 1; my ($val) = $dbh->selectrow_array("SELECT 1"); print "You do not have the bug. Also, autoreconnection: " . ($val ? "succeeded" : "failed") . "\n";
From: daniel.frett [...] ccci.org
Download (untitled) / with headers
text/plain 1.1k
On Tue Oct 07 11:38:43 2008, ELACOUR wrote: Show quoted text
> Hi, > > I would like to report information about this problem (see also > http://bugs.mysql.com/bug.php?id=36810). > > Using RT on Debian lenny, and fastcgi, we encouter sometimes this > problem (the fastcgi process segfault). > > It's in the DBD::mysql ping function, here are the steps I used to > reproduce it: > > - set low timeout in my.cnf (10s) > - start the app (RT) > * I show a first connect and ping > - wait for timeout using SHOW FULL PROCESSLIST > - connect to the app > * works fine, RT reconnects, ping works, adding debug in > mysql_db_reconnect function I see that "imp_dbh->auto_reconnect" is > false and so there is no automatic reconnect from DBD, but RT has code > to do it and does it. > - wait timeout another time > - reconnect to the app > * mysql_db_reconnect detect now that auto_reconnect is on (why???) try > to reconnect, return TRUE, then the next call to mysql_ping in the > DBD::mysql ping function segfault. > > Please don't hesitate to ask if you need more debugging to solve this :) > >
This is a duplicate of this bug report. http://rt.cpan.org/Public/Bug/Display.html?id=37027 -Daniel
Download (untitled) / with headers
text/plain 166b
I have also seen this problem: http://www.mail-archive.com/dbi-users@perl.org/msg31416.html Please let me know if I can help to test any code :) Cheers, Edmund
From: timo2009 [...] ballin.se
Download (untitled) / with headers
text/plain 301b
On Fr. 10. Okt. 2008, 05:39:48, EVDB wrote: I can confirm this problem on Solaris: With Apache 2.2 and mod_perl2 ( sql authentification module - similar to Apache::AuthDBI ) while connecting to a external mysql 4.1.22 DB. But I think the "trigger" is the short connect timout on that server.
Download perl_dbd_mysql_report.txt.gz
application/x-gzip 3.8k

Message body not shown because it is not plain text.



This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.