New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panic error ("attempt to copy freed scalar") in perl5db.pl:3733 #12175
Comments
From ericp@ActiveState.comCreated by ericp@activestate.comDebug this program in the command-line (using 5.10.0) ######################################## use DBI; my $DBUSER = 'root'; my $dbh = DBI->connect('DBI:mysql:' . $DBNAME, $DBUSER, $DBPASS); if($DBI::errstr){ $dbh->do('create table info(id int auto_increment PRIMARY KEY, data varchar(255))'); $dbh->begin_work(); $dbh->do('INSERT INTO info(data) VALUES(123)'); my $status = $dbh->commit(); exit 0; c:> perl -d bug-mysql-freed-scalar.pl Loading DB routines from perl5db.pl version 1.3 Enter h or `h h' for help, or `perldoc perldebug' for more help. main::(bug-mysql-freed-scalar.pl:6): DB<2> c DB<2> n This happens with the call to $ret = &$sub; in DB::sub Perl Info
|
From bannan@gmail.comI can confirm that the same happens on Centos 6.2 with perl 5.14 |
From [Unknown Contact. See original ticket]I can confirm that the same happens on Centos 6.2 with perl 5.14 |
From @cpansproutOn Thu Jun 14 12:44:21 2012, ericp wrote:
I don’t have mysql installed, so it’s not easy for me to test this. I -- Father Chrysostomos |
The RT System itself - Status changed from 'new' to 'open' |
From ericp@ActiveState.comOn Linux I get an internal error when I try to bind DBI:mysql in the """ On Windows ppm for ActivePerl 5.16.0 refuses to install DBD::mysql and I don't see an easy way to build it on a Windows box. I don't I haven't heard from the Komodo user who first reported this problem, |
From cpan@goess.orgI'm also seeing this error on perl 5.14 (standard centos 6.3 build) with DBD::mysql versions 4.021 and 4.029. Haven't tried it yet with perl 5.16, I'll see if I can do that. It only happens when you try to *examine* the return value from commit. Any kind of comparison or assignment anywhere in the call stack will trigger the error. If you ignore the return value from commit, then it all works fine. $ cat test-err.pl use warnings; use DBI; my ($connectstr, $username, $password) = @ARGV; my $dbh = DBI->connect($connectstr, $username, $password, {}); $dbh->begin_work; my $sth = $dbh->prepare('insert into kgtest set body=?') || die $dbh->errstr; print "about to commit...\n"; $ ./test-err.sh Loading DB routines from perl5db.pl version 1.33 Enter h or `h h' for help, or `man perldebug' for more help. main::(test-err.pl:7): my ($connectstr, $username, $password) = @ARGV; |
From [Unknown Contact. See original ticket]I'm also seeing this error on perl 5.14 (standard centos 6.3 build) with DBD::mysql versions 4.021 and 4.029. Haven't tried it yet with perl 5.16, I'll see if I can do that. It only happens when you try to *examine* the return value from commit. Any kind of comparison or assignment anywhere in the call stack will trigger the error. If you ignore the return value from commit, then it all works fine. $ cat test-err.pl use warnings; use DBI; my ($connectstr, $username, $password) = @ARGV; my $dbh = DBI->connect($connectstr, $username, $password, {}); $dbh->begin_work; my $sth = $dbh->prepare('insert into kgtest set body=?') || die $dbh->errstr; print "about to commit...\n"; $ ./test-err.sh Loading DB routines from perl5db.pl version 1.33 Enter h or `h h' for help, or `man perldebug' for more help. main::(test-err.pl:7): my ($connectstr, $username, $password) = @ARGV; |
From cpan@goess.org
Verified with 5.16.3, 5.18.0, 5.20.1: DB<1> c DB<1> c DB<1> c FWIW there's an open ticket that mentions this problem (but was opened with a different problem in the subject line) filed under DBD::mysql https://rt.cpan.org/Public/Bug/Display.html?id=47874 . Should this be a perl bug or a DBD::mysql bug? |
From [Unknown Contact. See original ticket]
Verified with 5.16.3, 5.18.0, 5.20.1: DB<1> c DB<1> c DB<1> c FWIW there's an open ticket that mentions this problem (but was opened with a different problem in the subject line) filed under DBD::mysql https://rt.cpan.org/Public/Bug/Display.html?id=47874 . Should this be a perl bug or a DBD::mysql bug? |
From @jkeenanOn Fri Jan 16 10:13:12 2015, cpan@goess.org wrote:
[snip]
The problem is probably some interaction between the Perl debugger and the XS guts of DBI or DBD::mysql -- which makes it difficult to diagnose and which may explain why this ticket and the rt.cpan.org ticket you cited have remained open for so long. In practical terms, to diagnose someone needs to have both perl and mysql set up and be familiar with both. You could try posting on a more DBI-specific list such as dbi-users. Subscription info available at: http://lists.perl.org/list/dbi-users.html Hope that helps. -- |
From @cpansproutOn Fri Jan 16 10:13:12 2015, cpan@goess.org wrote:
Until someone has the tuits (round ones, mind you) to investigate which project is to blame, it should probably be both. -- Father Chrysostomos |
From @timbunceFYI I'm looking into this via https://rt.cpan.org/Ticket/Display.html?id=102791 |
From @timbunceI think this is now fixed. I call_method(..., G_DISCARD) to G_VOID instead. |
@iabyn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#113644 (status was 'resolved')
Searchable as RT113644$
The text was updated successfully, but these errors were encountered: