Opened 4 years ago

Closed 4 years ago

#1203 closed Bug / Defect (fixed)

OpenVPN-GUI hangs if openvpn --version exits abnormally

Reported by: Selva Nair Owned by: Selva Nair
Priority: minor Milestone:
Component: Windows GUI Version:
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:


The GUI runs openvpn.exe --version at startup, and reads its stdout to determine the version of the latter. If, for some reason, openvpn.exe terminates without writing to its stdout, the GUI just hangs waiting for input.

Expected behaviour: When the writing end closes, ReadFile() on the pipe should return false with error set to ERROR_BROKEN_PIPE.

To reproduce, have an openvpn.exe that errors due to a missing or mismatched dll, for example. It is known that CreateProcess() can still succeed as it returns before the child is fully up. So, the GUI proceeds to read the spawned process's stdout and gets stuck there.

Not critical as this can't happen unless the user messes up with the installation, but documenting here as there is definitely a bug somewhere.

Change History (3)

comment:1 Changed 4 years ago by tct


comment:2 Changed 4 years ago by Selva Nair

On further look, this is due some pipe handles kept open. PR304 should fix it.

comment:3 Changed 4 years ago by Selva Nair

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.