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
Non-deterministic segfaults in parallel code #5020
Comments
From @OvidThis code sometimes segfaults, sometimes tells me it's a malloc error: |
From @nwc10Something between your mail client and my mail client hates us: On Thu, Jan 07, 2016 at 03:29:49PM -0800, curtis_ovid_poe@yahoo.com wrote:
Nice find. ASAN says this, and memory corruption combined with concurrency $ ./perl6-m -Ilib -e 'my @primes = grep { .is-prime }, 1 .. *; my @p = gather for 4000, 5, 100, 2000 -> $n { take start { @primes[$n] }; }; .say for await @p;'==16988==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x619000168e80 at pc 0x7feef89ff829 bp 0x7feef24dbff0 sp 0x7feef24dbfe8 0x619000168e80 is located 0 bytes to the right of 1024-byte region [0x619000168a80,0x619000168e80) previously allocated by thread T1 here: Thread T1 created by T0 here: Thread T3 created by T0 here: SUMMARY: AddressSanitizer: heap-buffer-overflow src/6model/reprs/MVMArray.c:133 at_pos Nicholas Clark |
The RT System itself - Status changed from 'new' to 'open' |
From @smlsIt doesn't segfault for me on... Rakudo version 2016.04-155-gdc7346b built on MoarVM version 2016.04 ...and instead prints this error: No such method 'is-prime' for invocant of type 'Any' (When removing the `start` and `await` to disable the parallelism, it works fine.) However, I don't think that's a bug. Arrays are only partially thread-safe in Perl 6, by design. Thus, I believe this ticket can be closed. Do we need a Roast test for the "no longer segfaults" aspect? |
From @smls[13:42] <moritz> a test would be appreciated, yes |
From @zoffixznetI'm still getting segfaults after several runs on This is Rakudo version 2016.05-348-g41b685e built on MoarVM version 2016.06-9-g8fc21d5 zoffix@VirtualBox:~/CPANPRC/rakudo$ ./perl6-m -Ilib -e 'my @primes = grep { .is-prime }, 1 .. *; my @p = gather for 4000, 5, 100, 2000 -> $n { take start { @primes[$n] }; }; .say for await @p;' zoffix@VirtualBox:~/CPANPRC/rakudo$ ./perl6-m -Ilib -e 'my @primes = grep { .is-prime }, 1 .. *; my @p = gather for 4000, 5, 100, 2000 -> $n { take start { @primes[$n] }; }; .say for await @p;' zoffix@VirtualBox:~/CPANPRC/rakudo$ ./perl6-m -Ilib -e 'my @primes = grep { .is-prime }, 1 .. *; my @p = gather for 4000, 5, 100, 2000 -> $n { take start { @primes[$n] }; }; .say for await @p;' zoffix@VirtualBox:~/CPANPRC/rakudo$ ./perl6-m -Ilib -e 'my @primes = grep { .is-prime }, 1 .. *; my @p = gather for 4000, 5, 100, 2000 -> $n { take start { @primes[$n] }; }; .say for await @p;' zoffix@VirtualBox:~/CPANPRC/rakudo$ ./perl6-m -Ilib -e 'my @primes = grep { .is-prime }, 1 .. *; my @p = gather for 4000, 5, 100, 2000 -> $n { take start { @primes[$n] }; }; .say for await @p;' zoffix@VirtualBox:~/CPANPRC/rakudo$ ./perl6-m -Ilib -e 'my @primes = grep { .is-prime }, 1 .. *; my @p = gather for 4000, 5, 100, 2000 -> $n { take start { @primes[$n] }; }; .say for await @p;' |
From @zoffixznetFudged tests added in Raku/roast@02d698835e Still segfaults about once in 10 runs on 2016.08.1-145-g87f772e |
Migrated from rt.perl.org#127208 (status was 'open')
Searchable as RT127208$
The text was updated successfully, but these errors were encountered: