Sourceware Bugzilla – Bug 5379
sunrpc: Fix hangs in UDP RPC calls
Last modified: 2013-10-08 16:36:32 UTC
clntudp_call() does not properly implement re-poll()ing in case the poll() has
Created attachment 2102 [details]
The patch is not correct. It goes to the extreme other side. Now a few signals
sent in short succession can cause the total timeout time to be far too short.
To fix this it will be necessary to measure how long the poll calls slept and
adjust the total time to this.
Created attachment 2993 [details]
Here's a different patch for the same bug. This deducts time spent in poll(2)
for each EINTR and reduces the timeout for the subsequent calls to poll(2).
Warning: This patch should compile but I don't have the ability to test it.
Caveats: No way to distinguish the time spent in the signal handler that
interrupted poll(2) from time actually spent polling.
Created attachment 2994 [details]
Updated patch to use larger integer type to store milliseconds.
Now last hunk of patch does not apply. Could you sent updated patch to libc-alpha?