On Wed Jun 22 13:44:34 2016, ganglion wrote:
Show quoted text> On Mon Apr 18 16:35:43 2016, ANDK wrote:
>
> The referenced bug has been resolved in 5.24.0, but
> Audio::Nama continues to segfault under 5.24.0.
With Niko Tyni we triaged this further in
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839218 .
On Fri, 30 Sep 2016 10:09:01 +0100 Chris Lamb <lamby@debian.org> wrote:
Show quoted text> Source: nama
> Version: 1.208-1
> Severity: serious
> Justification: fails to build from source
> User: reproducible-builds@lists.alioth.debian.org
> Usertags: ftbfs
> X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org
>
> Dear Maintainer,
>
> nama fails to build from source in unstable/amd64:
>
> [..]
>
> ok 57 - set JACK client as input
> sax: JACK source port is sax_in. Make connections manually.
>
> Track sax: source set to JACK manual port sax_in
> Failed 69/126 subtests
> t/13_io.t .......
> 1..1
> ok 1 - use Audio::Nama::IO;
> ok
>
> Test Summary Report
> -------------------
> t/12_nama.t (Wstat: 139 Tests: 57 Failed: 0)
> Non-zero wait status: 139
> Parse errors: Bad plan. You planned 126 tests but ran 57.
> Files=7, Tests=91, 5 wallclock secs ( 0.03 usr 0.01 sys + 2.29 cusr 0.43 csys = 2.76 CPU)
> Result: FAIL
> Failed 1/7 test programs. 0/91 subtests failed.
> Makefile:930: recipe for target 'test_dynamic' failed
> make[1]: *** [test_dynamic] Error 255
> make[1]: Leaving directory '/home/lamby/temp/cdt.20160930095107.55GhkE5sL3.db.nama/nama-1.208'
> dh_auto_test: make -j1 test TEST_VERBOSE=1 returned exit code 2
> debian/rules:4: recipe for target 'build' failed
> make: *** [build] Error 2
>
> [..]
This looks like a problem in perl itself possibly causing random crashes
elsewhere, too.
Reproduction with the perl-debug package shows the internal assertion:
sudo apt-get install perl-debug
sudo apt-get build-dep nama
apt source nama
cd nama-*
dpkg-buildpackage
...
ok 57 - set JACK client as input
sax: JACK source port is sax_in. Make connections manually.
Track sax: source set to JACK manual port sax_in
Failed 69/126 subtests
t/13_io.t .......
1..1
ok 1 - use Audio::Nama::IO;
ok
..
PERL_DL_NONLAZY=1 PERL_USE_UNSAFE_INC=1 "/usr/bin/debugperl" \
"-MExtUtils::Command::MM" "-MTest::Harness" "-e" " test_harness(1, \
'inc', 'blib/lib', 'blib/arch')" t/12_nama.t
...
ok 57 - set JACK client as input
sax: JACK source port is sax_in. Make connections manually.
Track sax: source set to JACK manual port sax_in
debugperl: sv.c:6438: Perl_sv_clear: Assertion `SvTYPE(sv) !=
(svtype)SVTYPEMASK' failed.
Failed 69/126 subtests
...
Address Sanitizer shows the crash with non-debug perl:
LD_PRELOAD=libasan.so.3 PERL_DL_NONLAZY=1 PERL_USE_UNSAFE_INC=1 \
"/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "
test_harness(1, 'inc', 'blib/lib', 'blib/arch')" t/12_nama.t
...
sax: JACK source port is sax_in. Make connections manually.
Track sax: source set to JACK manual port sax_in
ASAN:DEADLYSIGNAL
=================================================================
==13877==ERROR: AddressSanitizer: SEGV on unknown address 0x00ff00000012
(pc 0x559191b15fd8 bp 0x62100013f578 sp 0x7fffaa838b00 T0)
#0 0x559191b15fd7 (/usr/bin/perl+0xd9fd7)
#1 0x559191b1616d in Perl_sv_unmagic (/usr/bin/perl+0xda16d)
#2 0x559191b1513a in Perl_sv_clear (/usr/bin/perl+0xd913a)
#3 0x559191b15a8f in Perl_sv_free2 (/usr/bin/perl+0xd9a8f)
#4 0x559191b4624e in Perl_leave_scope (/usr/bin/perl+0x10a24e)
#5 0x559191b49707 (/usr/bin/perl+0x10d707)
#6 0x559191b4ebab in Perl_die_unwind (/usr/bin/perl+0x112bab)
#7 0x559191aea518 in Perl_vcroak (/usr/bin/perl+0xae518)
#8 0x559191aeafb3 in Perl_croak (/usr/bin/perl+0xaefb3)
#9 0x559191b1d592 in Perl_sv_setsv_flags (/usr/bin/perl+0xe1592)
#10 0x559191b08ca9 in Perl_pp_sassign (/usr/bin/perl+0xccca9)
#11 0x559191b08605 in Perl_runops_standard (/usr/bin/perl+0xcc605)
#12 0x559191a8e6c8 in perl_run (/usr/bin/perl+0x526c8)
#13 0x559191a6787c in main (/usr/bin/perl+0x2b87c)
#14 0x7fa31be502b0 in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x202b0)
#15 0x559191a678b9 in _start (/usr/bin/perl+0x2b8b9)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/usr/bin/perl+0xd9fd7)
==13877==ABORTING
Dubious, test returned 1 (wstat 256, 0x100)
Failed 69/126 subtests
...
As I read the report there have been numerous fixes after the following
commit:
https://github.com/Perl/perl5/commit/a5f48505593c7e1ca478de383e24d5cc2541f3ca
re-implement OPpASSIGN_COMMON mechanism
This commit almost completely replaces the current mechanism
for detecting and handing common vars in list assignment, e.g.
...
It looks like not all regression are fixed after the re-implementation
and the one affecting nama is one of them.
...
On Wed, Mar 22, 2017 at 8:53 PM, Niko Tyni <ntyni@debian.org> wrote:
Show quoted text> On Tue, Mar 21, 2017 at 04:05:43PM +0100, Balint Reczey wrote:
...
Show quoted text> While I haven't made it to the bottom of this yet, I note that there's
> this code in lib/Audio/Nama/Effect.pm:
>
> my $perl_version = $^V;
> my ($minor_version) = $perl_version =~ /^v5\.(\d+)/;
> my @new_list = grep { $_ ne $id } @ops_list;
> #say "new_list: @new_list";
> if ($minor_version <= 14)
> { $track->{ops} = [ @new_list ] }
> else { @{ $track->{ops} } = @new_list }
>
> and if I patch that to take the <= 14 code path, the segfault goes away
> here and all tests pass. What's the history behind this version check?
...
On Thu, Mar 23, 2017 at 03:51:45PM +0100, Balint Reczey wrote:
Show quoted text...
Show quoted text> The line you found looks very much like a corner case for the assignment
> reimplementation.