Skip to content
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

Bleadperl v5.31.5-48-g760fdf2808 breaks KRYDE/Filter-gunzip-7.tar.gz #17268

Open
andk opened this issue Nov 6, 2019 · 9 comments
Open

Bleadperl v5.31.5-48-g760fdf2808 breaks KRYDE/Filter-gunzip-7.tar.gz #17268

andk opened this issue Nov 6, 2019 · 9 comments
Labels

Comments

@andk andk added the Needs Triage label Nov 6, 2019
@jkeenan

This comment has been minimized.

Copy link
Contributor

@jkeenan jkeenan commented Nov 6, 2019

Breaking commit: 760fdf2

Sample fail report: http://www.cpantesters.org/cpan/report/2bbf525a-f690-11e9-b861-b2173384a6e2

XRef: https://rt.cpan.org/Ticket/Display.html?id=130914

This is a failure in Filter-gunzip's test suite. The test segfaults at a point where it has to require a file which appears to have been specifically crafted for testing purposes and includes binary (gzipped?) data.

main::(t/test2.t:37):	  my $result = eval {
  DB<1> 
main::(t/test2.t:38):	    local $SIG{'__WARN__'} = sub {}; # no warnings
  DB<1> 
main::(t/test2.t:39):	    require $filename;
  DB<1> 
Segmentation fault (core dumped)

Filter::gunzip's essential functionality is documented as:

    This filter uncompresses gzipped Perl code at run-time. It can be used
    from the command line to run a .pl.gz file,

        perl -MFilter::gunzip foo.pl.gz

This functionality appears to be intact.

$ cat hello.pl
print "Hello world!\n";
$ gzip -c hello.pl > hello.pl.gz
$ bleadperl -Iblib/lib -Iblib/arch/auto/Filter/gunzip -MFilter::gunzip hello.pl.gz 
Hello world!

So the breakage is some subtlety revealed only during the test. @arc -- and anyone familiar with source filters or layers -- can you take a look?

Thank you very much.
Jim Keenan

@tonycoz

This comment has been minimized.

Copy link
Contributor

@tonycoz tonycoz commented Nov 6, 2019

@jkeenan what commit id were your tests done at? It may be that the reinstatement of the retry label has fixed this.

@jkeenan

This comment has been minimized.

Copy link
Contributor

@jkeenan jkeenan commented Nov 6, 2019

@jkeenan jkeenan added affects-5.32 BBC and removed Needs Triage labels Nov 6, 2019
@tonycoz

This comment has been minimized.

Copy link
Contributor

@tonycoz tonycoz commented Nov 6, 2019

ok, that's after the retry label was restored

@tonycoz

This comment has been minimized.

Copy link
Contributor

@tonycoz tonycoz commented Nov 6, 2019

@arc looks like we still have some deep recursion:

#0  0x00005555556fe3ae in Perl_sv_free2 (
    my_perl=<error reading variable: Cannot access memory at address 0x7fffff7fefe8>, 
    sv=<error reading variable: Cannot access memory at address 0x7fffff7fefe0>, rc=<error reading variable: Cannot access memory at address 0x7fffff7fefdc>)
    at sv.c:7088
#1  0x000055555573c3ad in Perl_SvREFCNT_dec (my_perl=0x555555b7a010, 
    sv=0x555555db78e0) at inline.h:227
#2  0x000055555573ec4b in Perl_leave_scope (my_perl=0x555555b7a010, base=98)
    at scope.c:927
#3  0x000055555573c950 in Perl_pop_scope (my_perl=0x555555b7a010)
    at scope.c:130
#4  0x00005555555fa19f in Perl_filter_read (my_perl=0x555555b7a010, idx=0, 
    buf_sv=0x555555b9df00, maxlen=0) at toke.c:4644
#5  0x00005555555fa1ff in S_filter_gets (my_perl=0x555555b7a010, 
    sv=0x555555b9df00, append=0) at toke.c:4661
#6  0x00005555555ef44b in Perl_lex_next_chunk (my_perl=0x555555b7a010, flags=0)
    at toke.c:1347
#7  0x0000555555607cf7 in yyl_fake_eof (my_perl=0x555555b7a010, fake_eof=0, 
    bof=true, 
    s=0x555555df1812 "lots of newlines which will run-length compress\n", 
    len=0) at toke.c:6834
#8  0x0000555555613451 in yyl_try (my_perl=0x555555b7a010, 
    s=0x555555df1812 "lots of newlines which will run-length compress\n", 
    len=0) at toke.c:8625
#9  0x0000555555608c0b in yyl_fake_eof (my_perl=0x555555b7a010, fake_eof=0, 
    bof=false, s=0x555555df1810 "\n", len=0) at toke.c:7082
#10 0x0000555555613451 in yyl_try (my_perl=0x555555b7a010, 
    s=0x555555df1812 "lots of newlines which will run-length compress\n", 
    len=0) at toke.c:8625
#11 0x0000555555608c0b in yyl_fake_eof (my_perl=0x555555b7a010, fake_eof=0, 
    bof=false, s=0x555555df1810 "\n", len=0) at toke.c:7082
#12 0x0000555555613451 in yyl_try (my_perl=0x555555b7a010, 
    s=0x555555df1812 "lots of newlines which will run-length compress\n", 
    len=0) at toke.c:8625
#13 0x0000555555608c0b in yyl_fake_eof (my_perl=0x555555b7a010, fake_eof=0, 
    bof=false, s=0x555555df1810 "\n", len=0) at toke.c:7082
#14 0x0000555555613451 in yyl_try (my_perl=0x555555b7a010, 
    s=0x555555df1812 "lots of newlines which will run-length compress\n", 
    len=0) at toke.c:8625
#15 0x0000555555608c0b in yyl_fake_eof (my_perl=0x555555b7a010, fake_eof=0, 
    bof=false, s=0x555555df1810 "\n", len=0) at toke.c:7082
#16 0x0000555555613451 in yyl_try (my_perl=0x555555b7a010, 
    s=0x555555df1812 "lots of newlines which will run-length compress\n", 
    len=0) at toke.c:8625
#17 0x0000555555608c0b in yyl_fake_eof (my_perl=0x555555b7a010, fake_eof=0, 
    bof=false, s=0x555555df1810 "\n", len=0) at toke.c:7082
...
#13537 0x0000555555608c0b in yyl_fake_eof (my_perl=0x555555b7a010, fake_eof=0, 
    bof=false, s=0x555555df1810 "\n", len=0) at toke.c:7082
#13538 0x0000555555613451 in yyl_try (my_perl=0x555555b7a010, 
    s=0x555555df1812 "lots of newlines which will run-length compress\n", 
    len=0) at toke.c:8625
#13539 0x0000555555608c0b in yyl_fake_eof (my_perl=0x555555b7a010, fake_eof=0, 
    bof=false, s=0x555555df1810 "\n", len=0) at toke.c:7082
#13540 0x0000555555613451 in yyl_try (my_perl=0x555555b7a010, 
    s=0x555555df1812 "lots of newlines which will run-length compress\n", 
    len=0) at toke.c:8625
#13541 0x0000555555608c0b in yyl_fake_eof (my_perl=0x555555b7a010, fake_eof=0, 
    bof=false, s=0x555555df1810 "\n", len=0) at toke.c:7082
...
gave up trying to find the bottom.
$ ~/perl/blead/bin/perl5.31.6 -v | grep 'This is'
This is perl 5, version 31, subversion 6 (v5.31.6 (v5.31.5-174-gcc8ba724cc)) built for x86_64-linux-thread-multi
@kryde

This comment has been minimized.

Copy link
Contributor

@kryde kryde commented Nov 7, 2019

I uploaded a new version 8. Its test1.t is my XS layer onto PL_rsfp method. Its test2.t is my pure-perl Filter::Util::Call and Compress::Raw::Zlib fallback method. So see how that goes (and problems with the XS likely me, or problems with the perl hopefully not :). The pure-perl can be run explicitly by "perl -MFilter::gunzip::Filter foo.pl.gz" (notice the sub-module name).

My XS now doesn't try to dup PL_rsfp up to a perl level handle. I didn't try to find out what was going wrong there, beyond presuming it a case of "don't do that".

@kryde

This comment has been minimized.

Copy link
Contributor

@kryde kryde commented Nov 29, 2019

I got an OpenBSD Amd64 5.31.7 failing in my version 8 test2.t which is the pure-perl.

http://www.cpantesters.org/cpan/report/0efe3086-117b-11ea-972b-ef706694f557

@jkeenan

This comment has been minimized.

Copy link
Contributor

@jkeenan jkeenan commented Nov 29, 2019

I got an OpenBSD Amd64 5.31.7 failing in my version 8 test2.t which is the pure-perl.

http://www.cpantesters.org/cpan/report/0efe3086-117b-11ea-972b-ef706694f557

I can confirm this failure in the following environment:

$ ./bin/perl -Ilib -v | head -2 | tail -1
This is perl 5, version 31, subversion 7 (v5.31.7 (v5.31.6-65-g17ba3f1d5d)) 
built for OpenBSD.amd64-openbsd-thread-multi
$ uname -mrs
OpenBSD 6.4 amd64
@jkeenan

This comment has been minimized.

Copy link
Contributor

@jkeenan jkeenan commented Jan 28, 2020

@arc @tonycoz Can we get an update on the status of this BBC ticket for Filter-gunzip?

Thank you very much.
Jim Keenan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.