auth-script-openvpn icon indicating copy to clipboard operation
auth-script-openvpn copied to clipboard

Zombie processes after calling auth script

Open jakew009 opened this issue 5 years ago • 1 comments

We have a weird issue whereby every time a new client joins the VPN and the auth script is called, a zombie process is created that never goes away and eventually, the zombie processes eat up all the resources on the server.

The zombie processes look this this:

$ ps -aux | grep defunct
root      1789  0.0  0.0      0     0 ?        Zs   14:46   0:00 [ruby] <defunct>
root      1859  0.0  0.0      0     0 ?        Zs   15:46   0:00 [ruby] <defunct>
root      1939  0.8  0.0      0     0 ?        Zs   16:25   0:00 [ruby] <defunct>
root      1944  1.7  0.0      0     0 ?        Zs   16:25   0:00 [ruby] <defunct>

And their parent process ID's are the main OpenVPN process.

The Ruby script we are using to do the authentication is very similar to the example script in this project.

Anyone have any ideas how to get rid of these zombies?

Running Ubuntu 18.04 and OpenVPN 2.4.7 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on May 5 2019

jakew009 avatar Jan 28 '20 16:01 jakew009

So for anyone else experiencing this, we discovered it only happened when we were running OpenVPN in a Docker container. Move it out of the container and the zombie processes went away...

We don't really have time to dig into it currently but may do in the future.

jakew009 avatar Feb 10 '20 18:02 jakew009