Bug#158404: openvpn: Improper error handling
A message that is not in the archive (sent off-list or not yet received): [email protected]...
Quoted 17 lines · Richard A Nelson
Quoted 1 line · James Yonan
Hello Richard,
Hi, thanks for the quick feedback
Quoted 1 line
Normally we shouldn't get EAGAIN in the UDP read loop because we block on select and don't call recvfrom until there is a datagram waiting for us. So the fact that you are getting a lot of EAGAIN messages is interesting and probably indicative of some kind of problem. Is there any correlation between the EAGAIN floods and some sort of real world factor such as a bad or congested network condition?
Its hard to reproduce, but congestion is definitely a possiblity
Quoted 1 line
If EAGAIN is received from recvfrom (or any other error for that matter), it is syslogged and the select event loop continues. So your potential solutions 1 and 2 below are already being done. Solution 3 doesn't work because OpenVPN is too asynchronous to be able to block on a single i/o call. That's why we use select instead.
I thought that #3 might be out of the question, and I'm glad to know that the IO is indeed retried
Quoted 1 line
Also, floods of non-fatal error returns from recvfrom are generally logged for informational purposes, but can be controlled by the --mute option so as not to clog up the log files.
Quoted 7 lines
I'll keep that in mind, but for now I think I'll keep the verbosity to help in tracking
Quoted 1 line
You also mention that sometimes the session drops. What do you mean? Does OpenVPN crash or exit? Does it try to renegotiate? Does the tunnel die for a while and then come back? What kind of encryption mode are you running in (Static Key, TLS, or cleartext)?
The tunnel seems to survive, but any open telnet/ssh/etc. session over it timeout and die.
Unfortunately, OpenVPN doesn't have control over the timeouts of application protocols that run over the tunnel.
So if there's a network outage, though OpenVPN will almost certainly recover when the network comes up, applications with connections on the tunnel may time out.
Quoted 13 lines
For now, I'm using a static key, but would like to move to certificates.
Quoted 1 line
Since I don't know how to reproduce this, I'll need more details.
It happens here every other day or so, I'll be glad to provide any information I can.
Signature · 3 lines
Rick Nelson I can saw a woman in two, but you won't want to look in the box when I do 'For My Next Trick I'll Need a Volunteer' -- Warren Zevon
James