Opened 9 years ago
Closed 9 years ago
#315 closed Bug / Defect (fixed)
OpenVPN gets killed after Remote Desktop session disconnect
Reported by: | dupondje | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Generic / unclassified | Version: | OpenVPN 2.3.2 (Community Ed) |
Severity: | Not set (select this one, unless your'e a OpenVPN developer) | Keywords: | RDP Remote Desktop OpenVPN |
Cc: |
Description
Hi,
Since I installed 2.3.2 I had some weird disconnections of OpenVPN.
After some debugging, I noticed the disconnect was at the same moment as I disconnected (not logoff!) my Remote Desktop connection to the computer running openvpn.
After some more testing, it seems like the following commit is the cause of it:
http://openvpn.git.sourceforge.net/git/gitweb.cgi?p=openvpn/openvpn-testing.git;a=commit;h=93ec740f94867e10980c8a87bd3c2a037b221f31
I did a rebuild of OpenVPN 2.3.2 without that patch, and then everything is working normally again (aka OpenVPN keeps running).
How to simulate:
1) Start a OpenVPN connection on Computer A
2) On Computer B you connect to A with remote desktop client
3) While connected, the OpenVPN session is still running
4) Close the RDP connection
5) You now notice the OpenVPN connection is also disconnected ...
Hopefully this can be fixed :)
Change History (6)
comment:1 Changed 9 years ago by
Version: | git master branch → 2.3.2 |
---|
comment:2 Changed 9 years ago by
comment:3 Changed 9 years ago by
Seems like my test was invalid.
I tried 2.3.1 before my test to see if everything was working with the 2.3.1 version.
I only replaced openvpn.exe afterwards, so I was still using the 2.3.1 openvpn-gui.exe.
I now tried the same with 2.3.2 openvpn-gui.exe, and it still gives the same issue.
So the issue must be somewhere in the openvpn-gui.exe.
comment:4 Changed 9 years ago by
Ok did some more debugging now, and it seems to be caused by the following commit in openvpn-gui:
http://sourceforge.net/p/openvpn-gui/code/ci/47cff8747762cdecaced5045daf6855c654ad7a0/
Removing the following block fixes the issue:
+
+ case WM_WTSSESSION_CHANGE:
+ switch (wParam) {
+ case WTS_SESSION_LOCK:
+ o.session_locked = TRUE;
+ break;
+ case WTS_SESSION_UNLOCK:
+ o.session_locked = FALSE;
+ if (CountConnState?(suspended) != 0)
+ ResumeConnections?();
+ break;
+ }
comment:5 Changed 9 years ago by
Just pushed a fix to the GUI repository: http://sf.net/p/openvpn-gui/code/ci/10c18fae
Samuli will update the installer by the end of the week.
Thanks for reporting this.
comment:6 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Here's a brief update after a bit of quick testing I had time for today. I was able to reproduce this issue on my Vista x64 system as described. However, the issue is not present when initiating the openvpn connection from the console. The OpenVPN-GUI is somehow related to this issue, but I haven't yet had time to dig into why.
Info useful to devs will be looking at what calls to openvpn_execve() are different between invocations, and why a SIGTERM gets sent to the process in that case but not the launch-from-console-in-RDP-session case. I'll see if I have more time for this in the next few days, but other info is welcome to figure out what's going on.