Ticket #1432 (closed defect: fixed)
task manager test segfaults with DBI >= 1.619
| Reported by: | dod | Owned by: | alias, adamk |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | Automated Build and Test | Version: | 0.96 |
| Keywords: | segfault dbi task | Cc: |
Description
Hello
With new DBI 1.619 (or 1.620), padre task_manager test segfaults. Here's the output of the test for padre 0.94:
$ perl -Ilib t/28_task_manager.t
1..16
ok 1 - use Test::NoWarnings;
ok 2 - The object isa Padre::Wx::App
ok 3 - The object isa t::lib::Padre::NullWindow
ok 4 - The object isa Padre::TaskManager
ok 5 - No threads
ok 6 - ->start ok
ok 7 - Three threads exists
ok 8 - The object isa Padre::Task::Addition
ok 9 - ->schedule ok
ok 10 - ->{prepare} is false
ok 11 - ->{run} is false
ok 12 - ->{finish} is false
Segmentation fault
stack trace:
$ gdb /usr/bin/perl core GNU gdb (GDB) 7.4.1-debian Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/bin/perl...(no debugging symbols found)...done. [New LWP 27589] [New LWP 27586] warning: Can't read pathname for load map: Input/output error. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `perl -Ilib t/38_task_manager.t'. Program terminated with signal 11, Segmentation fault. #0 0x00007f7623f865ab in ?? () from /usr/lib/perl5/auto/DBI/DBI.so (gdb) bt #0 0x00007f7623f865ab in ?? () from /usr/lib/perl5/auto/DBI/DBI.so #1 0x00007f762f91ef86 in Perl_mg_dup () from /usr/lib/libperl.so.5.14 #2 0x00007f762f91e4d4 in ?? () from /usr/lib/libperl.so.5.14 #3 0x00007f762f91e940 in Perl_sv_dup_inc () from /usr/lib/libperl.so.5.14 #4 0x00007f762f91eae7 in ?? () from /usr/lib/libperl.so.5.14 #5 0x00007f762f91f060 in Perl_mg_dup () from /usr/lib/libperl.so.5.14 #6 0x00007f762f91e4d4 in ?? () from /usr/lib/libperl.so.5.14 #7 0x00007f762f91e940 in Perl_sv_dup_inc () from /usr/lib/libperl.so.5.14 #8 0x00007f762f91f162 in Perl_gp_dup () from /usr/lib/libperl.so.5.14 #9 0x00007f762f91e68e in ?? () from /usr/lib/libperl.so.5.14 #10 0x00007f762f91e940 in Perl_sv_dup_inc () from /usr/lib/libperl.so.5.14 #11 0x00007f762f9066aa in Perl_he_dup () from /usr/lib/libperl.so.5.14 #12 0x00007f762f91e040 in ?? () from /usr/lib/libperl.so.5.14 #13 0x00007f762f91e940 in Perl_sv_dup_inc () from /usr/lib/libperl.so.5.14 #14 0x00007f762f91f162 in Perl_gp_dup () from /usr/lib/libperl.so.5.14 #15 0x00007f762f91e68e in ?? () from /usr/lib/libperl.so.5.14 #16 0x00007f762f91e940 in Perl_sv_dup_inc () from /usr/lib/libperl.so.5.14 #17 0x00007f762f9066aa in Perl_he_dup () from /usr/lib/libperl.so.5.14 #18 0x00007f762f91e040 in ?? () from /usr/lib/libperl.so.5.14 #19 0x00007f762f91e8e0 in Perl_sv_dup () from /usr/lib/libperl.so.5.14 #20 0x00007f762f91e661 in ?? () from /usr/lib/libperl.so.5.14 #21 0x00007f762f91e8e0 in Perl_sv_dup () from /usr/lib/libperl.so.5.14 #22 0x00007f762f9238bc in perl_clone () from /usr/lib/libperl.so.5.14 #23 0x00007f762e1d009f in XS_threads_create () from /usr/lib/perl/5.14/auto/threads/threads.so #24 0x00007f762f91472f in Perl_pp_entersub () from /usr/lib/libperl.so.5.14 #25 0x00007f762f90bbc6 in Perl_runops_standard () from /usr/lib/libperl.so.5.14 #26 0x00007f762f8a74ce in Perl_call_sv () from /usr/lib/libperl.so.5.14 #27 0x00007f762e1ce681 in ?? () from /usr/lib/perl/5.14/auto/threads/threads.so #28 0x00007f762f1c0b50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0 #29 0x00007f762ef0b90d in clone () from /lib/x86_64-linux-gnu/libc.so.6 #30 0x0000000000000000 in ?? () (gdb) quit
I have verified that the test works fine with DBI 1.618. Padre 0.94 and 0.96 give the same result, on i386 or amd64
Change History
comment:3 Changed 13 months ago by bowtie
Test against padre 0.96
with DBI => 1.620
Padre 0.96
Core...
osname linux
archname i686-linux-thread-multi
Distribution Ubuntu 11.10
Kernel 3.0.0-17-generic
Perl 5.14.2
Threads 3
RAM 212.0MB
Wx...
Wx 0.9906
WxWidgets 2.8.11
unicode 1
Alien::wxWidgets 0.59
Wx::Perl::ProcessStream 0.32
Wx::Scintilla 0.3801
Other...
PPI 1.215
Debug::Client 0.21_01
Config /home/kevin/.local/share/.padre
$ prove -lv t/38_task_manager.t t/38_task_manager.t .. 1..16 ok 1 - use Test::NoWarnings; ok 2 - The object isa Padre::Wx::App ok 3 - The object isa t::lib::Padre::NullWindow ok 4 - The object isa Padre::TaskManager ok 5 - No threads ok 6 - ->start ok ok 7 - Three threads exists ok 8 - The object isa Padre::Task::Addition ok 9 - ->schedule ok ok 10 - ->{prepare} is false ok 11 - ->{run} is false ok 12 - ->{finish} is false Failed 4/16 subtests Test Summary Report ------------------- t/38_task_manager.t (Wstat: 11 Tests: 12 Failed: 0) Non-zero wait status: 11 Parse errors: Bad plan. You planned 16 tests but ran 12. Files=1, Tests=12, 2 wallclock secs ( 0.04 usr 0.00 sys + 0.78 cusr 0.14 csys = 0.96 CPU) Result: FAIL
comment:4 Changed 13 months ago by bowtie
I added more text to tests see r19061
from 38_task_manager.t
# Schedule the startup timer Wx::Event::EVT_TIMER( $wxapp, TIMER_POSTINIT, \&startup ); my $timer1 = Wx::Timer->new( $wxapp, TIMER_POSTINIT ); # Schedule the failure timeout Wx::Event::EVT_TIMER( $wxapp, TIMER_LASTRESORT, \&timeout ); my $timer2 = Wx::Timer->new( $wxapp, TIMER_LASTRESORT );
if you comment out each of above in turn,
it turns out that the error is generated by \&startup
sub startup { # Run the startup process ok( $manager->start, '->start, startup process ok' ); Time::HiRes::sleep(1); is( scalar( threads->list ), 1, 'Three threads exists' ); # Create the sample task my $addition = Padre::Task::Addition->new( x => 2, y => 3, ); isa_ok( $addition, 'Padre::Task::Addition' ); # Schedule the task (which should trigger it's execution) ok( $manager->schedule($addition), '->schedule startup ok' ); is( $addition->{prepare}, 1, '->{prepare} startup is false' ); #should this be true as 1 is( $addition->{run}, 0, '->{run} startup is false' ); is( $addition->{finish}, 0, '->{finish} startup is false' ); }
the \&timeout works with out error
comment:5 Changed 13 months ago by bowtie
- Keywords task added
- Owner set to alias, adamk
- Status changed from new to assigned
Note: See
TracTickets for help on using
tickets.

Test against trunk
with DBI => 1.620
Padre 0.97 Core... osname linux archname i686-linux-thread-multi Distribution Ubuntu 11.10 Kernel 3.0.0-17-generic Perl 5.14.2 Threads 3 RAM (unsupported) Wx... Wx 0.9906 WxWidgets 2.8.11 unicode 1 Alien::wxWidgets 0.59 Wx::Perl::ProcessStream 0.32 Wx::Scintilla 0.3801 Other... PPI 1.215 Debug::Client 0.21_01 PPIx::EditorTools 0.15_02 Config /usr/src/Padre/Padre/.padre