Skip Menu |

This queue is for tickets about the DBIx-Timeout CPAN distribution.

Report information
The Basics
Id: 75279
Status: open
Priority: 0/
Queue: DBIx-Timeout

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

Bug Information
Severity: Critical
Broken in: 1.01
Fixed in: (no value)



Subject: KILL of parent thread will raise an error and die
The KILL SQL command issued in _kill_connection() seems to conflict with newer versions of DBD::mysql such that it will always raise an exception and call_with_timeout() will always die. The attached patch fixes this, althought I'm not 100% sure it doesn't hide some other possible problems.
Subject: dbix-timeout-raiseerror.patch
--- Timeout.pm.old 2012-02-24 11:38:57.095308916 -0500 +++ Timeout.pm.new 2012-02-24 11:39:22.861719839 -0500 @@ -103,6 +103,7 @@ my $new_dbh = $dbh->clone(); $new_dbh->{InactiveDestroy} = 0; + $new_dbh->{RaiseError} = 0; $new_dbh->do("KILL $thread_id"); }
On Fri Feb 24 11:45:22 2012, WONKO wrote: Show quoted text
> The attached patch fixes this, althought I'm not 100% sure it doesn't > hide some other possible problems.
Actually, I'm not sure this is the right approach since in my testing I'm seeing other weirdness when I do this. But regardless, it's a pretty serious problem becuase if the _kill_connection method dies the _exit() call is never reached and the new child process continues on to execute other stuff from the parent (like END handlers, etc). So maybe _kill_connection() should be wrapped in an eval and any errors sent to warn() so that we can always make sure the _exit() is reached?