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

udp_proxy: fix crash during buffer watermarks callbacks #37689

Merged
merged 6 commits into from
Dec 19, 2024

Conversation

ohadvano
Copy link
Contributor

@ohadvano ohadvano commented Dec 16, 2024

Additional Description: In cases where writing upstream causes the buffer to go below low watermarks, onBelowWriteBufferLowWatermark callback will be called, causing another write on the upstream codec, during an already existing write process. With nghttp2 based codec, this causes Envoy to crash. For oghttp2 based codec, it simply discards the new written payload. The fix is posting the consecutive flushBuffer operation on the dispatcher rather than immediately calling it.
Risk Level: low
Testing: unit tests
Docs Changes: changelog
Release Notes: none
Platform Specific Features: none

Signed-off-by: Ohad Vano <ohadvano@gmail.com>
Copy link

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #37689 was opened by ohadvano.

see: more, trace.

@ohadvano ohadvano marked this pull request as ready for review December 17, 2024 09:02
@ohadvano ohadvano marked this pull request as draft December 17, 2024 09:04
Signed-off-by: Ohad Vano <ohadvano@gmail.com>
@ohadvano ohadvano marked this pull request as ready for review December 18, 2024 14:59
ohadvano and others added 3 commits December 18, 2024 17:39
Signed-off-by: Ohad Vano <ohadvano@gmail.com>
Signed-off-by: Ohad Vano <ohadvano@gmail.com>
Signed-off-by: ohadvano <49730675+ohadvano@users.noreply.github.com>
@adisuissa
Copy link
Contributor

Assigning udp_proxy codeowners to review.
/assign @mattklein123 @danzh2010

mattklein123
mattklein123 previously approved these changes Dec 19, 2024
@mattklein123
Copy link
Member

Sorry please merge main.

/wait

Signed-off-by: ohadvano <49730675+ohadvano@users.noreply.github.com>
@mattklein123 mattklein123 enabled auto-merge (squash) December 19, 2024 17:03
@mattklein123 mattklein123 merged commit 9835a16 into envoyproxy:main Dec 19, 2024
24 checks passed
@ohadvano ohadvano deleted the udp_fix_callback branch December 19, 2024 17:40
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

Successfully merging this pull request may close these issues.

4 participants