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

Hangs in spectests with test that calls .quit on Supplier #5248

Closed
p6rt opened this issue Apr 21, 2016 · 4 comments
Closed

Hangs in spectests with test that calls .quit on Supplier #5248

p6rt opened this issue Apr 21, 2016 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Apr 21, 2016

Migrated from rt.perl.org#127947 (status was 'resolved')

Searchable as RT127947$

@p6rt
Copy link
Author

p6rt commented Apr 21, 2016

From @usev6

This ticket is about a (skipped) test in S17-supply/Channel.t that regularely hangs in spectests.

The hangs happen with the latest and greatest rakudo-j with OpenJDK 1.8.0_77 (running on FreeBSD 10.3)

$ perl6-j --version
This is Rakudo version 2016.04-2-g6df7ff8 built on JVM
implementing Perl 6.c.
$ java -version
openjdk version "1.8.0_77"
OpenJDK Runtime Environment (build 1.8.0_77-b03)
OpenJDK 64-Bit Server VM (build 25.77-b03, mixed mode)

A somewhat golfed example of the hanging code is​:

$ perl6-j -e 'my $r = Supplier.new; my $s = $r.Supply; my $c = $s.Channel; my $p = start { for @​$c { } }; for 1..4 { $r.emit($_); }; $r.quit(X​::AdHoc.new(​:payload("foo"))); try await $p;'

This command runs to it's completion most of the time, but hangs from time to time. During spectests S17-supply/Channel.t was hanging most of the time (always?) -- before the test was skipped.

@p6rt
Copy link
Author

p6rt commented Apr 22, 2016

From @usev6

On Thu Apr 21 04​:41​:32 2016, bartolin@​gmx.de wrote​:

[...]
A somewhat golfed example of the hanging code is​:

$ perl6-j -e 'my $r = Supplier.new; my $s = $r.Supply; my $c =
$s.Channel; my $p = start { for @​$c { } }; for 1..4 { $r.emit($_); };
$r.quit(X​::AdHoc.new(​:payload("foo"))); try await $p;'

Today I've seen a hang with S17-supply/Channel.t on rakudo-m during
a spectest. So I took a closer look. For some reasons I get
substantially more hangs on my FreeBSD virtual machine than on a
bare metal Debian box -- and not only for rakudo-j.

The following numbers are for 100 runs of the mentioned commands​:
 
FreeBSD 10.3, OpenJDK 1.8 (virtual machine)

rakudo-m 463e7589a1
* 0 hangs when running golfed code from command line (s.a.)
* 61 hangs when running 'perl6-m -Ilib t/spec/S17-supply/Channel.t
* 43 hangs when running 'perl t/harness --fudge --moar t/spec/S17-supply/Channel.t'
 
rakudo-j 463e7589a1 * 18 hangs when running golfed code from command line (s.a.)
* many hangs when running 'perl6-j -Ilib t/spec/S17-supply/Channel.t
* many hangs when running 'perl t/harness --fudge --jvm t/spec/S17-supply/Channel.t'
 
Debian 7.9, OpenJDK 1.7

rakudo-m 463e7589a1
* 0 hangs when running golfed code from command line (s.a.)
* 0 hangs when running 'perl6-m -Ilib t/spec/S17-supply/Channel.t
* 0 hangs when running 'perl t/harness --fudge --moar t/spec/S17-supply/Channel.t'
 
rakudo-j 463e7589a1
* 0 hangs when running golfed code from command line (s.a.)
* 1 hang when running 'perl6-j -Ilib t/spec/S17-supply/Channel.t
* 2 hangs when running 'perl t/harness --fudge --jvm t/spec/S17-supply/Channel.t'

@p6rt
Copy link
Author

p6rt commented Sep 12, 2017

From @usev6

On Fri, 22 Apr 2016 12​:20​:54 -0700, bartolin@​gmx.de wrote​:

On Thu Apr 21 04​:41​:32 2016, bartolin@​gmx.de wrote​:

[...]
A somewhat golfed example of the hanging code is​:

$ perl6-j -e 'my $r = Supplier.new; my $s = $r.Supply; my $c =
$s.Channel; my $p = start { for @​$c { } }; for 1..4 { $r.emit($_); };
$r.quit(X​::AdHoc.new(​:payload("foo"))); try await $p;'

Today I've seen a hang with S17-supply/Channel.t on rakudo-m during
a spectest. So I took a closer look. For some reasons I get
substantially more hangs on my FreeBSD virtual machine than on a
bare metal Debian box -- and not only for rakudo-j.

The following numbers are for 100 runs of the mentioned commands​:

FreeBSD 10.3, OpenJDK 1.8 (virtual machine)

rakudo-m 463e7589a1
* 0 hangs when running golfed code from command line (s.a.)
* 61 hangs when running 'perl6-m -Ilib t/spec/S17-supply/Channel.t
* 43 hangs when running 'perl t/harness --fudge --moar t/spec/S17-
supply/Channel.t'

rakudo-j 463e7589a1
* 18 hangs when running golfed code from command line (s.a.)
* many hangs when running 'perl6-j -Ilib t/spec/S17-supply/Channel.t
* many hangs when running 'perl t/harness --fudge --jvm t/spec/S17-
supply/Channel.t'

Debian 7.9, OpenJDK 1.7

rakudo-m 463e7589a1
* 0 hangs when running golfed code from command line (s.a.)
* 0 hangs when running 'perl6-m -Ilib t/spec/S17-supply/Channel.t
* 0 hangs when running 'perl t/harness --fudge --moar t/spec/S17-
supply/Channel.t'

rakudo-j 463e7589a1
* 0 hangs when running golfed code from command line (s.a.)
* 1 hang when running 'perl6-j -Ilib t/spec/S17-supply/Channel.t
* 2 hangs when running 'perl t/harness --fudge --jvm t/spec/S17-
supply/Channel.t'

I haven't seen a single hang in S17-supply/Channel.t on moar for many months. Also, I just repeated my earlier experiment (running the golfed code and the test file t/spec/S17-supply/Channel.t in a loop) and there was no problem at all (neither on moar nor on jvm). Therefore I'm closing this ticket as 'resolved'.

@p6rt p6rt closed this as completed Sep 12, 2017
@p6rt
Copy link
Author

p6rt commented Sep 12, 2017

@usev6 - Status changed from 'new' to 'resolved'

@p6rt p6rt added the conc label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant