Subject: | Segfault on 5.8.1/5.8.3 when used via namespace::clean |
This may be a bogus report unrelated to V::M, I am filing here
nevertheless as V::M is the only XS component in the failing library stack.
A diclaimer upfront - I am not expecting this bug to be solved, as it
manifests only on 5.8.1/5.8.3, which are understandably falling out of
favor. I am just collecting my current data here in case you are
interested and want to give it a poke. No hard feelings if this ticket
gets 0 attention :)
The problem manifests itself when an exporter inject a cleaning trigger
into the importing package. The simplest manifestation is:
rabbit@Thesaurus:~/devel/dbic/dbgit$ perlbrew switch 5.8.3_dbg_thr
Switched to 5.8.3_dbg_thr
rabbit@Thesaurus:~/devel/dbic/dbgit$ git diff
diff --git a/lib/DBIx/Class/Carp.pm b/lib/DBIx/Class/Carp.pm
index 5f40094..3c29332 100644
--- a/lib/DBIx/Class/Carp.pm
+++ b/lib/DBIx/Class/Carp.pm
@@ -106,7 +106,7 @@ sub import {
## FIXME FIXME FIXME - something is tripping up V::M on 5.8.1/3,
leading
# to segfaults. When n::c/B::H::EndOfScope is rewritten in terms of
tie()
# see if this starts working
- unless DBIx::Class::_ENV_::BROKEN_NAMESPACE_CLEAN();
+# unless DBIx::Class::_ENV_::BROKEN_NAMESPACE_CLEAN();
}
sub unimport {
rabbit@Thesaurus:~/devel/dbic/dbgit$ prove -l t/30dbicplain.t
t/30dbicplain....dubious
Test returned status 0 (wstat 11, 0xb)
FAILED--1 test script could be run, alas--no output ever seen
rafl helped me obtain this trace:
rabbit@Thesaurus:~/devel/dbic/dbgit$ perl -MDevel::bt -Ilib t/30dbicplain.t
#0 0xb78ac424 in __kernel_vsyscall ()
#1 0xb7814f23 in __waitpid_nocancel () from /lib/i686/cmov/libpthread.so.0
#2 0xb74e82a5 in backtrace () at bt.xs:183
#3 0xb74e82ce in signal_handler (sig=11) at bt.xs:190
#4 <signal handler called>
#5 0x080e0770 in S_hfreeentries (my_perl=0x8960008, hv=0x8cb4530) at
hv.c:1553
#6 0x080e05a1 in Perl_hv_clear (my_perl=0x8960008, hv=0x8cb4530) at
hv.c:1472
#7 0x0817383a in S_isa_lookup (my_perl=0x8960008, stash=0x8cef278,
name=0x8cbc078 "DBIx::Class::UTF8Columns", name_stash=0x0, len=24,
level=2) at universal.c:72
#8 0x08173b0b in S_isa_lookup (my_perl=0x8960008, stash=0x897b5c4,
name=0x8cbc078 "DBIx::Class::UTF8Columns", name_stash=0x0, len=24,
level=1) at universal.c:109
#9 0x08173b0b in S_isa_lookup (my_perl=0x8960008, stash=0x8da6dec,
name=0x8cbc078 "DBIx::Class::UTF8Columns", name_stash=0x0, len=24,
level=0) at universal.c:109
#10 0x08173cc1 in Perl_sv_derived_from (my_perl=0x8960008, sv=0x8cef3c8,
name=0x8cbc078 "DBIx::Class::UTF8Columns") at universal.c:159
#11 0x08174216 in XS_UNIVERSAL_isa (my_perl=0x8960008, cv=0x8973220) at
universal.c:237
#12 0x080f0f46 in Perl_pp_entersub (my_perl=0x8960008) at pp_hot.c:2840
#13 0x080cbacb in Perl_runops_debug (my_perl=0x8960008) at dump.c:1438
#14 0x08069cdd in S_call_body (my_perl=0x8960008, myop=0xbfac6598,
is_eval=0) at perl.c:2221
#15 0x0806984a in Perl_call_sv (my_perl=0x8960008, sv=0x8da8938,
flags=6) at perl.c:2139
#16 0x0806eb7f in S_call_list_body (my_perl=0x8960008, cv=0x8da8938) at
perl.c:4390
#17 0x0806e6a9 in Perl_call_list (my_perl=0x8960008, oldscope=17,
paramList=0x8da8908) at perl.c:4319
#18 0x080a6aca in Perl_newATTRSUB (my_perl=0x8960008, floor=402,
o=0x8d77b20, proto=0x0, attrs=0x0, block=0x8d77af8) at op.c:4373
#19 0x080a21e3 in Perl_utilize (my_perl=0x8960008, aver=1, floor=402,
version=0x0, idop=0x8cb7be0, arg=0x8e4f388) at op.c:2976
#20 0x08097af8 in Perl_yyparse (my_perl=0x8960008) at perly.y:414
#21 0x08136035 in S_doeval (my_perl=0x8960008, gimme=0, startop=0x0,
outside=0x0, seq=3747) at pp_ctl.c:2798
#22 0x0813864c in Perl_pp_require (my_perl=0x8960008) at pp_ctl.c:3295
#23 0x080cbacb in Perl_runops_debug (my_perl=0x8960008) at dump.c:1438
#24 0x08068d59 in S_run_body (my_perl=0x8960008, oldscope=1) at perl.c:1857
#25 0x080687b9 in perl_run (my_perl=0x8960008) at perl.c:1776
#26 0x08063486 in main (argc=4, argv=0xbfac6d34, env=0xbfac6d48) at
perlmain.c:86
Aborted
When less code is involved, the segfault is reduced to a warning, which
can easily be reproduced as:
perl -MCarp::Always -Ilib -MDBIx::Class::ResultSet -e '1'
Attempt to free unreferenced scalar: SV 0x8e7bd80 at
lib/DBIx/Class/ResultSet.pm line 8
DBIx::Class::ResultSet::BEGIN() called at
lib/DBIx/Class/ResultSetColumn.pm line 8
eval {...} called at lib/DBIx/Class/ResultSetColumn.pm line 8
require DBIx/Class/ResultSet.pm called at -e line 0
main::BEGIN() called at lib/DBIx/Class/ResultSetColumn.pm line 8
eval {...} called at lib/DBIx/Class/ResultSetColumn.pm line 8
Cheers