[PR #2033] [MERGED] Spawn H2 Data frame processing into a separate task #2772

Closed
opened 2026-03-16 11:07:22 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/2033
Author: @yaroslavros
Created: 9/21/2023
Status: Merged
Merged: 9/26/2023
Merged by: @bluejekyll

Base: mainHead: main


📝 Commits (2)

  • 2e0b9a2 Spawn data processing in a separate tokio task to avoid deadlock if the Data frame is not yet received.
  • 87f3cb8 Merge branch 'main' into main

📊 Changes

1 file changed (+6 additions, -4 deletions)

View changed files

📝 crates/server/src/server/https_handler.rs (+6 -4)

📄 Description

I noticed that under load DoH server once in a while goes into deadlock. This is particularly visible when ECH is enabled in Chrome and it makes three simultaneous requests in a single DoH session (for A, AAAA and HTTPS records). If all Data frames do not arrive at the same time as Header frames, DoH server goes into deadlock and never responds to requests with missing data frames.

Spawning Data frame processing into a separate Tokio task resolves this issue. Same logic is actually used in the basic h2 server example at https://github.com/hyperium/h2/blob/master/examples/server.rs (line 34).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/2033 **Author:** [@yaroslavros](https://github.com/yaroslavros) **Created:** 9/21/2023 **Status:** ✅ Merged **Merged:** 9/26/2023 **Merged by:** [@bluejekyll](https://github.com/bluejekyll) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`2e0b9a2`](https://github.com/hickory-dns/hickory-dns/commit/2e0b9a275873170d89bb2ce5f688b6adc52a0481) Spawn data processing in a separate tokio task to avoid deadlock if the Data frame is not yet received. - [`87f3cb8`](https://github.com/hickory-dns/hickory-dns/commit/87f3cb8e60a6230b090670ace7219a7d200740b8) Merge branch 'main' into main ### 📊 Changes **1 file changed** (+6 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/server/src/server/https_handler.rs` (+6 -4) </details> ### 📄 Description I noticed that under load DoH server once in a while goes into deadlock. This is particularly visible when ECH is enabled in Chrome and it makes three simultaneous requests in a single DoH session (for A, AAAA and HTTPS records). If all Data frames do not arrive at the same time as Header frames, DoH server goes into deadlock and never responds to requests with missing data frames. Spawning Data frame processing into a separate Tokio task resolves this issue. Same logic is actually used in the basic h2 server example at https://github.com/hyperium/h2/blob/master/examples/server.rs (line 34). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:07:22 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#2772
No description provided.