LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Zoneminder Error - Shared Memory? (http://www.linuxquestions.org/questions/linux-software-2/zoneminder-error-shared-memory-4175432199/)

spikeygg 10-14-2012 04:49 PM

Zoneminder Error - Shared Memory?
 
So I've installed Zone Minder and I set up a camera to play around with. I've been having fun trying to define the zones and trying to set how sensitive they are. One thing I have noticed is that I can't get a few errors to go away. The whole system appears to work, I get video feed, alerts are saved and events are created.

The errors I get are:

"Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results"

and

"Got unexpected memory map file size 36865524, expected 92162484"

I don't know much about shared memory but reading through the docs for the error I have found that I can use ipcs and ipcrm to take a peek at what is currently shared.

Looking through the ZoneMinder "options" I see that SHM_KEY is set to 0x7a6d0000 but polling the ipcs -m at a command line makes it seem like that key is not getting set (0x00000000 is though).

SHM_KEY | Shared memory root key to use | 0x7a6d0000

Code:

> ipcs -m

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch    status
0x00000000 1376256    user  777        8294400    2          dest

>

How do I fix this? Am I missing something? Maybe it isn't a concern?

Thanks,
-Greg

blueh2o 10-16-2012 09:00 AM

It is likely your shared memory size is too small. What output do you get for "cat /proc/sys/kernel/shmall"?

spikeygg 10-16-2012 09:04 AM

Quote:

Originally Posted by blueh2o (Post 4807163)
It is likely your shared memory size is too small. What output do you get for "cat /proc/sys/kernel/shmall"?

Yeah, I thought about that and increased it to 1GB:

$ cat /proc/sys/kernel/shmall
1073741824
$

Still no dice. :(

blueh2o 10-16-2012 09:23 AM

What have you got for shmmax?

spikeygg 10-16-2012 09:25 AM

Quote:

Originally Posted by blueh2o (Post 4807184)
What have you got for shmmax?

Same:
$ cat /proc/sys/kernel/shmmax
1073741824
$

blueh2o 10-16-2012 09:41 AM

That is very strange. Here is what my shared memory looks like:

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x740380aa 3538944 root 600 4 0
0x74038080 4227073 root 600 4 0
0x7a6d0001 4587522 apache 700 243307124 2
0x7403807f 4194307 root 600 4 0

You can see there the segment for zoneminder that is owned by apache. I am using zoneminder 1.24.2, on CentOS 5.8.

I cannot explain how you are having SHM issues and still getting video. Have you tried turning on "EXTRA_DEBUG"? Maybe zmc will spit out something useful.

spikeygg 10-16-2012 01:31 PM

Quote:

Originally Posted by blueh2o (Post 4807205)
That is very strange. Here is what my shared memory looks like:

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x740380aa 3538944 root 600 4 0
0x74038080 4227073 root 600 4 0
0x7a6d0001 4587522 apache 700 243307124 2
0x7403807f 4194307 root 600 4 0

You can see there the segment for zoneminder that is owned by apache. I am using zoneminder 1.24.2, on CentOS 5.8.

I cannot explain how you are having SHM issues and still getting video. Have you tried turning on "EXTRA_DEBUG"? Maybe zmc will spit out something useful.

I think I may have just figured this out... at least why I'm not seeing anything in shared memory using ipcs. I'm using 1.25.x and, apparently, the new version uses memory mapped files (in /dev/shm/zm or /run/shm/zm) instead of shared memory (using ipcs/ipcrm). But this doesn't help me to understand why I can't clean up the errors. :-\

FreakWent 03-02-2014 07:54 PM

Sorry for bumping!
 
I have the same problem, and I can't find much on the Internet other than this. Did you ever get it working? What did you do?


All times are GMT -5. The time now is 12:50 PM.