I continue to have problems with ZoneMinder, and decided to try to bisect the problem. I have placed debug statements into zmtrigger.pl and narrowed down the problem to this:
# Free up any used memory handle
Debug("ZZ zmMemInvalidate " . $monitor->{Id} . "\n");
zmMemInvalidate( $monitor );
Of the 15 or so monitors I have, it fails partway through the loop:
12/10/12 07:40:37.004354 zmtrigger[23716].DBG [ZZ foreach monitor...]
12/10/12 07:40:37.004383 zmtrigger[23716].DBG [ZZ zmMemInvalidate 6]
12/10/12 07:40:37.004469 zmtrigger[23716].DBG [ZZ zmMemInvalidate 11]
12/10/12 07:40:37.004522 zmtrigger[23716].DBG [ZZ zmMemInvalidate 3]
12/10/12 07:40:37.004571 zmtrigger[23716].DBG [ZZ zmMemInvalidate 7]
12/10/12 07:40:37.004619 zmtrigger[23716].DBG [ZZ zmMemInvalidate 9]
12/10/12 07:40:37.004666 zmtrigger[23716].DBG [ZZ zmMemInvalidate 2]
12/10/12 07:40:37.004713 zmtrigger[23716].DBG [ZZ zmMemInvalidate 12]
12/10/12 07:40:37.004760 zmtrigger[23716].DBG [ZZ zmMemInvalidate 14]
12/10/12 07:40:37.004807 zmtrigger[23716].DBG [ZZ zmMemInvalidate 15]
12/10/12 07:40:37.004861 zmtrigger[23716].DBG [ZZ zmMemInvalidate 1]
12/10/12 07:40:37.126473 zmtrigger[26072].INF [Trigger daemon starting]
12/10/12 07:40:37.127483 zmtrigger[26072].INF [Opening connection 'Chan1']
Here's what the complete run-through should look like (note that it doesn't stop at 1):
12/10/12 07:30:35.126092 zmtrigger[23716].DBG [ZZ foreach monitor...]
12/10/12 07:30:35.126125 zmtrigger[23716].DBG [ZZ zmMemInvalidate 6]
12/10/12 07:30:35.126215 zmtrigger[23716].DBG [ZZ zmMemInvalidate 11]
12/10/12 07:30:35.126268 zmtrigger[23716].DBG [ZZ zmMemInvalidate 3]
12/10/12 07:30:35.126317 zmtrigger[23716].DBG [ZZ zmMemInvalidate 7]
12/10/12 07:30:35.126365 zmtrigger[23716].DBG [ZZ zmMemInvalidate 9]
12/10/12 07:30:35.126413 zmtrigger[23716].DBG [ZZ zmMemInvalidate 2]
12/10/12 07:30:35.126460 zmtrigger[23716].DBG [ZZ zmMemInvalidate 12]
12/10/12 07:30:35.126507 zmtrigger[23716].DBG [ZZ zmMemInvalidate 14]
12/10/12 07:30:35.126554 zmtrigger[23716].DBG [ZZ zmMemInvalidate 15]
12/10/12 07:30:35.126602 zmtrigger[23716].DBG [ZZ zmMemInvalidate 1]
12/10/12 07:30:35.126649 zmtrigger[23716].DBG [ZZ zmMemInvalidate 4]
12/10/12 07:30:35.126696 zmtrigger[23716].DBG [ZZ zmMemInvalidate 10]
12/10/12 07:30:35.126743 zmtrigger[23716].DBG [ZZ zmMemInvalidate 13]
12/10/12 07:30:35.126789 zmtrigger[23716].DBG [ZZ zmMemInvalidate 5]
12/10/12 07:30:35.126838 zmtrigger[23716].DBG [ZZ loadMonitors]
12/10/12 07:30:35.126868 zmtrigger[23716].DBG [Loading monitors]
12/10/12 07:30:35.129631 zmtrigger[23716].DBG [ZZ end of while loop]
This doesn't happen all the time...and it usually takes an hour or two from a cold start to have this condition. Once it starts acting up, it might fail every 3-4 timeout periods (i.e., every 15-20 minutes).
The code for zmMemInvalidate is pretty straightforward, but what would cause it to take a signal 9 when attempting to invalidate Monitor #5 (which, by the way, is not enabled)?
zmMemInvalidate kills zmtrigger.pl ... why?
-
- Posts: 18
- Joined: Wed Apr 20, 2011 1:04 am
Re: zmMemInvalidate kills zmtrigger.pl ... why?
I can confirm that this exact same problem exists in ZM 1.25.0 running on Fedora 18 x86_64. I am running from precompiled binaries installed via yum.