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

Investigate breakage of the http3 server demo after a few iterations of client connections #752

Closed
t8m opened this issue Jul 11, 2024 · 6 comments
Assignees
Labels
Spike Timeboxed issue

Comments

@t8m
Copy link
Member

t8m commented Jul 11, 2024

Copying comment from @vdukhovni openssl/openssl#24749 (comment)

@vdukhovni wrote:

Did you mean "was"? I see you added some code for that, but I still the client reach an error state after a few tries:

$ while : ; do ./ossl-nghttp3-demo server.example:12345; sleep 1; done
:status: 200
content-length: 20

12345678901234567890:status: 200
content-length: 20

12345678901234567890:status: 200
content-length: 20

12345678901234567890:status: 200
content-length: 20

12345678901234567890<added new line for clarity>
4060A4C15F7F0000:error:8000006F:system library:dgram_recvmmsg:Connection refused:crypto/bio/bss_dgram.c:1589:
4060A4C15F7F0000:error:0A000183:SSL routines:ossl_quic_port_raise_net_error:quic network error:ssl/quic/quic_port.c:717:port failed due to network BIO I/O error
4060A4C15F7F0000:error:0A0000CF:SSL routines:quic_read_again:protocol is shutdown:ssl/quic/quic_impl.c:2890:
4060A4C15F7F0000:error:400C0107:lib(128):main:operation fail:ossl-nghttp3-demo.c:141:cannot handle events
40000530937F0000:error:8000006F:system library:dgram_recvmmsg:Connection refused:crypto/bio/bss_dgram.c:1589:
40000530937F0000:error:0A000183:SSL routines:ossl_quic_port_raise_net_error:quic network error:ssl/quic/quic_port.c:717:port failed due to network BIO I/O error
40000530937F0000:error:0A0000CF:SSL routines:quic_do_handshake:protocol is shutdown:ssl/quic/quic_impl.c:1878:
40000530937F0000:error:400C0103:lib(128):OSSL_DEMO_H3_CONN_handle_events:internal error:ossl-nghttp3.c:650:writing HTTP/3 data to network failed
40000530937F0000:error:400C0107:lib(128):main:operation fail:ossl-nghttp3-demo.c:141:cannot handle events
40A042A74F7F0000:error:8000006F:system library:dgram_recvmmsg:Connection refused:crypto/bio/bss_dgram.c:1589:
40A042A74F7F0000:error:0A000183:SSL routines:ossl_quic_port_raise_net_error:quic network error:ssl/quic/quic_port.c:717:port failed due to network BIO I/O error
40A042A74F7F0000:error:0A0000CF:SSL routines:quic_do_handshake:protocol is shutdown:ssl/quic/quic_impl.c:1878:
40A042A74F7F0000:error:400C0103:lib(128):OSSL_DEMO_H3_CONN_handle_events:internal error:ossl-nghttp3.c:650:writing HTTP/3 data to network failed
40A042A74F7F0000:error:400C0107:lib(128):main:operation fail:ossl-nghttp3-demo.c:141:cannot handle events
^C

The last few messages from the server were:

...
=> Received connection on 2
read_from_ssl_ids 3 events
Create bidi?
Create uni
revent 128 (128) on 3
revent 128 (128) on 7
read_from_ssl_ids hassomething nothing...
waitsocket for 5
read_from_ssl_ids timeout
@jfclere
Copy link

jfclere commented Jul 11, 2024

I have reproduced the issue... it takes several minutes on my box.
Either the client forgets to send a packet and the server misses something in the poll logic and does a timeout after 5 seconds.

@t8m
Copy link
Member Author

t8m commented Jul 11, 2024

I have reproduced the issue... it takes several minutes on my box. Either the client forgets to send a packet and the server misses something in the poll logic and does a timeout after 5 seconds.

This really sounds like something in the server code in the library. Even if the client was doing something wrong, it should never cause the server to break on the subsequent connections.

@jfclere
Copy link

jfclere commented Jul 11, 2024

Yes the error in ossl-nghttp3-demo-server.c
https://github.com/openssl/openssl/blob/feature/quic-server/demos/http3/ossl-nghttp3-demo-server.c#L179
It seems that reading from the new stream and processing the data (if any) fixes the issue.

@jfclere
Copy link

jfclere commented Jul 11, 2024

=> Received connection on 2
There is a setting from the client but the server doesn't process it and a timeout occurs

I should have a patch soon, the code needs some refactoring :-(

jfclere added a commit to jfclere/openssl that referenced this issue Jul 12, 2024
@vdukhovni
Copy link

@t8m, the above proposed fix to the demo server code appears to be effective for this issue.

jfclere added a commit to jfclere/openssl that referenced this issue Jul 16, 2024
Need to check with browsers now.
@nhorman
Copy link
Contributor

nhorman commented Jul 22, 2024

we have a linked pr, need to review

@nhorman nhorman added the Spike Timeboxed issue label Jul 22, 2024
@nhorman nhorman moved this from Refining to Todo in Project Board 3.4.0 planning Jul 22, 2024
@nhorman nhorman moved this from Refining to Todo in Development Board Jul 22, 2024
@nhorman nhorman added this to the 3.5.0 milestone Jul 29, 2024
@vavroch2010 vavroch2010 moved this from Todo to In Progress in Development Board Jul 30, 2024
@vdukhovni vdukhovni moved this from In Progress to Done in Development Board Aug 5, 2024
@vdukhovni vdukhovni closed this as completed by moving to Done in Development Board Aug 5, 2024
@github-project-automation github-project-automation bot moved this from New to Done in Project Board Aug 5, 2024
openssl-machine pushed a commit to openssl/openssl that referenced this issue Aug 7, 2024
Fixes openssl/project#752

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #24946)
vdukhovni pushed a commit to vdukhovni/openssl that referenced this issue Sep 11, 2024
Fixes openssl/project#752

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#24946)
t8m pushed a commit to t8m/openssl that referenced this issue Nov 12, 2024
Fixes openssl/project#752

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#24946)
nhorman pushed a commit to nhorman/openssl that referenced this issue Nov 12, 2024
Fixes openssl/project#752

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#24946)
t8m pushed a commit to openssl/openssl that referenced this issue Nov 14, 2024
Fixes openssl/project#752

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #24946)
openssl-machine pushed a commit to openssl/openssl that referenced this issue Nov 14, 2024
Fixes openssl/project#752

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #24946)
t8m pushed a commit to t8m/openssl that referenced this issue Nov 21, 2024
Fixes openssl/project#752

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#24946)
nhorman pushed a commit to nhorman/openssl that referenced this issue Jan 7, 2025
Fixes openssl/project#752

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#24946)
nhorman pushed a commit to nhorman/openssl that referenced this issue Jan 9, 2025
Fixes openssl/project#752

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#24946)
nhorman pushed a commit to nhorman/openssl that referenced this issue Jan 11, 2025
Fixes openssl/project#752

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#24946)
nhorman pushed a commit to nhorman/openssl that referenced this issue Feb 4, 2025
Fixes openssl/project#752

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#24946)
nhorman pushed a commit to openssl/openssl that referenced this issue Feb 7, 2025
Fixes openssl/project#752

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #24946)
andrewkdinh pushed a commit to andrewkdinh/openssl that referenced this issue Feb 14, 2025
Fixes openssl/project#752

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#24946)
nhorman pushed a commit to nhorman/openssl that referenced this issue Feb 14, 2025
Fixes openssl/project#752

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#24946)
nhorman pushed a commit to nhorman/openssl that referenced this issue Feb 14, 2025
Fixes openssl/project#752

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#24946)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Spike Timeboxed issue
Projects
Status: Done
Archived in project
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants