Open hnakamur opened 8 months ago
I found this issue is reproducible in 9.2.3 or 10.0.x.
Also I did another experiment with a debug log added:.
In https://github.com/hnakamur/ats-nginx-bad-request/blob/ats-submodule/tcpdump-nginx-2b.log, ATS sent request body of length 344 as opposed to Content-Length: 1024 request header.
I found reader_start_offset (_ua.get_txn()->get_remote_reader()->start_offset
) is always 3752
when written partial body length is 344
in start_offset.log.
$ grep -c num_body_bytes=344, start_offset.log
64
$ grep num_body_bytes=344, start_offset.log | grep -c -v reader_start_offset=3752
0
I noticed the sum of 3752
and 344
is 4096 (4KiB).
$ echo '3752 + 344' | bc
4096
I still don't have a clue why this issue happens.
During my experiments involving the sending of numerous requests with a 1KiB body, I have observed that ATS occasionally fails to transmit the complete request body to the upstream server.
I have provided a reproducible case of this issue on GitHub: https://github.com/hnakamur/ats-nginx-bad-request/tree/enable_debug_log
Additionally, log files and TCP dump outputs have been included within the repository to facilitate further analysis.
In contrast to the expected
Content-Length: 1024
request header, as shown in this specific log, ATS only transmits 344 bytes of the body.Your assistance in investigating this matter further would be greatly appreciated.
Thank you.