Skip Menu |
 

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

Report information
The Basics
Id: 37027
Status: resolved
Priority: 0/
Queue: DBD-mysql

People
Owner: CAPTTOFU [...] cpan.org
Requestors: daniel.frett [...] ccci.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 4.007
Fixed in: (no value)



Subject: mysql_auto_reconnect causing seg faults
MIME-Version: 1.0
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Charset: utf8
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1214243476-20362-8"
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 485
Download (untitled) / with headers
text/plain 485b
whenever a dbh has mysql_auto_reconnect set on it, it will cause a seg fault when trying to reconnect a killed connection. this bug appears to have shown up with v4.007 and appears to be related to the TAKE_IMP_DATA_VERSION block of code. Disabling the block by removing the define TAKE_IMP_DATA_VERSION makes the seg fault go away attached is a script that is regularly reproducing the error on my perl installation. I have perl 5.8.5, DBI v1.605, and DBD::mysql v4.007 installed.
Subject: dbdMySQLCrash.pl
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1214243400-20362-7"
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Charset: utf8
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 0
Content-Type: text/plain; charset="utf-8"; name="dbdMySQLCrash.pl"
Content-Disposition: inline; filename="dbdMySQLCrash.pl"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: ascii
Content-Length: 648
Download dbdMySQLCrash.pl
text/x-perl 648b
use DBI; my $user = 'test'; my $pass = 'test'; my $dsn = 'DBI:mysql:database=test'; #need 2 database handles, first with auto-reconnect, second to kill the first connection and force auto-reconnect my $dbh = DBI->connect($dsn, $user, $pass, { 'mysql_auto_reconnect' => 1, }); my $dbh2 = DBI->connect($dsn, $user, $pass); #kill first db connection to trigger an auto reconnect $dbh2->do('kill ' . $dbh->{'mysql_thread_id'}); #insert a temporary delay, try uncommenting this if it's not seg-faulting at first, # one of my initial tests without this delay didn't seg fault #sleep 1; #ping first dbh handle to trigger auto-reconnect $dbh->ping;
MIME-Version: 1.0
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Content-Disposition: inline
Charset: utf8
Message-Id: <rt-3.6.HEAD-20380-1214319392-67.37027-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 230
Download (untitled) / with headers
text/plain 230b
On Mon Jun 23 13:54:40 2008, dfrett wrote: Show quoted text
> I have perl 5.8.5, DBI v1.605, and DBD::mysql v4.007 installed.
Confirmed also with perl 5.8.8, DBI 1.51. Also this is described here : http://bugs.mysql.com/bug.php?id=36810 Brian
MIME-Version: 1.0
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Content-Disposition: inline
Charset: utf8
Message-Id: <rt-3.6.HEAD-20356-1214325939-351.37027-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 66
Thank you very much for the bug report -- I'll fix this in 4.008.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Content-Disposition: inline
Charset: utf8
Message-Id: <rt-3.6.HEAD-20367-1218748648-1525.37027-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 631
Download (untitled) / with headers
text/plain 631b
Thank you! I'm in the process of fixing this and getting a release (4.008). On Mon Jun 23 13:54:40 2008, dfrett wrote: Show quoted text
> whenever a dbh has mysql_auto_reconnect set on it, it will cause a seg > fault when trying to reconnect a killed connection. > > this bug appears to have shown up with v4.007 and appears to be related > to the TAKE_IMP_DATA_VERSION block of code. Disabling the block by > removing the define TAKE_IMP_DATA_VERSION makes the seg fault go away > > > attached is a script that is regularly reproducing the error on my perl > installation. > > I have perl 5.8.5, DBI v1.605, and DBD::mysql v4.007 installed.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Content-Disposition: inline
Charset: utf8
Message-Id: <rt-3.6.HEAD-20359-1218748936-1626.37027-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 631
Download (untitled) / with headers
text/plain 631b
Thank you! I'm in the process of fixing this and getting a release (4.008). On Mon Jun 23 13:54:40 2008, dfrett wrote: Show quoted text
> whenever a dbh has mysql_auto_reconnect set on it, it will cause a seg > fault when trying to reconnect a killed connection. > > this bug appears to have shown up with v4.007 and appears to be related > to the TAKE_IMP_DATA_VERSION block of code. Disabling the block by > removing the define TAKE_IMP_DATA_VERSION makes the seg fault go away > > > attached is a script that is regularly reproducing the error on my perl > installation. > > I have perl 5.8.5, DBI v1.605, and DBD::mysql v4.007 installed.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Content-Disposition: inline
Charset: utf8
Message-Id: <rt-3.6.HEAD-20359-1218770314-332.37027-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 847
Download (untitled) / with headers
text/plain 847b
I've tried on both 32-bit Suse Linux 10.2, MySQL 5.1, and AMD64 Ubuntu, MySQL 5.0.45, both with DBI 1.607, no segfault. I did try it with 1.605 on the AMD64 box at first and it didn't segfault, but I had errors on the test. I probably need to only enable it if it's DBI 1.607 and greater. On Mon Jun 23 13:54:40 2008, dfrett wrote: Show quoted text
> whenever a dbh has mysql_auto_reconnect set on it, it will cause a seg > fault when trying to reconnect a killed connection. > > this bug appears to have shown up with v4.007 and appears to be related > to the TAKE_IMP_DATA_VERSION block of code. Disabling the block by > removing the define TAKE_IMP_DATA_VERSION makes the seg fault go away > > > attached is a script that is regularly reproducing the error on my perl > installation. > > I have perl 5.8.5, DBI v1.605, and DBD::mysql v4.007 installed.
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-20359-1218770314-332.37027-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Content-Disposition: inline
Charset: utf8
References: <rt-3.6.HEAD-20359-1218770314-332.37027-0-0 [...] rt.cpan.org>
Message-Id: <rt-3.6.HEAD-20354-1218772554-1507.37027-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
From: daniel.frett [...] ccci.org
X-RT-Original-Encoding: utf-8
Content-Length: 1041
I'll double check tomorrow using the latest version of DBI to see if I still am experiencing the bug. On Thu Aug 14 23:18:34 2008, CAPTTOFU wrote: Show quoted text
> I've tried on both 32-bit Suse Linux 10.2, MySQL 5.1, and AMD64 Ubuntu, > MySQL 5.0.45, both with DBI 1.607, no segfault. > > I did try it with 1.605 on the AMD64 box at first and it didn't > segfault, but I had errors on the test. > > I probably need to only enable it if it's DBI 1.607 and greater. > > On Mon Jun 23 13:54:40 2008, dfrett wrote:
> > whenever a dbh has mysql_auto_reconnect set on it, it will cause a seg > > fault when trying to reconnect a killed connection. > > > > this bug appears to have shown up with v4.007 and appears to be related > > to the TAKE_IMP_DATA_VERSION block of code. Disabling the block by > > removing the define TAKE_IMP_DATA_VERSION makes the seg fault go away > > > > > > attached is a script that is regularly reproducing the error on my perl > > installation. > > > > I have perl 5.8.5, DBI v1.605, and DBD::mysql v4.007 installed.
>
MIME-Version: 1.0
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Content-Disposition: inline
Charset: utf8
Message-Id: <rt-3.6.HEAD-20338-1218800608-1313.37027-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 179
Download (untitled) / with headers
text/plain 179b
I'm disabling TAKE_IMP_DATA_VERSION for now. I was actually able to reproduce this on an OS X box: radha:trunk patg$ ~/segfault.pl Bus error Ug. This was with DBI version 1.52
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-20338-1218800608-1313.37027-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Content-Disposition: inline
Charset: utf8
References: <rt-3.6.HEAD-20338-1218800608-1313.37027-0-0 [...] rt.cpan.org>
Message-Id: <rt-3.6.HEAD-20354-1218824406-1413.37027-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
From: daniel.frett [...] ccci.org
X-RT-Original-Encoding: utf-8
Content-Length: 572
Download (untitled) / with headers
text/plain 572b
On Fri Aug 15 07:43:28 2008, CAPTTOFU wrote: Show quoted text
> I'm disabling TAKE_IMP_DATA_VERSION for now. I was actually able to > reproduce this on an OS X box: > > radha:trunk patg$ ~/segfault.pl > Bus error > > Ug. > > This was with DBI version 1.52
I downloaded the test you added to the svn repository and it wasn't giving me the segfault with 4.007 until I removed AutoCommit => 0 from the dbh connect options, just a heads up so the test actually does work in the future when you come back to re-address the TAKE_IMP_DATA code. Thanks for all your hard work on this driver.
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-20338-1218800608-1313.37027-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Charset: utf8
References: <rt-3.6.HEAD-20338-1218800608-1313.37027-0-0 [...] rt.cpan.org>
Message-Id: <rt-3.6.HEAD-20359-1218848988-1278.37027-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1218848988-20359-38"
From: daniel.frett [...] ccci.org
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 419
Download (untitled) / with headers
text/plain 419b
Here's a patch that fixes the segfault.t test, the auto_reconnect bug, and re-enables the 2 impdata tests because TAKE_IMP_DATA_VERSION was still active code. -Daniel Frett On Fri Aug 15 07:43:28 2008, CAPTTOFU wrote: Show quoted text
> I'm disabling TAKE_IMP_DATA_VERSION for now. I was actually able to > reproduce this on an OS X box: > > radha:trunk patg$ ~/segfault.pl > Bus error > > Ug. > > This was with DBI version 1.52
MIME-Version: 1.0
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Content-Type: multipart/mixed; boundary="----------=_1218848988-20359-37"
Charset: utf8
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 0
Content-Type: application/octet-stream; name="auto_reconnect.patch"
Content-Disposition: inline; filename="auto_reconnect.patch"
Content-Transfer-Encoding: base64
Content-Length: 2158
diff -urx .svn dbd-mysql.orig/dbdimp.c dbd-mysql/dbdimp.c --- dbd-mysql.orig/dbdimp.c 2008-08-01 18:35:40.000000000 -0400 +++ dbd-mysql/dbdimp.c 2008-08-01 18:09:57.000000000 -0400 @@ -4409,7 +4409,11 @@ memcpy (&save_socket, imp_dbh->pmysql,sizeof(save_socket)); memset (imp_dbh->pmysql,0,sizeof(*(imp_dbh->pmysql))); - if (!my_login(h, imp_dbh)) + /* we should disconnect the db handle before reconnecting, this will + * prevent my_login from thinking it's adopting an active child which + * would prevent the handle from actually reconnecting + */ + if (!dbd_db_disconnect(h, imp_dbh) || !my_login(h, imp_dbh)) { do_error(h, mysql_errno(imp_dbh->pmysql), mysql_error(imp_dbh->pmysql), mysql_sqlstate(imp_dbh->pmysql)); diff -urx .svn dbd-mysql.orig/t/65segfault.t dbd-mysql/t/65segfault.t --- dbd-mysql.orig/t/65segfault.t 2008-08-01 18:35:40.000000000 -0400 +++ dbd-mysql/t/65segfault.t 2008-08-01 18:15:47.000000000 -0400 @@ -17,7 +17,7 @@ mysql_auto_reconnect => 1, RaiseError => 1, PrintError => 1, - AutoCommit => 0 }); + AutoCommit => 1 }); }; if ($@) { diff -urx .svn dbd-mysql.orig/t/70takeimp.t dbd-mysql/t/70takeimp.t --- dbd-mysql.orig/t/70takeimp.t 2008-08-01 18:35:40.000000000 -0400 +++ dbd-mysql/t/70takeimp.t 2008-08-01 18:18:46.000000000 -0400 @@ -34,7 +34,6 @@ unless ($dbh->can('take_imp_data')) { plan skip_all => "version of DBI $DBI::VERSION doesn't support this test. Can't continue test"; } -plan skip_all => "This test is disabled"; plan tests => 21; pass("obtained driver handle"); diff -urx .svn dbd-mysql.orig/t/71impdata.t dbd-mysql/t/71impdata.t --- dbd-mysql.orig/t/71impdata.t 2008-08-01 18:35:40.000000000 -0400 +++ dbd-mysql/t/71impdata.t 2008-08-01 18:19:15.000000000 -0400 @@ -24,7 +24,6 @@ unless ($dbh->can('take_imp_data')) { plan skip_all => "version of DBI $DBI::VERSION doesn't support this test. Can't continue test"; } -plan skip_all => "This test is disabled"; plan tests => 10; pass("Connected to database");
MIME-Version: 1.0
X-Spam-Status: No, hits=-1.5 required=8.0 tests=BAYES_00,DNS_FROM_OPENWHOIS,FB_WORD1_END_DOLLAR
In-Reply-To: <rt-3.6.HEAD-20354-1218824406-1413.37027-5-0 [...] rt.cpan.org>
References: <RT-Ticket-37027 [...] rt.cpan.org> <rt-3.6.HEAD-20338-1218800608-1313.37027-5-0 [...] rt.cpan.org> <rt-3.6.HEAD-20354-1218824406-1413.37027-5-0 [...] rt.cpan.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-RT-Original-Encoding: utf-8
Received: from x1.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 79D504D835D for <bug-DBD-mysql [...] rt.cpan.org>; Wed, 20 Aug 2008 11:59:29 -0400 (EDT)
Received: (qmail 31654 invoked from network); 20 Aug 2008 15:59:28 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 20 Aug 2008 15:59:28 -0000
Received: from patg.net (HELO my.patg.net) (208.50.112.90) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with ESMTP; Wed, 20 Aug 2008 08:59:22 -0700
Received: from radha.local (DD-WRT [192.168.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by my.patg.net (Postfix) with ESMTP id 0D8911CD46A8 for <bug-DBD-mysql [...] rt.cpan.org>; Wed, 20 Aug 2008 12:02:04 -0400 (EDT)
Delivered-To: cpan-bug+DBD-mysql [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #37027] mysql_auto_reconnect causing seg faults
User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707)
Return-Path: <patg [...] patg.net>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-DBD-mysql [...] rt.cpan.org
Date: Wed, 20 Aug 2008 11:59:18 -0400
X-Spam-Level: *
Message-Id: <48AC3F56.6010307 [...] patg.net>
To: bug-DBD-mysql [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Patrick Galbraith <patg [...] patg.net>
RT-Message-ID: <rt-3.6.HEAD-28907-1219248017-1441.37027-0-0 [...] rt.cpan.org>
Content-Length: 924
Download (untitled) / with headers
text/plain 924b
Daniel Frett via RT wrote: Show quoted text
> Queue: DBD-mysql > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=37027 > > > On Fri Aug 15 07:43:28 2008, CAPTTOFU wrote: >
>> I'm disabling TAKE_IMP_DATA_VERSION for now. I was actually able to >> reproduce this on an OS X box: >> >> radha:trunk patg$ ~/segfault.pl >> Bus error >> >> Ug. >> >> This was with DBI version 1.52 >>
> > I downloaded the test you added to the svn repository and it wasn't > giving me the segfault with 4.007 until I removed AutoCommit => 0 from > the dbh connect options, just a heads up so the test actually does work > in the future when you come back to re-address the TAKE_IMP_DATA code. > > Thanks for all your hard work on this driver. >
Hey! Thank you for the patch! Crazy week for me, but I intend to do another release this week. thanks muchly! --Patrick -- Satyam Eva Jayate - Truth Alone Triumphs Mundaka Upanishad
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-28907-1219248017-1441.37027-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Content-Disposition: inline
Charset: utf8
References: <RT-Ticket-37027 [...] rt.cpan.org> <rt-3.6.HEAD-20338-1218800608-1313.37027-5-0 [...] rt.cpan.org> <rt-3.6.HEAD-20354-1218824406-1413.37027-5-0 [...] rt.cpan.org> <48AC3F56.6010307 [...] patg.net> <rt-3.6.HEAD-28907-1219248017-1441.37027-0-0 [...] rt.cpan.org>
Message-Id: <rt-3.6.HEAD-27668-1223422394-1070.37027-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 184
Download (untitled) / with headers
text/plain 184b
On Wed Aug 20 12:00:17 2008, patg@patg.net wrote: Show quoted text
> Thank you for the patch! Crazy week for me, but I intend to do another > release this week.
By the way, this isn't fixed in 4.008.
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-27668-1223422394-1070.37027-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Content-Disposition: inline
Charset: utf8
References: <RT-Ticket-37027 [...] rt.cpan.org> <rt-3.6.HEAD-20338-1218800608-1313.37027-5-0 [...] rt.cpan.org> <rt-3.6.HEAD-20354-1218824406-1413.37027-5-0 [...] rt.cpan.org> <48AC3F56.6010307 [...] patg.net> <rt-3.6.HEAD-28907-1219248017-1441.37027-0-0 [...] rt.cpan.org> <rt-3.6.HEAD-27668-1223422394-1070.37027-0-0 [...] rt.cpan.org>
Message-Id: <rt-3.6.HEAD-27668-1223649115-703.37027-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 333
Download (untitled) / with headers
text/plain 333b
I will test this over the weekend to see if I can reproduce it. Thank you for the bug report! On Tue Oct 07 19:33:14 2008, BRONG wrote: Show quoted text
> On Wed Aug 20 12:00:17 2008, patg@patg.net wrote:
> > Thank you for the patch! Crazy week for me, but I intend to do another > > release this week.
> > By the way, this isn't fixed in 4.008.
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-28907-1219248017-1441.37027-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Content-Disposition: inline
Charset: utf8
References: <RT-Ticket-37027 [...] rt.cpan.org> <rt-3.6.HEAD-20338-1218800608-1313.37027-5-0 [...] rt.cpan.org> <rt-3.6.HEAD-20354-1218824406-1413.37027-5-0 [...] rt.cpan.org> <48AC3F56.6010307 [...] patg.net> <rt-3.6.HEAD-28907-1219248017-1441.37027-0-0 [...] rt.cpan.org>
Message-Id: <rt-3.6.HEAD-27688-1224623024-1729.37027-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1203
Download (untitled) / with headers
text/plain 1.1k
On Wed Aug 20 12:00:17 2008, patg@patg.net wrote: Show quoted text
> Daniel Frett via RT wrote:
> > Queue: DBD-mysql > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=37027 > > > > > On Fri Aug 15 07:43:28 2008, CAPTTOFU wrote: > >
> >> I'm disabling TAKE_IMP_DATA_VERSION for now. I was actually able to > >> reproduce this on an OS X box: > >> > >> radha:trunk patg$ ~/segfault.pl > >> Bus error > >> > >> Ug. > >> > >> This was with DBI version 1.52 > >>
> > > > I downloaded the test you added to the svn repository and it wasn't > > giving me the segfault with 4.007 until I removed AutoCommit => 0 from > > the dbh connect options, just a heads up so the test actually does work > > in the future when you come back to re-address the TAKE_IMP_DATA code. > > > > Thanks for all your hard work on this driver. > >
> Hey! > > Thank you for the patch! Crazy week for me, but I intend to do another > release this week. > > thanks muchly! > > --Patrick >
Ok, I became buried with work and writing my book. Ug. However, I've tested your patch. I still need to check for DBI version 1.607. Tests 70 and 71 still fail if DBI < 1.607 I'm trying to get out a release this week, really ;)
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-27688-1224623024-1729.37027-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
References: <RT-Ticket-37027 [...] rt.cpan.org> <rt-3.6.HEAD-20338-1218800608-1313.37027-5-0 [...] rt.cpan.org> <rt-3.6.HEAD-20354-1218824406-1413.37027-5-0 [...] rt.cpan.org> <48AC3F56.6010307 [...] patg.net> <rt-3.6.HEAD-28907-1219248017-1441.37027-0-0 [...] rt.cpan.org> <rt-3.6.HEAD-27688-1224623024-1729.37027-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-14916-1248678141-980.37027-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 874
Download (untitled) / with headers
text/plain 874b
same issue: $DBI::VERSION = "1.609" DBD::mysql: $VERSION = '4.008'; This script (auto reconnect commented): --snip use DBI; my $dbh = DBI->connect("dbi:mysql:dbname=TABLE", "USER", "PWD"); #$dbh->{mysql_auto_reconnect} = 1; my $sth = $dbh->prepare("select * from assessor_bof limit 1"); while(1) { print "doing\n"; $sth->execute(); sleep 15; } --snap execution (restart of mysql): --snip $ perl 1.pl doing doing DBD::mysql::st execute failed: MySQL server has gone away at 1.pl line 7. --snap execution with string uncommented: --snip $ perl 1.pl doing doing Segmentation fault --snap As I can see this issue isn't fixed yet. mysql/system versions: $ mysql -V mysql Ver 14.12 Distrib 5.0.75, for debian-linux-gnu (i486) using readline 5.2 $ uname -a Linux cyga 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686 GNU/Linux
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-14916-1248678141-980.37027-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <RT-Ticket-37027 [...] rt.cpan.org> <rt-3.6.HEAD-20338-1218800608-1313.37027-5-0 [...] rt.cpan.org> <rt-3.6.HEAD-20354-1218824406-1413.37027-5-0 [...] rt.cpan.org> <48AC3F56.6010307 [...] patg.net> <rt-3.6.HEAD-28907-1219248017-1441.37027-0-0 [...] rt.cpan.org> <rt-3.6.HEAD-27688-1224623024-1729.37027-0-0 [...] rt.cpan.org> <rt-3.6.HEAD-14916-1248678141-980.37027-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-12689-1267770172-1993.37027-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1048
Works for me in: DBD::mysql version 4.013 On Mon Jul 27 03:02:21 2009, CYGA wrote: Show quoted text
> same issue: > $DBI::VERSION = "1.609" > DBD::mysql: > $VERSION = '4.008'; > > This script (auto reconnect commented): > --snip > use DBI; > my $dbh = DBI->connect("dbi:mysql:dbname=TABLE", "USER", "PWD"); > #$dbh->{mysql_auto_reconnect} = 1; > my $sth = $dbh->prepare("select * from assessor_bof limit 1"); > while(1) { > print "doing\n"; > $sth->execute(); > sleep 15; > } > --snap > > execution (restart of mysql): > --snip > $ perl 1.pl > doing > doing > DBD::mysql::st execute failed: MySQL server has gone away at 1.pl line > 7. > --snap > > execution with string uncommented: > --snip > $ perl 1.pl > doing > doing > Segmentation fault > --snap > > As I can see this issue isn't fixed yet. > > mysql/system versions: > $ mysql -V > mysql Ver 14.12 Distrib 5.0.75, for debian-linux-gnu (i486) using > readline 5.2 > $ uname -a > Linux cyga 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC > 2009 i686 GNU/Linux
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-12689-1267770172-1993.37027-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <RT-Ticket-37027 [...] rt.cpan.org> <rt-3.6.HEAD-20338-1218800608-1313.37027-5-0 [...] rt.cpan.org> <rt-3.6.HEAD-20354-1218824406-1413.37027-5-0 [...] rt.cpan.org> <48AC3F56.6010307 [...] patg.net> <rt-3.6.HEAD-28907-1219248017-1441.37027-0-0 [...] rt.cpan.org> <rt-3.6.HEAD-27688-1224623024-1729.37027-0-0 [...] rt.cpan.org> <rt-3.6.HEAD-14916-1248678141-980.37027-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-12689-1267770172-1993.37027-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-12685-1267900432-814.37027-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1375
Download (untitled) / with headers
text/plain 1.3k
Thank you. I will verify with the latest DBD::mysql that this works. Looking over previous comments, "mysql server gone away" sounds to me like a server error as opposed to client. On Fri Mar 05 01:22:52 2010, CYGA wrote: Show quoted text
> Works for me in: > DBD::mysql version 4.013 > > On Mon Jul 27 03:02:21 2009, CYGA wrote:
> > same issue: > > $DBI::VERSION = "1.609" > > DBD::mysql: > > $VERSION = '4.008'; > > > > This script (auto reconnect commented): > > --snip > > use DBI; > > my $dbh = DBI->connect("dbi:mysql:dbname=TABLE", "USER", "PWD"); > > #$dbh->{mysql_auto_reconnect} = 1; > > my $sth = $dbh->prepare("select * from assessor_bof limit 1"); > > while(1) { > > print "doing\n"; > > $sth->execute(); > > sleep 15; > > } > > --snap > > > > execution (restart of mysql): > > --snip > > $ perl 1.pl > > doing > > doing > > DBD::mysql::st execute failed: MySQL server has gone away at 1.pl line > > 7. > > --snap > > > > execution with string uncommented: > > --snip > > $ perl 1.pl > > doing > > doing > > Segmentation fault > > --snap > > > > As I can see this issue isn't fixed yet. > > > > mysql/system versions: > > $ mysql -V > > mysql Ver 14.12 Distrib 5.0.75, for debian-linux-gnu (i486) using > > readline 5.2 > > $ uname -a > > Linux cyga 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC > > 2009 i686 GNU/Linux
> >
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2360-1288105008-612.37027-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 41
Verified this is fixed, as of 4.017/4.018


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.