Skip Menu |
Report information
Id: 131510
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at] zoffix.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [SEGV] Segfault when `-Ilib` while running a file that does `use lib <lib>` and loads some modules
Download (untitled) / with headers
text/plain 582b
To get code that segfaults: cd $(mktemp -d); git clone https://github.com/zoffixznet/perl6-Temp-Path . ; git checkout ca5ab2816705cf36911b91e4029224b4d4644a2d; Now run this several times and it'll segfault ~50% of the time: perl6 -Ilib t/03-DESTROY.t The test file already does `use lib <lib>` and if you remove `-Ilib` switch, the segfault seems to disappear: perl6 t/03-DESTROY.t I tried making a small test case that just had a dummy module and was doing `use lib <lib>` but that didn't segfault. Perhaps it's got to do with loading some installed modules?
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 484b
Also noticed another failure mode in a more recent version[^1] of the test file: fails (likely due to segv): prove -e 'perl6 -Ilib' -r t/03-DESTROY.t succeeds: prove -e 'perl6 -Ilib' -vlr t/03-DESTROY.t And removing the `-Ilib` from prove line didn't help it, but removing the `use lib` from the test file and using solely -Ilib avoided the problem. [1] https://github.com/zoffixznet/perl6-Temp-Path/blob/0c2d855ffd4e602aafc34297f17d2a428c080cdd/t/03-DESTROY.t
Download (untitled) / with headers
text/plain 594b
FWIW, it segfaults like below, not during module loading: cpan@toaster:/tmp/tmp.KcLTWw3PYk$ perl6 -Ilib t/03-DESTROY.t 1..4 1..2 ok 1 - exists before DESTROY ok 2 - does not exist after DESTROY ok 1 - file 1..2 ok 1 - derivative exists before DESTROY ok 2 - derivative still exists after DESTROY ok 2 - file, after changing path 1..2 ok 1 - exists before DESTROY ok 2 - does not exist after DESTROY ok 3 - dir 1..2 Segmentation fault cpan@toaster:/tmp/tmp.KcLTWw3PYk$ And I tried running with RAKUDO_MODULE_DEBUG enabled but then it doesn't segfault.
Download (untitled) / with headers
text/plain 869b
Some discussion: https://irclog.perlgeek.de/perl6-dev/2017-06-11#i_14715962 02:00 ugexe well, i have a good idea what it is then 02:01 its the `run` that does precomp, and its the bug that has to do with stderr/stdout buffer, which one you read first, and which one you close first 02:01 eveo It segfaults after running some tests tho. Like this is one of the outputs: https://rt.perl.org/Ticket/Display.html?id=131510#txn-1465483 02:01 ugexe the prove thing would be related because -v probably adds a bunch of extra stuff to stderr 02:02 eveo actually, seems to consistently segfault like that, after starting 3rd test grup 02:03 ugexe yea, and does it change if you rm -rf lib/.precomp ? 02:03 eveo It didn't segfault after removing it, but next run segfaulted at the same place 02:04 ugexe yep 02:04 so there should be a difference in RAKUDO_MODULE_DEBUG loading


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org