Page 1 of 1

"Zombie" zms Processes

Posted: Mon Jun 16, 2014 7:36 pm
by dvarapala
I am running 1.26.5 on a Fedora 18 Linux box and have run into an issue. The problem is that sometimes the video stream connection does not terminate properly; if I am viewing a video stream and close the browser window (or click the "Close" link on the page), the underlying TCP connection remains open and the zms process on the server continues to run and send video frames across the network. This occurs even if I terminate ALL instances of the browser on the Windows machine (verified using Task Manager). My understanding is that Windows should immediately shut down the TCP connection once the browser process terminates, but for some unknown reason that doesn't always happen; instead, Windows continues to accept packets on the connection indefinitely. When this problem occurs, the zms process on the server still sees the connection as open and will continue to stream video until either the Windows machine is powered down or the zms process is killed (manually, from the command shell). When reviewing surveillance events it's not uncommon to accumulate a dozen or more of these "zombie" zms processes; if I don't log on to the ZoneMinder server machine via SSH and kill these processes manually they will continue to run indefinitely, consuming disk and network I/O bandwidth and bogging down the rest of the system.

Once in the failed state, running netstat on the Windows machine shows the TCP connection is in the FIN_WAIT_2 state. A Wireshark capture shows that the Windows machine is still acknowledging segments on the connection even though there is no longer a running process receiving that data.

I have 3 Windows machines: One desktop running Windows 7 Pro SP1, one desktop running Win 7 Home Premium SP1, and one laptop running Win 7 Home Premium SP1. Of these three, the two desktop machines exhibit the problem intermittently, whereas the laptop never exhibits the problem.

I normally use the Firefox browser, but I also tried Chrome. Both work 100% on the laptop and fail intermittently on the desktops. Using Firefox and Chrome on other platforms that I have tried, such as Linux and Android, never exhibit the problem.

One of the Windows machines that fails is connected to the same gigabit switch as the ZoneMinder server box; the Windows laptop that always works is connected to a WiFi AP and reaches the ZoneMinder server through a second GigE switch. The Android devices connect both from inside and from outside beyond the firewall with no issues.

To eliminate the possibility of a network driver issue, on one of the desktop machines I tried swapping out Realtek network card with an Intel NIC, but the failure still occurs.

Any ideas on how can I troubleshoot this further?