Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

lrstewart
Copy link
Contributor

@lrstewart lrstewart commented May 5, 2025

Release Summary:

Resolved issues:

Part 2 of #5282

Our integ tests have been failing more often lately. I suspect it's a Codebuild noisy neighbor problem. The main tests I see fail are "test_renegotiate" and "test_serialization". I ran the integ tests on an ec2 instance also running stress. It was almost comically effective. I was able to consistently repro the failures from the CI.

#5282 fixed test_renegotiate. This PR fixes test_serialization.

Description of changes:

We don't shutdown connections when serializing. It wouldn't really make sense, since closing a connection involves sending and receiving data and sending and receiving data changes the state of the connection so that the serialization is no longer valid. So we skip s2n_shutdown: https://github.com/aws/s2n-tls/blob/main/bin/s2nc.c#L804-L808

However, if a connection has completed a handshake and is just idling on echo, then we're calling s2n_send / s2n_recv. So when the peer closes the underlying TCP connection because the process ended, we receive that EOF event and throw an error for improper shutdown of the TLS connection.

The fix is not to call echo, since we're not sending or receiving anything anyway.

Testing:

Hard to prove lack of flakiness. But it now passes locally with stress running.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions github-actions bot added the s2n-core team label May 5, 2025
@lrstewart lrstewart marked this pull request as ready for review May 6, 2025 03:20
@lrstewart lrstewart requested review from maddeleine and johubertj May 6, 2025 03:20
@lrstewart lrstewart added this pull request to the merge queue May 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 6, 2025
@lrstewart lrstewart enabled auto-merge May 7, 2025 01:33
@lrstewart lrstewart added this pull request to the merge queue May 7, 2025
Merged via the queue into aws:main with commit 5df734c May 7, 2025
46 checks passed
@lrstewart lrstewart deleted the test_serialization branch May 7, 2025 02:55
dougch pushed a commit to dougch/s2n-tls that referenced this pull request May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants