-
Notifications
You must be signed in to change notification settings - Fork 56
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
Flyweight wrapping error race condition #146
Labels
bug
Something isn't working
Comments
Suggested fix, change static fields such as |
I bumped into a very similar error case, with an almost identical stacktrace, just with the
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Unexpected exception while wrapping header in
HTTP 1.1
response for404 not found
due to streamRESET
.To Reproduce
Steps to reproduce the behavior:
http.echo
examplezilla.json
, changehttp_server0
exit to"none"
echo "Hello, world" > /tmp/postfile
ab -v 4 -n 20 -c 20 -p /tmp/postfile -T "text/plain" -m "POST" http://localhost:8080/
to trigger bugExpected behavior
Zilla should not trigger an exception.
Additional context
This is triggered because when stream
RESET
occurs, in this case due toexit
binding not found, we automatically send a404 not found response
, based on static fieldHEADERS_404_NOT_FOUND
inHttpServerFactory
.During encode, the
HTTP 1.1
server factory uses thematchFirst
method on the headers, which mutates the internal header item flyweight, causing a race condition across threads.Note: this bug no longer reproduces when
zilla
is configured viastack.yml
to use one thread only, via-w 1
command line argument which sets workers to 1.The text was updated successfully, but these errors were encountered: