Page 1 of 1

Shared key error, but compiled with mmap

Posted: Mon Nov 25, 2013 2:21 pm
by momcilosystem
There is a strange issue (well, strange to me :) ) where Zoneminder fills log with error:

Code: Select all

ERR-zmwatch.pl [Can't get shared memory id '7a6d0002', 2: No such file or directory]
but as I can see from Fedora's RPM SPEC file, it is configured for mmap (relevant part):

Code: Select all

%configure \
    --with-libarch=%{_lib} \
    --with-mysql=%{_prefix} \
    --with-webdir=%{_datadir}/%{name}/www \
    --with-cgidir=%{_libexecdir}/%{name}/cgi-bin \
    --with-webuser=%{zmuid} \
    --with-webgroup=%{zmgid} \
    --enable-mmap=yes \
    --disable-debug \
    $OPTS
Just to be sure, I increased shmmax and shmall values but it didn't change the situation.

Code: Select all

[root@localhost ~]# cat /etc/sysctl.d/60-kernel-shm.conf

kernel.shmall = 2097152
kernel.shmmax = 268435456


[root@localhost ~]# ipcs -l

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 262144
max total shared memory (kbytes) = 8388608
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 = 1723
max size of message (bytes) = 8192
default max size of queue (bytes) = 16384

[root@localhost ~]# ls -hal /dev/shm/

total 12M
drwxrwxrwt  2 root   root     60 Nov  6 12:59 .
drwxr-xr-x 19 root   root   3.4K Nov  6 12:58 ..
-rw-------  1 apache apache  12M Nov  6 12:59 zm.mmap.2
So, why is this happening?
Is there a way to check if binary is compiled with mmap ? or
Do I need to recompile the .rpm myself to make sure they indeed did --enable-mmap=yes ?

The reason I wish to get rid of this message is that Zoneminder feels really slow (imho because of this). And also I want to up the resolution of camera.

If you need any other info, I will make sure everything is at your disposal.

OS: Fedora 18 i686
ZM: Zoneminder 1.25

Best regards,
Momcilo.