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

Occasional failure seen in push promise tests #22

Open
jnthn opened this issue Feb 8, 2018 · 2 comments
Open

Occasional failure seen in push promise tests #22

jnthn opened this issue Feb 8, 2018 · 2 comments

Comments

@jnthn
Copy link
Member

jnthn commented Feb 8, 2018

# Failed test 'Got a push promise when they are disabled!'
# at t/http2-push-promise.t line 61
# Failed test 'Got zero push promises when they are disabled'
# at t/http2-push-promise.t line 65
# expected: '0'
#      got: '1'
# Looks like you failed 2 tests of 7
t/http2-push-promise.t .........
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/7 subtests
@Altai-man
Copy link
Member

Altai-man commented Feb 8, 2018

Sounds like a settings negotiation/synchronization race to me(which is bad. pretty bad).

@Altai-man
Copy link
Member

Altai-man commented Jul 28, 2018

So here are results of my investigation:
1)It is not negotiation(great).
2)It is something odd.

I was able to reproduce it easily using the failing test with last chunk of code wrapped in for ^1000.

The reason of the exception is further down the stack - we throw PROTOCOL_ERROR exception at some point and things further fail. The protocol error is caused by condition at https://github.com/croservices/cro-http/blob/master/lib/Cro/HTTP2/ResponseParser.pm6#L18
It fails because of first sub-condition - ID of the stream is bigger than expected one. It may be either because current expected stream is not incremented or incremented twice, so the order breaks.
However, we process everything in race-safe whenever blocks and sticking some Lock instances here and there to prevent race did not help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants