You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A suspended write() fails its own 'static' return-type check under bidirectional HTTP/2 load #226
Both directions have to be large. -c 20 -m 8 with no request body finishes
400 of 400, and forcing write() backpressure alone with setStreamWriteBufferBytes(4096) does not reproduce it.
What the message means
write() is declared public function write(string $chunk): static
(stubs/HttpResponse.php:228), which compiles to IS_STATIC in stubs/HttpResponse.php_arginfo.h:63. PHP resolves static for an internal
method through the called scope of the current execute_data. The returned value is a TrueAsync\HttpResponse, so the failure is the resolution, not the value:
the frame the check reads is not the one that called write().
write() suspends — HTTP/2 parks it when the per-stream chunk ring is full —
and getBody() suspends ahead of it on a large request body. "in Unknown on
line 0" says the error is raised with no PHP frame in scope, which is consistent
with the verification running after a resume that did not restore the call
frame.
writeMessage() carries the same IS_STATIC return type, and every other
suspending method that returns static is in the same position.
Found while reviewing #219 (PR 220); present on main and unrelated to that
change.
Activity
Merge pull request #230 from true-async/226-h2-refuse-body-and-restor…