Page 1 of 1

Can't get shared memory id '7a6d0001', with mmap?!

Posted: Fri Nov 09, 2012 2:20 am
by jnoake
zmwatch:Can't get shared memory id '7a6d0001', 1: No such file or directory
repeating in logs every 10 secs.

Done a LOT of reading and found plenty advice and tricks relating to shared mem - then found that the version I am using is configured for mapped memory, so this error should not appear?.

Camera is a D-Link DCS-930L IP cam, works successfully on earlier versions of ZM (on another machine), http - username:pass@ip etc set up correctly and zoneminder will happily go green while recording, but live watch and recorded event results in NO image, not even an empty box.

More information:
Fedora 4.6.5-1.fc17.i686.PAE

processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 10
model name : AMD Athlon(TM) XP 3000+
stepping : 0
cpu MHz : 2166.350
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow up
bogomips : 4332.70
clflush size : 32
cache_alignment : 32
address sizes : 34 bits physical, 32 bits virtual
power management: ts

#free
total used free shared buffers cached
Mem: 3104208 1556824 1547384 0 126512 723140
-/+ buffers/cache: 707172 2397036
Swap: 2095100 0 2095100


------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 524288
max total shared memory (kbytes) = 1048576
min seg size (bytes) = 1

# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 149713736 12831156 129277756 10% /
devtmpfs 1543560 4 1543556 1% /dev
tmpfs 3145728 2968 3142760 1% /dev/shm
tmpfs 1552104 2248 1549856 1% /run
/dev/sdc2 149713736 12831156 129277756 10% /
tmpfs 1552104 0 1552104 0% /sys/fs/cgroup
tmpfs 1552104 0 1552104 0% /media
/dev/sdc1 2064208 215716 1743636 12% /boot
/dev/md0 1922730744 1625798532 199263096 90% /mnt/raid
/dev/md0 1922730744 1625798532 199263096 90% /var/shared

rpms:
zoneminder-1.25.0-1.fc17.i686
httpd-2.2.22-4.fc17.i686
mysql-5.5.28-1.fc17.i686

# ps -A|grep zm
3747 ? 00:00:01 zmdc.pl
3776 ? 00:00:07 zmc
3785 ? 00:00:00 zmfilter.pl
3793 ? 00:00:00 zmaudit.pl
3804 ? 00:00:00 zmwatch.pl

# ls /dev/shm
total 2.9M
<snip>
-rw------- 1 apache apache 2.8M Nov 9 01:13 zm.mmap.1

# cat /etc/group|grep video
video:x:39:apache

Re: Can't get shared memory id '7a6d0001', with mmap?!

Posted: Fri Nov 09, 2012 4:30 pm
by jnoake
Update:
The error message every 10 secs is still there, but frames are being recorded.

/var/log/httpd/suexec.log shows this:
[2012-11-09 16:23:28]: uid: (5008/web1) gid: (5005/client0) cmd: nph-zms
[2012-11-09 16:23:28]: command not in docroot (/usr/libexec/zoneminder/cgi-bin/nph-zms)

(got ispconfig3 installed)

which would explain why I cant get a 'movie' view to show anything.
anybody get any quick fixes for this?
tried linking the /usr/libexec/zoneminder/cgi-bin/nph-zms into the 'web1' chroot location, but I'm not quite sure what the form is for this kinda thing.

Update:
Ok, In ISPConfig I turned off suexec and turned on PHP_MOD for my site and now everything works - live view and event playbacks.
I also accidentally ended up with the console running over https which is ok. I think I would rather have it on a separate port like :90 though, to stop it being served through my firewall.

I am finding that if I change the buffers or image dimensions to anything larger, the memory allocated on /dev/shm is not removed but is re-used when zoneminder is restarted and is too small. If I delete the /dev/shm/zm.mmap.1 file manually after stopping zoneminder, it creates a new file big enough for larger settings upon restarting.

The log (database) is still being swamped with :
2012-11-09 23:52:41.550060 zmwatch 4735 ERR Can't get shared memory id '7a6d0001', 1: No such file or directory zmwatch.pl
every 10 seconds and makes the log somewhat useless since the alert is always red!.

Any tips for that are still welcome.