You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 19, 2022. It is now read-only.
GetExtendedTcpTable() sometimes miserably fails and returns 0xc0000001 (NT status generic error)
(This prevents a command from being launched when this occurs.)
I must find a workaround to mitigate the effect of such failures. Calling GetExtendedTcpTable() again in a loop in this case is not efficient enough (I still have some failures after 5 retries...)
The text was updated successfully, but these errors were encountered:
It actually mainly do retry in a loop (for at most 5 times) but it seems that failures might be more common when launching cygwin processes and/or launching outbash.exe from within VS IDE. Also it comes with exp increase of buffer size (to amortize worst case complexity) and a buffer size of 8 extra bytes (as in the SIZEOF_TCPTABLE_OWNER_PID macro of the SDK)
I did some other attempts with other or less changes, and they did not work. (It was: avoiding reentrancy of GetExtendedTcpTable() with a mutex at various levels, only 8 extra bytes for alloc, and only using exp increase of buffer size.)
When tested in standalone (launched without VS IDE) in a loop with four client caller threads each launching 200 non-cygwin processes as fast as possible, 9 seconds of relaxation, tasklist and taskkill, keeping the test running for dozens of hours, I was not able to get a single 0xc0000001 failure not mitigated by the retry loop in version 8ca3301 -- even when trying to also simultaneously load the system by other means.
So I ship this mitigation. I keep this issue open for now for ref; the error message in case the mitigation is not enough is: outbash: CConnection::run() exception: GetExtendedTcpTable: unknown error
GetExtendedTcpTable() sometimes miserably fails and returns 0xc0000001 (NT status generic error)
(This prevents a command from being launched when this occurs.)
I must find a workaround to mitigate the effect of such failures. Calling GetExtendedTcpTable() again in a loop in this case is not efficient enough (I still have some failures after 5 retries...)
The text was updated successfully, but these errors were encountered: