Event/recording breaks with: "zmwatch: Restarting capture daemon xxxxx"

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
sandnabba
Posts: 2
Joined: Wed Aug 04, 2021 7:05 pm

Event/recording breaks with: "zmwatch: Restarting capture daemon xxxxx"

Post by sandnabba »

Hi everyone!

Just trying out Zoneminder as a replacement for the now discontinued Unifi Video. Everything seems to work fine, except that some events, sometimes just breaks in the middle of a recording (and the next minute of the event is lost).

Here is an example:
Screenshot_20210819_233144.jpg
Screenshot_20210819_233144.jpg (272.85 KiB) Viewed 1215 times
As you can see in the screenshot, the video is still in an alarm state, when it suddenly stops.

Here is the log for this particular event:

Code: Select all

"2021-08-19 23:05:26",zmwatch,,16479,ERR,"Memory map file '/dev/shm/zm.mmap.1' does not exist in zmMemAttach.  zmc might not be running.",zmwatch.pl,'-
"2021-08-19 23:05:25",zmdc,,16389,INF,"Starting pending process, zmc -m 1",zmdc.pl,'-
"2021-08-19 23:05:23",zmdc,,16389,INF,"'zmc -m 1' exited normally",zmdc.pl,'-
"2021-08-19 23:05:15",zmdc,,16389,INF,"'zmc -m 1' sending stop to pid 158134 at 21/08/19 23:05:15",zmdc.pl,'-
"2021-08-19 23:05:13",zmwatch,,16479,WAR,"Restarting capture daemon for Garageuppfart, time since last capture 48 seconds (1629407113-1629407065)",zmwatch.pl,'-
"2021-08-19 23:05:12",zmc_m1,,158137,INF,"Garageuppfart: 422 - Gone back into alarm state",zm_monitor.cpp,2127
"2021-08-19 23:05:12",zmc_m1,,158137,INF,"Garageuppfart: 422 - Alarmed frame while in alert state. Consecutive alarmed frames left to return to alarm state: 000",zm_monitor.cpp,2124
"2021-08-19 23:05:11",zmc_m1,,158137,INF,"Garageuppfart: 400 - Analysing at 2.33 fps from 399 - 299=100 / 1629407111.559795 - 1629407068.570872 = 42.988923",zm_monitor.cpp,1704
"2021-08-19 23:05:08",zmc_m1,,158134,INF,"Garageuppfart: 800 - Capturing at 10.00 fps, capturing bandwidth 891893bytes/sec",zm_monitor.cpp,1663
"2021-08-19 23:04:58",zmc_m1,,158134,INF,"Garageuppfart: 700 - Capturing at 11.27 fps, capturing bandwidth 1055288bytes/sec",zm_monitor.cpp,1663
"2021-08-19 23:04:57",zmc_m1,,158137,INF,"Garageuppfart: 367 - Gone into alert state",zm_monitor.cpp,2144
There is no significant load on the host. Averages ~1.2 on a 4-core CPU, running ZM 1.36.5 in the "Easy to use Docker image".

I'm very new to the ZM platform, so any help troubleshooting this is much appreciated.

// Emil
User avatar
iconnor
Posts: 3362
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Event/recording breaks with: "zmwatch: Restarting capture daemon xxxxx"

Post by iconnor »

Honestly looks like a bug to me.

zmwatch is a watchdog that looks for locked up processes and restarts them. It defaults to 45 seconds, but you can change this in options->System->WATCH_MAX_DELAY

We can clearly see in your logs that zmc is responding and doing things less than 45 seconds ago.

So I am tempted to tell you for now to increase that 45 to something significantly larger and I will have to think about what is going on.

Another thing to do is turn on debug logging.
sandnabba
Posts: 2
Joined: Wed Aug 04, 2021 7:05 pm

Re: Event/recording breaks with: "zmwatch: Restarting capture daemon xxxxx"

Post by sandnabba »

Thanks iconnor!

I'll try WATCH_MAX_DELAY 300 for now to see how it behaves.

I grepped for "zmwatch" in the log, and it seems like it's restarting quite often actually:

Code: Select all

Aug 20 17:28:08 1ea317d65ea5 zmwatch[16479]: INF [Restarting capture daemon for Garageuppfart, shared data not valid]
Aug 20 17:29:14 1ea317d65ea5 zmwatch[16479]: WAR [Restarting capture daemon for Garageuppfart, time since last capture 46 seconds (1629473352-1629473306)]
Aug 20 17:29:32 1ea317d65ea5 zmwatch[16479]: ERR [Memory map file '/dev/shm/zm.mmap.1' does not exist in zmMemAttach.  zmc might not be running.]
Aug 20 17:29:33 1ea317d65ea5 zmwatch[16479]: INF [Restarting capture daemon for Garageuppfart, shared data not valid]
Aug 20 17:30:38 1ea317d65ea5 zmwatch[16479]: WAR [Restarting capture daemon for Garageuppfart, time since last capture 46 seconds (1629473438-1629473392)]
Aug 20 17:31:01 1ea317d65ea5 zmwatch[16479]: ERR [Memory map file '/dev/shm/zm.mmap.1' does not exist in zmMemAttach.  zmc might not be running.]
Aug 20 17:31:02 1ea317d65ea5 zmwatch[16479]: INF [Restarting capture daemon for Garageuppfart, shared data not valid]
Aug 20 17:32:46 1ea317d65ea5 zmwatch[16479]: WAR [Restarting capture daemon for Garageuppfart, time since last capture 50 seconds (1629473566-1629473516)]
Aug 20 17:33:01 1ea317d65ea5 zmwatch[16479]: ERR [Memory map file '/dev/shm/zm.mmap.1' does not exist in zmMemAttach.  zmc might not be running.]
Aug 20 17:33:01 1ea317d65ea5 zmwatch[16479]: INF [Restarting capture daemon for Garageuppfart, shared data not valid]
Aug 20 17:36:59 1ea317d65ea5 zmwatch[16479]: WAR [Restarting capture daemon for Garageuppfart, time since last capture 48 seconds (1629473818-1629473770)]
Aug 20 17:37:11 1ea317d65ea5 zmwatch[16479]: ERR [Memory map file '/dev/shm/zm.mmap.1' does not exist in zmMemAttach.  zmc might not be running.]
Aug 20 17:37:11 1ea317d65ea5 zmwatch[16479]: INF [Restarting capture daemon for Garageuppfart, shared data not valid]
Aug 20 17:46:15 1ea317d65ea5 zmwatch[16479]: WAR [Restarting capture daemon for Garageuppfart, time since last capture 49 seconds (1629474375-1629474326)]
Aug 20 17:47:30 1ea317d65ea5 zmwatch[16479]: WAR [Restarting capture daemon for Garageuppfart, time since last capture 46 seconds (1629474449-1629474403)]
Aug 20 17:47:50 1ea317d65ea5 zmwatch[16479]: WAR [Restarting capture daemon for Garageuppfart, time since last capture 67 seconds (1629474470-1629474403)]
Aug 20 17:48:01 1ea317d65ea5 zmwatch[16479]: WAR [Restarting capture daemon for Garageuppfart, time since last capture 78 seconds (1629474481-1629474403)]
Aug 20 17:48:11 1ea317d65ea5 zmwatch[16479]: WAR [Restarting capture daemon for Garageuppfart, time since last capture 88 seconds (1629474491-1629474403)]
Aug 20 17:50:52 1ea317d65ea5 zmwatch[16479]: WAR [Restarting capture daemon for Garageuppfart, time since last capture 49 seconds (1629474651-1629474602)]
Aug 20 17:51:08 1ea317d65ea5 zmwatch[16479]: ERR [Memory map file '/dev/shm/zm.mmap.1' does not exist in zmMemAttach.  zmc might not be running.]
Aug 20 17:51:08 1ea317d65ea5 zmwatch[16479]: INF [Restarting capture daemon for Garageuppfart, shared data not valid]
Aug 20 17:56:09 1ea317d65ea5 zmwatch[16479]: WAR [Restarting capture daemon for Garageuppfart, time since last capture 54 seconds (1629474969-1629474915)]
Aug 20 17:58:23 1ea317d65ea5 zmwatch[16479]: WAR [Restarting capture daemon for Garageuppfart, time since last capture 46 seconds (1629475102-1629475056)]
Aug 20 17:58:34 1ea317d65ea5 zmwatch[16479]: ERR [Memory map file '/dev/shm/zm.mmap.1' does not exist in zmMemAttach.  zmc might not be running.]
Aug 20 17:58:34 1ea317d65ea5 zmwatch[16479]: INF [Restarting capture daemon for Garageuppfart, shared data not valid]
Aug 20 17:58:44 1ea317d65ea5 zmwatch[16479]: ERR [Memory map file '/dev/shm/zm.mmap.1' does not exist in zmMemAttach.  zmc might not be running.]
Aug 20 17:58:45 1ea317d65ea5 zmwatch[16479]: INF [Restarting capture daemon for Garageuppfart, shared data not valid]
Aug 20 18:03:25 1ea317d65ea5 zmwatch[16479]: WAR [Restarting capture daemon for Garageuppfart, time since last capture 53 seconds (1629475405-1629475352)]
Aug 20 18:03:43 1ea317d65ea5 zmwatch[16479]: ERR [Memory map file '/dev/shm/zm.mmap.1' does not exist in zmMemAttach.  zmc might not be running.]
Aug 20 18:03:43 1ea317d65ea5 zmwatch[16479]: INF [Restarting capture daemon for Garageuppfart, shared data not valid]
Aug 20 18:09:46 1ea317d65ea5 zmwatch[16479]: WAR [Restarting capture daemon for Garageuppfart, time since last capture 46 seconds (1629475785-1629475739)]
Aug 20 18:13:10 1ea317d65ea5 zmwatch[16479]: WAR [Restarting capture daemon for Garageuppfart, time since last capture 46 seconds (1629475989-1629475943)]
Aug 20 18:13:24 1ea317d65ea5 zmwatch[16479]: ERR [Memory map file '/dev/shm/zm.mmap.1' does not exist in zmMemAttach.  zmc might not be running.]
Aug 20 18:13:24 1ea317d65ea5 zmwatch[16479]: INF [Restarting capture daemon for Garageuppfart, shared data not valid]
Aug 20 18:14:47 1ea317d65ea5 zmwatch[16479]: WAR [Restarting capture daemon for Garageuppfart, time since last capture 53 seconds (1629476087-1629476034)]
Aug 20 18:55:05 1ea317d65ea5 zmwatch[16479]: WAR [Restarting capture daemon for Garageuppfart, time since last capture 49 seconds (1629478503-1629478454)]
Aug 20 18:55:23 1ea317d65ea5 zmwatch[16479]: ERR [Memory map file '/dev/shm/zm.mmap.1' does not exist in zmMemAttach.  zmc might not be running.]
Aug 20 18:55:23 1ea317d65ea5 zmwatch[16479]: INF [Restarting capture daemon for Garageuppfart, shared data not valid]
Aug 20 20:23:38 1ea317d65ea5 zmwatch[16479]: WAR [Restarting capture daemon for Garageuppfart, time since last capture 53 seconds (1629483816-1629483763)]
Aug 20 20:23:51 1ea317d65ea5 zmwatch[16479]: ERR [Memory map file '/dev/shm/zm.mmap.1' does not exist in zmMemAttach.  zmc might not be running.]
Aug 20 20:23:51 1ea317d65ea5 zmwatch[16479]: INF [Restarting capture daemon for Garageuppfart, shared data not valid]
Aug 20 20:35:16 1ea317d65ea5 zmwatch[16479]: WAR [Restarting capture daemon for Garageuppfart, time since last capture 49 seconds (1629484516-1629484467)]
I'll try debug logging some time during the weekend to see if I find something.
Post Reply