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
Failure to close channel causes GC crash #5770
Comments
From doug@theschrags.netThis probably is an issue with moarvm. When trying to benchmark the concurrent and non-concurrent versions of However, now this version of the program crashes after the first thread or occasionally: Test runs: doug@ender:~/study/Perl6/benchmarks$ RAKUDO_MAX_THREADS=2 perl6 I also found that the problem is likely related to a channel not being [ With a LEAVE block to close the channels ] doug@ender:~/study/Perl6/benchmarks$ RAKUDO_MAX_THREADS=2 perl6 I'm figuring that failing to close the channels is bad practice to start, Code file is attached. System report follows. Doug Schrag <>< Summary of my perl5 (revision 5 version 18 subversion 1) configuration: Platform: Characteristics of this binary (from libperl): |
From doug@theschrags.netuse v6; sub bogosort_concurrent ( *@list ) { start until $sorted.closed { $sorted.send( @guess ) return $sorted.receive; my @test_data = < p e r l s i x >; for ^4 |
From doug@theschrags.netSorry, wrong system report. Here is the correct one (perl6 interpreter): moar::dcbrule=@: Doug Schrag <>< |
From doug@theschrags.netSorry, wrong system report previously attached. moar::dcbrule=@: Doug Schrag <>< |
From @jnthnOn Sun Oct 23 18:01:55 2016, doug@theschrags.net wrote:
It was indeed.
The channel really does want closing, otherwise you end up with a bunch of threads sat in a hot loop eating CPU (and each run sets off another thread doing exactly that, which is why the thing gets slower every run with the missing Channel.close). Of course, a VM crash is the wrong response; I've now hunted that down and committed a fix. It turns out the bug wasn't actually anything to do with closing the channel per se; it's just that missing the `LEAVE` out resulted in a lot more load and GC runs. The problem almost certainly could have happened with the `LEAVE` there; it was just a lot less likely. I've added this example as a stresstest, to catch any regressions. Thanks! /jnthn |
The RT System itself - Status changed from 'new' to 'open' |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#129949 (status was 'resolved')
Searchable as RT129949$
The text was updated successfully, but these errors were encountered: