Skip Menu |
Report information
Id: 130689
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: robertle [at] semistable.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



From: Robert Lemmen <robertle [...] semistable.com>
Subject: rapid network interaction crashes something
To: rakudobug [...] perl.org
Date: Wed, 1 Feb 2017 17:01:08 +0000
Download (untitled) / with headers
text/plain 1.3k
hi everyone, I have these two tiny pieces of code: ---------------------------8<-- server.p6 -------------------------- my $listen = IO::Socket::INET.new(:listen, :localhost<127.0.0.1>, :localport(3333)); loop { my $conn = $listen.accept; while my $buf = $conn.recv(:bin) { $conn.write($buf); } $conn.close; } --------------------------->8--------------------------------------- ---------------------------8<-- client.p6 -------------------------- loop (my $i = 0; $i <= $conn_count; $i++) { my $conn = IO::Socket::INET.new(host => '127.0.0.1', port => 3333); loop (my $j = 0; $j <= $echo_count; $j++) { $conn.print("woohoo $i $j\n"); # critical line below: if removed the server crashes without much # evidence of what is going on... a say does the same trick sleep 0.0001; } $conn.close; } --------------------------->8--------------------------------------- I start up the server and then the client, which runs for about 20s and then exits as expected. the server stays up. if you remove the sleep in the client, the server process stops at some point through without any output. This is Rakudo version 2017.01-132-g97359ae built on MoarVM version 2017.01-25-g70d4bd5 please let me know if there is anything I can do to help debug or understand better thanks robert -- Robert Lemmen http://www.semistable.com
Download signature.asc
application/pgp-signature 833b

Message body not shown because it is not plain text.

RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 1.6k
On Wed, 01 Feb 2017 09:03:37 -0800, robertle@semistable.com wrote: Show quoted text
> hi everyone, > > I have these two tiny pieces of code: > > ---------------------------8<-- server.p6 -------------------------- > my $listen = IO::Socket::INET.new(:listen, :localhost<127.0.0.1>, > :localport(3333)); > loop { > my $conn = $listen.accept; > while my $buf = $conn.recv(:bin) { > $conn.write($buf); > } > $conn.close; > } > --------------------------->8--------------------------------------- > > ---------------------------8<-- client.p6 -------------------------- > loop (my $i = 0; $i <= $conn_count; $i++) { > my $conn = IO::Socket::INET.new(host => '127.0.0.1', port => 3333); > loop (my $j = 0; $j <= $echo_count; $j++) { > $conn.print("woohoo $i $j\n"); > # critical line below: if removed the server crashes without much > # evidence of what is going on... a say does the same trick > sleep 0.0001; > } > $conn.close; > } > > --------------------------->8--------------------------------------- > > I start up the server and then the client, which runs for about 20s and > then exits as expected. the server stays up. > > if you remove the sleep in the client, the server process stops at some > point through without any output. > > This is Rakudo version 2017.01-132-g97359ae built on MoarVM version > 2017.01-25-g70d4bd5 > > please let me know if there is anything I can do to help debug or > understand better > > thanks robert >
Can't reproduce on 2017.01-121-gf94cb21. Your client script is using $conn_count and $echo_count but neither is defined. What values are those supposed to be at? Is there anything else missing?
Download (untitled) / with headers
text/plain 919b
apologies for a possible duplication, I thought replying to the email would attach my reply to this bug as well, which does not appear to be the case... On Thu, 02 Feb 2017 10:38:10 -0800, cpan@zoffix.com wrote: Show quoted text
> Can't reproduce on 2017.01-121-gf94cb21. Your client script is using > $conn_count and $echo_count but neither is defined. What values are > those supposed to be at? Is there anything else missing?
sorry, didn't mean to snip these off. they are: my $conn_count = 10000; my $echo_count = 10; otherwise there is only a "use v6;" and a shebang in each file. I donm't do anything crazy around it either, just start em up. I failed to mention my system however, which is a 4.8.0-2-amd64 linux. I just retried it, with the "say" line it works, without the say the server exits. no message, but this time I checked the exit code which is 141 consistently across multiple runs. perhaps that helps a bit...
From: Robert Lemmen <robertle [...] semistable.com>
To: Zoffix Znet via RT <perl6-bugs-followup [...] perl.org>
Subject: Re: [perl #130689] rapid network interaction crashes something
Date: Thu, 2 Feb 2017 18:59:26 +0000
Download (untitled) / with headers
text/plain 861b
On Thu, Feb 02, 2017 at 10:38:10AM -0800, Zoffix Znet via RT wrote: Show quoted text
> Can't reproduce on 2017.01-121-gf94cb21. Your client script is using $conn_count and $echo_count but neither is defined. What values are those supposed to be at? Is there anything else missing?
sorry, didn't mean to snip these off. they are: my $conn_count = 10000; my $echo_count = 10; otherwise there is only a "use v6;" and a shebang in each file. I donm't do anything crazy around it either, just start em up. I failed to mention my system however, which is a 4.8.0-2-amd64 linux. I just retried it, with the "say" line it works, without the say the server exits. no message, but this time I checked the exit code which is 141 consistently across multiple runs. perhaps that helps a bit... regards robert -- Robert Lemmen http://www.semistable.com
Download signature.asc
application/pgp-signature 833b

Message body not shown because it is not plain text.



This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org