[problem] Zoneminder several crash

Forum for questions and support relating to the 1.30.x releases only.
vox

[problem] Zoneminder several crash

Post by vox »

System : ubuntu 16.04
ZM version : 1.30.4
DataBase : mariadb 10.2 + galera 3 (cluster)
Bug : several crash

First, i have try to re-installs and reboots, it's change nothing.
In my log i can watch some informations about "Segmentation fault". I edit my post after for add screenshot and more informations.
Actually for it's work i need start ZM via cron all 15 seconds and that add some problems on my machine (reboot really bug).
screenshot-2017_11_07-Zoneminder-Bug-Several_Crash-Demo-Continuous_record_have_bug.png
screenshot-2017_11_07-Zoneminder-Bug-Several_Crash-Demo-Continuous_record_have_bug.png (52.74 KiB) Viewed 8440 times
screenshot-2017_11_07-Zoneminder-Bug-Several_Crash-Demo-Logs.png
screenshot-2017_11_07-Zoneminder-Bug-Several_Crash-Demo-Logs.png (126.99 KiB) Viewed 8441 times
screenshot-2017_11_07-Zoneminder-Bug-Several_Crash-Demo-Logs2.png
screenshot-2017_11_07-Zoneminder-Bug-Several_Crash-Demo-Logs2.png (217.37 KiB) Viewed 8436 times
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: [problem] Zoneminder several crash

Post by bbunge »

With the numbe of cameras you have it may be possoble you are running out of memory, tmpfs. Reduce the resolution and frame rate on your cameras. Also check the WIKI for the install instructions to see if you missed something.
vox

Re: [problem] Zoneminder several crash

Post by vox »

Many thanks for your helping @bbunge
bbunge wrote: Wed Nov 08, 2017 2:38 am With the numbe of cameras you have it may be possoble you are running out of memory, tmpfs. Reduce the resolution and frame rate on your cameras.
Ok i try : i have stop 3 cams and decreases the quality of the main cam.
I test during some hours and post a new message with fresh informations from the battleground :)
bbunge wrote: Wed Nov 08, 2017 2:38 am Also check the WIKI for the install instructions to see if you missed something.
Hmmm it's my 3th install (on the same machine after reset) and the last install do not have this bug with full FPS and HD. But it's my first in Multi-Server mod with Database clustering.
All my installation procedure is indicated here in french : [Tuto/HowTo] Installer zoneminder sur ubuntu 16.04, [Tuto/HowTo] [Ubuntu] système distribué de caméra vidéos surveillance and [EN] [Tuto/HowTo] ZoneMinder Optimizations
I have this bug too on this install when i have only two cameras.
Some times when i change the config of one camera and save, ZoneMinder crash.


Sorry for my not terrible english.
vox

Re: [problem] Zoneminder several crash

Post by vox »

This post receive edit during the day.

Logs after a crash with 2 cams (1 in Modect and 1 in Mocord). On my last ZM install this config don't have this bug.
screenshot-2017_11_08-ZoneMinder-Logs-Crash_at_15h03_With_1cam_Modect_and_1cam_Mocord.png
screenshot-2017_11_08-ZoneMinder-Logs-Crash_at_15h03_With_1cam_Modect_and_1cam_Mocord.png (76.01 KiB) Viewed 8412 times
With this config (1 cam modect + 1 cam mocord) the bug is not solved
  • creenshot-2017_11_08-Zoneminder-Bug-Several_Crash-Demo-Continuous_record_have_bug-mocord.png
    creenshot-2017_11_08-Zoneminder-Bug-Several_Crash-Demo-Continuous_record_have_bug-mocord.png (45.76 KiB) Viewed 8403 times
Last edited by vox on Wed Nov 08, 2017 5:32 pm, edited 1 time in total.
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: [problem] Zoneminder several crash

Post by bbunge »

Couol be the multi server mode.
Your English is better than my Francais!
vox

Re: [problem] Zoneminder several crash

Post by vox »

Please anybody for help me to search how to solve these really boring crash :(
osk
Posts: 9
Joined: Mon Nov 13, 2017 1:19 pm

Re: [problem] Zoneminder several crash

Post by osk »

Hi

I had a lot of errors similar what you have, like "zmc -m 4' has not stopped at 17/10/15 07:15:09. Sending KILL to pid 10474" or "'zma -m 2' exited abnormally, exit status 255]". Root cause for these errors was missing keepalive message in REMOTE RTSP protocol.

I manually forced keepalive messages by altering the code in zm_rtsp.cpp:

Line 365 in zm_rtsp.cpp
-- bool sendKeepalive = false;
++ bool sendKeepalive = true;

Line 508 in zm_rtsp.cpp
-- int timeout = 0;
++ int timeout = 60;

This change made the trick and now all my cameras have been now working over a week without any jamming.

I think that ZoneMinder monitor configuration should have an option to force keepalive message sending. Most likely my cameras are not the only ones needing keepalive messages...

Cheers
osk
vox

Re: [problem] Zoneminder several crash

Post by vox »

do you have the path for modify the file please? :)
osk
Posts: 9
Joined: Mon Nov 13, 2017 1:19 pm

Re: [problem] Zoneminder several crash

Post by osk »

vox wrote: Tue Nov 14, 2017 2:19 pm do you have the path for modify the file please? :)
here are all the steps I made to fix this error (Ubuntu 17.10):

Get build dependencies

Code: Select all

sudo apt build-dep zoneminder
Get ZoneMinder sources (To be able to get the sources you have to enable "Source Code" selection in "Software & Updates")

Code: Select all

apt source zoneminder
Fix the build error in zoneminder-1.30.4+dfsg/src/zm_comms.h by adding line

Code: Select all

#include <sys/uio.h>
Edit zoneminder-1.30.4+dfsg/src/zm_rtsp.cpp:
Line 365 in zm_rtsp.cpp
-- bool sendKeepalive = false;
++ bool sendKeepalive = true;

Line 508 in zm_rtsp.cpp
-- int timeout = 0;
++ int timeout = 60;


Compile sources

Code: Select all

apt-get --compile source zoneminder
Install compiled version

Code: Select all

sudo dpkg -i zoneminder_1.30.4+dfsg-2_amd64.deb
Cheers
osk
vox

Re: [problem] Zoneminder several crash

Post by vox »

osk wrote: Tue Nov 14, 2017 7:14 pm
vox wrote: Tue Nov 14, 2017 2:19 pm do you have the path for modify the file please? :)
here are all the steps I made to fix this error (Ubuntu 17.10):

Cheers
osk
Really thanks Osk, i try tomorrow and post if it's working or not :)
With this method, what hapenning to zoneminder if i apt-get dist-upgrade ?
apt source zoneminder => that download in the current folder of the shell session? :)
osk
Posts: 9
Joined: Mon Nov 13, 2017 1:19 pm

Re: [problem] Zoneminder several crash

Post by osk »

vox wrote: Tue Nov 14, 2017 8:26 pm With this method, what hapenning to zoneminder if i apt-get dist-upgrade ?
Well, my zomenider build last week was the first time I ever built something from sources, so I am not an expert here...

I suppose that apt dist-upgrade and even apt upgrade will replace the self-built zoneminder with distribution's original version unless you remove the default zoneminder package with apt remove.
vox wrote: Tue Nov 14, 2017 8:26 pm apt source zoneminder => that download in the current folder of the shell session? :)
Yes, it downloads the sources to current directory. I used instructions from this page when I built zoneminder: https://askubuntu.com/questions/28372/h ... gh-apt-get

Cheers
osk
vox

Re: [problem] Zoneminder several crash

Post by vox »

Code: Select all

sudo apt build-dep zoneminder
and

Code: Select all

apt source zoneminder
said : "You must insert some "source" addresses into your sources."

and theses instruction at the command "./do_debian_package.sh `lsb_release -a 2>/dev/null | grep Codename | awk '{print $2}'` `date +%Y%m%d`01 local stable" respond "Unknown option xenial, continue? (Y|n)n".
osk
Posts: 9
Joined: Mon Nov 13, 2017 1:19 pm

Re: [problem] Zoneminder several crash

Post by osk »

vox wrote: Wed Nov 15, 2017 1:00 pm said : "You must insert some "source" addresses into your sources."
Run application "Software & Updates" and tick box "Source Code",

Cheers
osk
vox

Re: [problem] Zoneminder several crash

Post by vox »

it's a server without GUI, command line only ^ ^
osk
Posts: 9
Joined: Mon Nov 13, 2017 1:19 pm

Re: [problem] Zoneminder several crash

Post by osk »

If you're running it from command line, the the application name is software-properties-gtk

Image
Locked