iproto: make sure throttled connections are woken up
If a message arrives when there is no output for the connection and the IPROTO_MSG_MAX limit is hit, the input will never be processed unless the other end writes more data to the socket. To make sure a throttled connection will be woken up eventually when the number of pending requests drops below IPROTO_MSG_MAX, let's link all throttled connections in a list and wake the oldest element from it whenever a messages is freed. The issue was initially attempted to be fixed by commit 52b47951 ("Don't stop connection if there is no pending requests") by allowing to exceed the IPROTO_MSG_MAX limit. That commit, however, introduced the possibility of a deadlock due to depleting the fiber pool, which was "resolved" by commit 9492cddb ("iproto: fix IPROTO_MSG_MAX check") while reintroducing the original issue. Patch by Vladimir Davydov
Loading
Please register or sign in to comment