Bug in program, bug in documentation, or something else?
A Tunnelblick user has reported odd behavior with name resolution failures. I can't tell if it is a bug in OpenVPN, a bug in the documentation, or something else. The behavior is apparently the same in OpenVPN 2.2.1 and 2.3alpha1.
The 2.3 man page says:
Quoted 6 lines
--resolv-retry n
If hostname resolve fails for --remote, retry resolve for n seconds
before failing.
Set n to "infinite" to retry indefinitely.
By default, --resolv-retry infinite is enabled. You can disable by
setting n=0.
But the behavior seems very different:
If a name resolution failure (caused, for example, by losing the network connection) occurs
and --resolv-retry is:
1, the first resolution failure terminates the connection; 5, resolution attempts are made dozens of times per second, seemingly forever; or
10, resolution attempts are made every five seconds, seemingly forever.
Any ideas if this is a program bug, a documentation bug, or something else, for example, a problem that only occurs on OS X?
This sounds like a Tunnelblick failure. I'd suggest checking with them first, they do all sorts of things with scripts and such.
Cheers
-----
Eric F Crist
Quoted 25 lines · Jonathan K. Bullard
A Tunnelblick user has reported odd behavior with name resolution failures. I can't tell if it is a bug in OpenVPN, a bug in the documentation, or something else. The behavior is apparently the same in OpenVPN 2.2.1 and 2.3alpha1.
The 2.3 man page says:
--resolv-retry n
If hostname resolve fails for --remote, retry resolve for n seconds before failing. Set n to "infinite" to retry indefinitely.
By default, --resolv-retry infinite is enabled. You can disable by setting n=0.But the behavior seems very different:
If a name resolution failure (caused, for example, by losing the network connection) occurs and --resolv-retry is:
1, the first resolution failure terminates the connection;
5, resolution attempts are made dozens of times per second, seemingly forever; or 10, resolution attempts are made every five seconds, seemingly forever.Any ideas if this is a program bug, a documentation bug, or something else, for example, a problem that only occurs on OS X?
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Quoted 3 lines · Eric Crist
This sounds like a Tunnelblick failure. I'd suggest checking with them first, they do all sorts of things with scripts and such.
Thanks, but *I'm* the current Tunnelblick developer!
You're correct that Tunnelblick does a lot in its scripts, but as far as I can tell, this behavior has nothing to do with the scripts or Tunnelblick.
It has to do with what OpenVPN does -- the Tunnelblick scripts are not involved. The behavior takes place completely within OpenVPN.
Well, I guess that puts a stopper in my attempt to pass the buck!
-----
Eric F Crist
Quoted 9 lines · Jonathan K. Bullard
On Sun, Oct 21, 2012 at 7:03 PM, Eric Crist wrote:
This sounds like a Tunnelblick failure. I'd suggest checking with them first, they do all sorts of things with scripts and such.Thanks, but I'm the current Tunnelblick developer!
You're correct that Tunnelblick does a lot in its scripts, but as far as I can tell, this behavior has nothing to do with the scripts or Tunnelblick.
It has to do with what OpenVPN does -- the Tunnelblick scripts are not involved. The behavior takes place completely within OpenVPN.
Hi Jonathan,
Quoted 4 lines · Jonathan K. Bullard
A Tunnelblick user has reported odd behavior with name resolution failures. I can't tell if it is a bug in OpenVPN, a bug in the documentation, or something else. The behavior is apparently the same in OpenVPN 2.2.1 and 2.3alpha1.
[..]
Quoted 2 lines
Any ideas if this is a program bug, a documentation bug, or something else, for example, a problem that only occurs on OS X?
"One of those" :-) - I don't know yet, and haven't looked into the code yet (will do ASAP).
The resolver code has been changed for 2.2 (getting rid of the old randomization stuff), so it might be a bug introduced there, or a much older bug that nobody ever noticed.
Do you have an OpenVPN log that shows this behaviour? Might help in digging down to it...
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...Quoted 14 lines · Gert Doering
Hi Jonathan,
Quoted 4 lines · Jonathan K. Bullard
A Tunnelblick user has reported odd behavior with name resolution failures. I can't tell if it is a bug in OpenVPN, a bug in the documentation, or something else. The behavior is apparently the same in OpenVPN 2.2.1 and 2.3alpha1.
[..]
Quoted 2 lines
Any ideas if this is a program bug, a documentation bug, or something else, for example, a problem that only occurs on OS X?
"One of those" :-) - I don't know yet, and haven't looked into the code yet (will do ASAP).
Quoted 6 lines
The resolver code has been changed for 2.2 (getting rid of the old randomization stuff), so it might be a bug introduced there, or a much older bug that nobody ever noticed.
Do you have an OpenVPN log that shows this behaviour? Might help in digging down to it...
A client config file would help in addition. I'm also wondering if connection profiles are used ... that is, more --remote options or <connection> blocks.
Otherwise, I would not be surprised if there are some corner case here appearing, which surfaced more easily when the resolving code was re-written (as Gert mentioned).
This resolver_retry_second option is only used in socket.c AFAICT, which most of us try to avoid looking too hard on, to avoid eye cancer and/or loosing our sanity ;-) But there's work in progress on cleaning up that one, unfortunately that will take some time. But we'll try to hunt down this which looks like an openvpn bug to me.
kind regards,
David Sommerseth
Thanks to all of you for your replies.
The consensus seems to be that the documentation is correct, and that if OpenVPN behaves differently then that is a bug.
I'll try to get the user's configs/logs, or try to generate some test cases that show this myself (and include a 2.1... test case to see if this behavior was introduced in 2.2) and post them on this thread.
Quoted 45 lines · David Sommerseth
Quoted 4 lines · Gert Doering
Hi Jonathan,
Quoted 1 line · Jonathan K. Bullard
A Tunnelblick user has reported odd behavior with name resolution
failures.
Quoted 5 lines
Quoted 3 lines
I can't tell if it is a bug in OpenVPN, a bug in the documentation, or something else. The behavior is apparently the same in OpenVPN 2.2.1 and 2.3alpha1.
[..]
Quoted 1 line
Any ideas if this is a program bug, a documentation bug, or something
else,
Quoted 3 lines
Quoted 1 line
for example, a problem that only occurs on OS X?
"One of those" :-) - I don't know yet, and haven't looked into the code
yet
Quoted 8 lines
(will do ASAP).
The resolver code has been changed for 2.2 (getting rid of the old randomization stuff), so it might be a bug introduced there, or a much older bug that nobody ever noticed.
Do you have an OpenVPN log that shows this behaviour? Might help in digging down to it...
A client config file would help in addition. I'm also wondering if connection profiles are used ... that is, more --remote options or <connection> blocks.
Otherwise, I would not be surprised if there are some corner case here appearing, which surfaced more easily when the resolving code was re-written (as Gert mentioned).
This
resolver_retry_secondoption is only used insocket.cAFAICT, which most of us try to avoid looking too hard on, to avoid eye cancer and/or loosing our sanity ;-) But there's work in progress on cleaning up that one, unfortunately that will take some time. But we'll try to hunt down this which looks like an openvpn bug to me.kind regards,
David Sommerseth
Am 22.10.12 00:40, schrieb Jonathan K. Bullard:
Quoted 28 lines
A Tunnelblick user has reported odd behavior with name resolution failures. I can't tell if it is a bug in OpenVPN, a bug in the documentation, or something else. The behavior is apparently the same in OpenVPN 2.2.1 and 2.3alpha1.
The 2.3 man page says:
--resolv-retry n
If hostname resolve fails for --remote, retry resolve for n
seconds before failing.
Set n to "infinite" to retry indefinitely.
By default, --resolv-retry infinite is enabled. You can
disable by setting n=0.But the behavior seems very different:
If a name resolution failure (caused, for example, by losing the network connection) occurs
and --resolv-retry is:1, the first resolution failure terminates the connection; 5, resolution attempts are made dozens of times per second, seemingly forever; or
10, resolution attempts are made every five seconds, seemingly forever.
Quoted 2 lines
Any ideas if this is a program bug, a documentation bug, or something else, for example, a problem that only occurs on OS X?
I guess a programming bug.
The number of retries for a resolv is defined as (fail_wait_interval is fixed to 5):
int resolve_retries = (flags & GETADDR_TRY_ONCE) ? 1 :
(resolve_retry_seconds / fail_wait_interval);
so if resolv-retry < 5 resolve_retries is set to 0 giving you a direct failure. Without trying you should then see a USR1 and openvpn will directly do the next connection attempt without waiting the 5s delay.
On a quick glance I cannot see a way to tell openvpn to have a fixed number of connection retries after it quits.
Arne