I have a situation where an application is listening on a TCP port and every once in a while, as seen in tcp dumps, gets its Receiving Window (RWIN) set to zero. When this happens, its Recv-Q stops moving (because the sender stop sending) and the application thread listening on the connection/port just hangs. In WireShark, I see "ZeroWindow" states being produced, which happens when RWIN is set to 0 (a Window of size 0).
I'm trying to determine whether my application, which uses many open source libraries full of mysterious code, is manually setting it's connection's RWIN = 0, or if this is happening at the OS layer. If its the application, I have access to all the source code and with some hard work can properly debug it.
But if its the OS that says "hey, there is something wrong with this connection, setting RWIN to 0..." then I haven't a clue as to how to go about diagnosing. Any thoughts? Thanks in advance!