return wrong data when using http2
|Reported by:||Owned by:|
|Keywords:||http2, race condition, multiple streams||Cc:|
|uname -a:||Linux hostname 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u1 (2015-12-14) x86_64 GNU/Linux|
nginx version: nginx/1.9.10
built by gcc 4.9.2 (Debian 4.9.2-10)
built with OpenSSL 1.0.2e 3 Dec 2015
TLS SNI support enabled
configure arguments: --with-http_geoip_module --with-http_secure_link_module --with-http_ssl_module --with-http_v2_module
When using multiple http2 streams with tcp_nodelay turned on, with multiple workers and without debug log enabled the connection sometimes dies and client has to reconnect again. After that it fails to negotiate http2 and receives wrong data. This happens approximately for one third of all requests. We were not able to replicate this with tcp_nodelay turned off or when using just one worker. The bug also goes away after enabling debug log (logging at level debug). In a high performance environment these solutions can not be used even as a hotfix.
Unfortunately I am unable to attach a debug log from a situation when the bug occurs, as it does not happen under such conditions. If you need anything else to replicate & debug this please let me know.