Opened 8 years ago

Closed 7 years ago

#891 closed defect (worksforme)

return wrong data when using http2

Reported by: nzt4567@… Owned by:
Priority: major Milestone:
Component: nginx-core Version: 1.9.x
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 -V: 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

Description

Hi,

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.

Attachments (5)

curl_version.txt (403 bytes ) - added by nzt4567@… 8 years ago.
curl version
curl_command.txt (211 bytes ) - added by nzt4567@… 8 years ago.
curl command that causes the bug to happen
nginx.conf (1.8 KB ) - added by nzt4567@… 8 years ago.
nginx configuration
curl_with_bug.txt (4.0 KB ) - added by nzt4567@… 8 years ago.
curl output when the bug occurs
curl_without_bug.txt (3.5 KB ) - added by nzt4567@… 8 years ago.
curl output when the bug does not occur

Download all attachments as: .zip

Change History (6)

by nzt4567@…, 8 years ago

Attachment: curl_version.txt added

curl version

by nzt4567@…, 8 years ago

Attachment: curl_command.txt added

curl command that causes the bug to happen

by nzt4567@…, 8 years ago

Attachment: nginx.conf added

nginx configuration

by nzt4567@…, 8 years ago

Attachment: curl_with_bug.txt added

curl output when the bug occurs

by nzt4567@…, 8 years ago

Attachment: curl_without_bug.txt added

curl output when the bug does not occur

comment:1 by Maxim Dounin, 7 years ago

Resolution: worksforme
Status: newclosed

Failed to reproduce it, even using exactly the same nginx version and OpenSSL library. Might be a result of local patches (see #934) or an already fixed bug in curl.

Note: See TracTickets for help on using tickets.