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

Bailador + start + IO hangs #5643

Closed
p6rt opened this issue Sep 6, 2016 · 6 comments
Closed

Bailador + start + IO hangs #5643

p6rt opened this issue Sep 6, 2016 · 6 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Sep 6, 2016

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

Searchable as RT129213$

@p6rt
Copy link
Author

p6rt commented Sep 6, 2016

From @coke

See attached files.

I have seen variations of this problem in 2016.07, .08, and just today
with f648d3b / 67b6836 / 5108035 - however the issues with the most
recent version seem to happen even sooner. (2016.08, for example, It
looked like even more work was being done in the start block before
the hang occurred0

Run 'perl6 wtf.p6' - this starts the bailador server listening on port 7890.

Run the curl.sh command - you'll see an "A" in the log - if you
wait... no "B" appears.
Now run the curl.sh command multiple times - you'll see an "A" appear
for each request, but you won't get a "B" until a few requests have
been posted.

Remove the start block and restart - "B" comes back very quickly.

Revert wtf.p6, replace the slurp line with a "sleep 4" and rerun​: now
A still emits immediately with each curl request, but B emits for each
of those requests, just after the expected delay.

So, triggering the issue seems to require HTTP​::Easy's .run method
(used in Bailador), an async start block, and then additional IO in
the start block.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Sep 6, 2016

From @coke

curl.sh

@p6rt
Copy link
Author

p6rt commented Sep 6, 2016

From @coke

wtf.p6

@p6rt
Copy link
Author

p6rt commented Sep 7, 2016

From @jnthn

On Tue Sep 06 08​:58​:37 2016, coke wrote​:

See attached files.

I have seen variations of this problem in 2016.07, .08, and just today
with f648d3b / 67b6836 / 5108035 - however the issues with the most
recent version seem to happen even sooner. (2016.08, for example, It
looked like even more work was being done in the start block before
the hang occurred0

Run 'perl6 wtf.p6' - this starts the bailador server listening on port 7890.

Run the curl.sh command - you'll see an "A" in the log - if you
wait... no "B" appears.
Now run the curl.sh command multiple times - you'll see an "A" appear
for each request, but you won't get a "B" until a few requests have
been posted.

Remove the start block and restart - "B" comes back very quickly.

Revert wtf.p6, replace the slurp line with a "sleep 4" and rerun​: now
A still emits immediately with each curl request, but B emits for each
of those requests, just after the expected delay.

So, triggering the issue seems to require HTTP​::Easy's .run method
(used in Bailador), an async start block, and then additional IO in
the start block.

Attaching gdb to see where it was hanging showed up that the thread waiting to accept was preventing others from running GC. Fixed that in MoarVM. Also boiled the bug down to the test case now in roast as S32-io/socket-accept-and-working-threads.t, which covers it.

/jnthn

@p6rt
Copy link
Author

p6rt commented Sep 7, 2016

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Sep 7, 2016

@jnthn - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Sep 7, 2016
@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