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

Concurrency feature race/hyper sometimes failed with Supply #2355

Open
araraloren opened this Issue Oct 9, 2018 · 7 comments

Comments

Projects
None yet
4 participants
@araraloren
Copy link

araraloren commented Oct 9, 2018

The Problem

I have a App written in Perl 6, using it for search some source file according the file extension such as .c .cpp or .pm.
It using the race/hyper feature, so I can make the search faster.
And using the Supply print the file name matched.
The App sometimes failed since the release 2018.08, it works fine in early version Rakudo.
The App code related to search and print file is not change since Jun 2018.
I have check and make sure the exception is not throw by other module.

Actual Behavior

Sometimes exception raised :

A worker in a parallel iteration (hyper or race) initiated here:
  in sub find-and-print-source at /home/sakuya/.perl6/resources/C0A56D7877A1BF145A2E238F4E3AC46BC257B865 line 155
  in method CALL-ME at /home/sakuya/.perl6/sources/7B8064DED3AC6A8CB92C9389C025366E2B99858B (Getopt::Advance::NonOption) line 226
  in block  at /home/sakuya/.perl6/sources/E0632CB826F7C3556763D3FA73467B63DBB48C4F (Getopt::Advance::Context) line 108
  in method match at /home/sakuya/.perl6/sources/E0632CB826F7C3556763D3FA73467B63DBB48C4F (Getopt::Advance::Context) line 104
  in block  at /home/sakuya/.perl6/sources/D0D887DFEC4718A60A382437F682BA01F935A028 (Getopt::Advance::Utils) line 94
  in method process at /home/sakuya/.perl6/sources/D0D887DFEC4718A60A382437F682BA01F935A028 (Getopt::Advance::Utils) line 88
  in method process at /home/sakuya/.perl6/sources/7B8064DED3AC6A8CB92C9389C025366E2B99858B (Getopt::Advance::NonOption) line 18
  in method publish at /home/sakuya/.perl6/sources/D0D887DFEC4718A60A382437F682BA01F935A028 (Getopt::Advance::Utils) line 53
  in block  at /home/sakuya/.perl6/sources/FD1AE62F1D6FCD1BCC54839501F55B1958C11691 (Getopt::Advance::Parser) line 516
  in method CALL-ME at /home/sakuya/.perl6/sources/FD1AE62F1D6FCD1BCC54839501F55B1958C11691 (Getopt::Advance::Parser) line 503
  in sub ga-parser at /home/sakuya/.perl6/sources/FD1AE62F1D6FCD1BCC54839501F55B1958C11691 (Getopt::Advance::Parser) line 603
  in sub getopt at /home/sakuya/.perl6/sources/E98CCFB413A09F12F1A1AD932BACB07524684D12 (Getopt::Advance) line 110
  in sub main at /home/sakuya/.perl6/resources/C0A56D7877A1BF145A2E238F4E3AC46BC257B865 line 180
  in block <unit> at /home/sakuya/.perl6/resources/C0A56D7877A1BF145A2E238F4E3AC46BC257B865 line 13
  in sub MAIN at /home/sakuya/.perl6/bin/fs line 2
  in block <unit> at /home/sakuya/.perl6/bin/fs line 2

Died at:
    Not enough positional arguments; needed at least 2
      in any  at /home/sakuya/.perl6/precomp/5C16DA13BC552C8EB29D0AF8F9DE9513833996B1/E9/E98CCFB413A09F12F1A1AD932BACB07524684D12 line 1
      in block  at /home/sakuya/.perl6/sources/E98CCFB413A09F12F1A1AD932BACB07524684D12 (Getopt::Advance) line 146
      in any  at /home/sakuya/.perl6/precomp/5C16DA13BC552C8EB29D0AF8F9DE9513833996B1/E9/E98CCFB413A09F12F1A1AD932BACB07524684D12 line 1
      in sub find-and-print-source at /home/sakuya/.perl6/resources/C0A56D7877A1BF145A2E238F4E3AC46BC257B865 line 155
      in method CALL-ME at /home/sakuya/.perl6/sources/7B8064DED3AC6A8CB92C9389C025366E2B99858B (Getopt::Advance::NonOption) line 226
      in block  at /home/sakuya/.perl6/sources/E0632CB826F7C3556763D3FA73467B63DBB48C4F (Getopt::Advance::Context) line 108
      in method match at /home/sakuya/.perl6/sources/E0632CB826F7C3556763D3FA73467B63DBB48C4F (Getopt::Advance::Context) line 104
      in block  at /home/sakuya/.perl6/sources/D0D887DFEC4718A60A382437F682BA01F935A028 (Getopt::Advance::Utils) line 94
      in method process at /home/sakuya/.perl6/sources/D0D887DFEC4718A60A382437F682BA01F935A028 (Getopt::Advance::Utils) line 88
      in method process at /home/sakuya/.perl6/sources/7B8064DED3AC6A8CB92C9389C025366E2B99858B (Getopt::Advance::NonOption) line 18
      in method publish at /home/sakuya/.perl6/sources/D0D887DFEC4718A60A382437F682BA01F935A028 (Getopt::Advance::Utils) line 53
      in block  at /home/sakuya/.perl6/sources/FD1AE62F1D6FCD1BCC54839501F55B1958C11691 (Getopt::Advance::Parser) line 516
      in method CALL-ME at /home/sakuya/.perl6/sources/FD1AE62F1D6FCD1BCC54839501F55B1958C11691 (Getopt::Advance::Parser) line 503
      in sub ga-parser at /home/sakuya/.perl6/sources/FD1AE62F1D6FCD1BCC54839501F55B1958C11691 (Getopt::Advance::Parser) line 603
      in sub getopt at /home/sakuya/.perl6/sources/E98CCFB413A09F12F1A1AD932BACB07524684D12 (Getopt::Advance) line 110
      in sub main at /home/sakuya/.perl6/resources/C0A56D7877A1BF145A2E238F4E3AC46BC257B865 line 180
      in block <unit> at /home/sakuya/.perl6/resources/C0A56D7877A1BF145A2E238F4E3AC46BC257B865 line 13
      in sub MAIN at /home/sakuya/.perl6/bin/fs line 2
      in block <unit> at /home/sakuya/.perl6/bin/fs line 2

And sometimes the script segment fault [1] 8117 segmentation fault (core dumped) fs -lcpp -lcfg . > /dev/null

Steps to Reproduce

Install or checkout the module App::FindSource.
Make sure the number in the directory is enough, so the problem can reproduced easily.
The file extension is loaded by -l option.

fs -lcpp -lcfg -lperl ~ or

perl6 -Ilib ./bin/fs -lcpp -lcfg -lperl ~

Environment

  • Operating system: Fedora 28
  • Compiler version (perl6 -v): 2018.09
@robertlemmen

This comment has been minimized.

Copy link

robertlemmen commented Oct 9, 2018

I wonder if this is the same as M#962

@araraloren

This comment has been minimized.

Copy link
Author

araraloren commented Oct 10, 2018

The exception message are same, maybe they are cause by same issue.

And forget to mention the user code is at https://github.com/araraloren/perl6-app-findsource/blob/master/bin/fs#L153

@zoffixznet

This comment has been minimized.

Copy link
Contributor

zoffixznet commented Oct 19, 2018

Are you still able to reproduce it on rakudo's current HEAD? Based on comments on MoarVM/MoarVM#962 looks like it has been accidentally resolved.

@zoffixznet

This comment has been minimized.

Copy link
Contributor

zoffixznet commented Oct 20, 2018

I can repro a problem on HEAD:

$ perl6 -v
This is Rakudo version 2018.09-473-gfc5b76aee built on MoarVM version 2018.09-133-g4666ff437
implementing Perl 6.c.
(happeneds twice in about 15 runs)
$ perl6 -Ilib ./bin/fs -lcpp -lcfg -lperl ~
Segmentation fault

I ran the same thing about 20 times on 2018.09 and no crashes occured.

@AlexDaniel AlexDaniel added the SEGV label Oct 21, 2018

@zoffixznet

This comment has been minimized.

Copy link
Contributor

zoffixznet commented Oct 22, 2018

I ran the same thing about 20 times on 2018.09 and no crashes occured.

Contrary to that, as reported on IRC, @MasterDuke17 could not reproduce any issues.

@araraloren can you update us on whether you are still experiencing the problem on HEAD rakudo?

@araraloren

This comment has been minimized.

Copy link
Author

araraloren commented Oct 23, 2018

@zoffixznet
I test it on HEAD, the problem not occured, seems like it's fine now.

This is Rakudo version 2018.09-491-g64b3dbd79 built on MoarVM version 2018.09-137-g4582780a5
implementing Perl 6.c.
@AlexDaniel

This comment has been minimized.

Copy link
Member

AlexDaniel commented Oct 23, 2018

@araraloren thanks for confirming!

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