-
Notifications
You must be signed in to change notification settings - Fork 1
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
SEGV feeding a channel #5173
Comments
From @jonathanstoweThe following code will segfault after some thousand iterations: #!perl6 use NativeCall; my $samplerate = 44100; sub gen-sin(Int $sample-rate, Int $frequency) { my $chan = Channel.new; start { sleep 5; my $now = now; # vim: expandtab shiftwidth=4 ft=perl6 Giving rise to (gdb output): Program received signal SIGSEGV, Segmentation fault. I'm guessing that it's the the Channel.send This is Rakudo version 2016.02-136-g3a050fb built on MoarVM version 2016.02-25-gada3752 P.S. If the loop that feeds the channel could be at least 10x faster that would be lovely kthx ;-) |
From @jonathanstoweSlightly golfed: use NativeCall; my $chan = Channel.new; sub gen() { start { sleep 5; my $now = now; The simplest case (no gather or rotor) doesn't segfault. |
From @jonathanstoweFurther to this (to eliminate golf targets) Neither: use NativeCall; my $chan = Channel.new; start { sleep 5; my $now = now; Nor #!perl6 use NativeCall; my $chan = Channel.new; sub gen() { sleep 5; my $now = now; Show the same problem, for several hundreds of thousands of iterations, so the combination of rotor and the iterator does seem to have a bearing. |
From @jonathanstoweI've just retested with This is Rakudo version 2016.02-156-gd56b686 built on MoarVM version 2016.02-33-g1e3d2ac The very first, full, example still segfaults with the backtrace [Switching to Thread 0x7fffdffff700 (LWP 28906)] The other examples (including the second which *did* previously segv) do not fail after "many" iterations, (something like 10,000.) I can't offer any suggestions as to why it is difficult to replicate. |
From @jonathanstoweConfirmed on another machine just to check it's not something weird that makes it non-reproducible. On Tue Mar 15 15:35:12 2016, jns+bc@gellyfish.co.uk wrote:
|
From @zoffixznetCan't reproduce it on today's Rakudo. The example code is pretty complex. Do we still add it to tests or can we close this ticket without them? Where would these tests go? Into roast or rakudo's t/ along with other NativeCall tests? zoffix@VirtualBox:~$ perl6 -v |
The RT System itself - Status changed from 'new' to 'open' |
From @zoffixznetClosing as resolved, without tests, per http://irclog.perlgeek.de/perl6-dev/2016-07-10#i_12817089 |
@zoffixznet - Status changed from 'open' to 'resolved' |
From @jonathanstoweYeah, confirmed that it doesn't segv any more. On Sun Jul 10 11:40:24 2016, cpan@zoffix.com wrote:
|
Migrated from rt.perl.org#127700 (status was 'resolved')
Searchable as RT127700$
The text was updated successfully, but these errors were encountered: