New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shared data not initialised by capture daemon #507
Comments
This is actually a warning. It is just telling you that the camera is not recording. It means that the zmc process is not running. You need to look into why zmc is not running. So check in the zmc logs. /var/log/zm/zmc* |
I enabled logging to files (LOG_LEVEL_FILE=info) (already had info on syslog & database) but the only file that has been written since restart of zm is zmaudit.log. A few hours after restart, I first triggered an event then I wanted to watch it. Got a lot of errors in the log when doing that. This is from syslog: Sep 12 19:52:49 mistik zma_m1[30177]: INF [Monitor-1: 280000 - Processing at 12.35 fps] Do I need to enable debug to get something to get further with this issue? |
I did some research on this, specifically on the warning that ends "some query functions may not be available", and I think the reason quoted (zmc is not running) may not be correct in this case. In zm_monitor (where this is issued), around line 374, mem_ptr is initialized to NULL. Immediately following there are sections of code for CAPTURE and ANALYSIS, but nothing for QUERY. Immediately following the (skipped for QUERY) ANALYSIS section is the test which generates this error, with a flavor for non-QUERY, and one for QUERY. The one for QUERY is the one that says "some query functions may not be available". It appears to be simply impossible to get to this point with anything but a null mem_ptr, which then generates the error. I think this message is bogus at this point. After the warning it falls through and continues to run fine, at least when called from ZMS which is where I am mostly getting this specific error. I did not research the other flavor (non-QUERY) version which ends at the monitor name, no "some query functions". I did not research every possible path that might call this to see if some other level of initialization perhaps should (sometimes) occur for a QUERY purpose here, but as written I see no path for purpose=QUERY that can avoid giving this error. And it appears to work properly (otherwise a SINGLE frame from ZMS would not work. I did ensure that ZMC was running in all cases that gave this message. Perhaps that ZMC not running issue relates to the non-purpose=QUERY function. Perhaps I am missing something but I am going to throw a pull request out to make this just go away, and at least perhaps spur discussion. |
This partial fix was merged in #984, primarily to remove some of the noise that is confusing people, but I think there are still issues here, so am not closing this once my change above was merged. |
#984 fixes the particular Shared Memory error described in this thread. Thank you @Linwood-F |
I get this a lot when using the web gui, not otherwise. If I'm active in the gui, motion detect recording does not work. If I leave the gui, there are no more of these errors and the system functions just fine. I'm 99% certain it works this way.
Aug 20 15:50:43 stik zms[22402]: INF [Authenticated user 'admin']
Aug 20 15:50:43 stik zms[22402]: WAR [Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results]
Aug 20 15:50:47 stik zms[22402]: INF [Got signal 15 (Terminated), exiting]
Aug 20 15:50:50 stik zms[22006]: INF [Got signal 15 (Terminated), exiting]
Aug 20 15:50:50 stik zms[22006]: ERR [Unable to send stream frame: Broken pipe]
$ ipcs -l
------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 1041866
max total shared memory (kbytes) = 4267483648
min seg size (bytes) = 1
------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767
------ Messages Limits --------
max queues system wide = 1652
max size of message (bytes) = 8192
default max size of queue (bytes) = 16384
$ ls -la /dev/shm/zm.mmap.1
-rw------- 1 www-data www-data 59444560 aug 21 11:38 /dev/shm/zm.mmap.1
$ apt-cache policy zoneminder
zoneminder:
Installed: 1.27.99+1-trusty-SNAPSHOT2014080402
The text was updated successfully, but these errors were encountered: