Open willgraf opened 3 years ago
Thanks for the report!
I spent a bit of time poking at this tonight. I'm not too familiar with this part of treq, but I am pretty sure that there is a reentrancy issue in MultipartProducer
. There are a number of places where it does multiple writes to the consumer without checking if it has been paused. I've no doubt that this is a bug in treq, but I'll need to spend some more time on this before I'm confident in my diagnosis or how to fix it.
To be clear, I'm not sure when I'll get back to this. If you need a fix for this urgently I suggest that you take a crack at it yourself.
Below is a minimal example. Large file uploads are failing on TLS servers while smaller file uploads work as expected. This could be a duplicate of #185, but I'm seeing a different stack trace. (Originally from vanvalenlab/kiosk-client#59)
The stack trace:
My environment: