Skip to content

fix(mod_http3): resolve worker concurrency races and QPACK encoder de… - #1099

Open
BrunoLafleur wants to merge 6 commits into
apache:trunkfrom
BrunoLafleur:pb3
Open

BrunoLafleur wants to merge 6 commits into
apache:trunkfrom
BrunoLafleur:pb3

Conversation

@BrunoLafleur

@BrunoLafleur BrunoLafleur commented Nov 26, 2026 •

Copy link
Copy Markdown

…sync

  • Allocate response headers from r->pool instead of shared h3s->pool
  • Use temporary pools and stream snapshots when iterating session->streams
  • Cache stream_id prior to unlocking session->lock in submit_response_nva()
  • Reset w->pending before draining wakeup socket in h3_wakeup_drain()
  • Enforce atomic reads/CAS on session->aborted and session->ngh3_dead
  • Prevent response HEADERS from overtaking a write-blocked qpack_enc stream
  • Add H3QpackEncoderTableCapacity directive (default: 0) :
    Under heavy concurrent bursts and UDP packet reordering, dynamic QPACK table updates can cause clients to exceed SETTINGS_QPACK_BLOCKED_STREAMS (typically 100) and close with 0x200.
    Fix: Add H3QpackEncoderTableCapacity (defaulting to 0, using the static QPACK table only unless explicitly enabled by the administrator) mapped to settings.qpack_encoder_max_dtable_capacity.

Tested with Valgind helgrind.

And with chrome http3 as a client which generates a lot of request in a short time (some thousands in 10 seconds).


  • This PR does not report or address a security vulnerability
    (see SECURITY.md and
    https://www.apache.org/security/#reporting-a-vulnerability).
  • Code follows the httpd style guide.
  • New log messages (level debug or higher) use an empty APLOGNO() tag;
    numbers are assigned by a committer at merge time (see docs/log-message-tags/README).
  • If the change is user-visible, a changes-entries/*.txt file is included,
    following the template in README.CHANGES (not needed otherwise).
  • Test cases based on pyhttpd are included where appropriate, in the
    test/modules/xxx directory matching the modules/xxx module source,
    or test/modules/core for core server changes. On Unix, verify these
    pass locally with e.g. make check-pytest PYTEST_DIRS=test/modules/xxx.

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.

1 participant