Page 1 of 1

Cannot open memory map file

Posted: Sat Sep 08, 2012 7:19 am
by duffrecords
Last weekend I upgraded the packages on my Arch Linux system and after a reboot, ZoneMinder stopped working. The logs say:

Code: Select all

'zma -m 1' exited abnormally, exit status 127
Can't open memory map file '/dev/shm/zm.mmap.2': No such file or directory
Can't open memory map file '/dev/shm/zm.mmap.2': No such file or directory
The directory /dev/shm has rwxrwxrwt permissions so it should be able to create the file. Again, I haven't changed anything in my ZoneMinder configuration--I'm pretty sure it one of the updated packages that broke it. What might be causing this? Here is some more information that may be useful:

Code: Select all

$ cat /proc/sys/kernel/shmmax 
536870912
$ ipcs -l

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 524288
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 = 6901
max size of message (bytes) = 8192
default max size of queue (bytes) = 16384
I compiled the perl-sys-mmap package myself since it's not available in the Arch Linux repository so I know that didn't get upgraded. Fortunately, Arch's pacman caches the packages it installs. These are the ones that were installed this month:

Code: Select all

cantarell-fonts-0.0.9-1-any.pkg.tar.xz
firefox-15.0.1-1-x86_64.pkg.tar.xz
cups-filters-1.0.24-1-x86_64.pkg.tar.xz
lib32-fontconfig-2.10.1-1-x86_64.pkg.tar.xz
lib32-alsa-plugins-1.0.26-1-x86_64.pkg.tar.xz
lib32-alsa-lib-1.0.26-1-x86_64.pkg.tar.xz
alsa-plugins-1.0.26-1-x86_64.pkg.tar.xz
alsa-utils-1.0.26-1-x86_64.pkg.tar.xz
alsa-lib-1.0.26-1-x86_64.pkg.tar.xz
qpdf-3.0.2-1-x86_64.pkg.tar.xz
mysql-clients-5.5.27-4-x86_64.pkg.tar.xz
mysql-5.5.27-4-x86_64.pkg.tar.xz
libmysqlclient-5.5.27-4-x86_64.pkg.tar.xz
icedtea-web-java7-1.3-1-x86_64.pkg.tar.xz
vim-runtime-7.3.659-1-x86_64.pkg.tar.xz
vim-7.3.659-1-x86_64.pkg.tar.xz
fontconfig-2.10.1-2-x86_64.pkg.tar.xz
less-451-1-x86_64.pkg.tar.xz
libvdpau-0.5-1-x86_64.pkg.tar.xz
sqlite-3.7.14-1-x86_64.pkg.tar.xz
sudo-1.8.6-1-x86_64.pkg.tar.xz
hwids-20120831-1-any.pkg.tar.xz
libreoffice-writer-3.6.1-4-x86_64.pkg.tar.xz
libreoffice-en-US-3.6.1-4-x86_64.pkg.tar.xz
libreoffice-common-3.6.1-4-x86_64.pkg.tar.xz
cups-1.6.1-6-x86_64.pkg.tar.xz
libcups-1.6.1-6-x86_64.pkg.tar.xz
openssh-6.1p1-2-x86_64.pkg.tar.xz
gnutls-3.1.1-1-x86_64.pkg.tar.xz
fribidi-0.19.4-1-x86_64.pkg.tar.xz
mythtv-1:0.25.2-2-x86_64.pkg.tar.xz
gtkmm3-3.4.1-1-x86_64.pkg.tar.xz
jre7-openjdk-headless-7.u7_2.3.2-1-x86_64.pkg.tar.xz
jdk7-openjdk-7.u7_2.3.2-1-x86_64.pkg.tar.xz
jre7-openjdk-7.u7_2.3.2-1-x86_64.pkg.tar.xz
sdl-1.2.15-2-x86_64.pkg.tar.xz
jack-0.121.3-1-x86_64.pkg.tar.xz
libgnomekbd-3.2.0-1-x86_64.pkg.tar.xz
libmatroska-1.3.0-1-x86_64.pkg.tar.xz
libebml-1.2.2-1-x86_64.pkg.tar.xz
brasero-3.2.0-1-x86_64.pkg.tar.xz
zenity-3.2.0-1-x86_64.pkg.tar.xz
clutter-gtk-1.0.4-1-x86_64.pkg.tar.xz
atk-2.2.0-1-x86_64.pkg.tar.xz
gstreamer0.10-ffmpeg-0.10.12-1-x86_64.pkg.tar.xz
seed-3.2.0-1-x86_64.pkg.tar.xz
gnome-games-extra-data-3.2.0-1-any.pkg.tar.xz
mash-0.1.0-2-x86_64.pkg.tar.xz
wget-1.13.4-1-x86_64.pkg.tar.xz
libgdata-0.10.1-1-x86_64.pkg.tar.xz
cdrkit-1.1.11-2-x86_64.pkg.tar.xz
x11vnc-0.9.13-1-x86_64.pkg.tar.xz
festival-2.1-3-x86_64.pkg.tar.xz
make-3.82-4-x86_64.pkg.tar.xz
libcddb-1.3.2-3-x86_64.pkg.tar.xz
cdrdao-1.2.3-6-x86_64.pkg.tar.xz
bc-1.06-8-x86_64.pkg.tar.xz
libtheora-1.1.1-2-x86_64.pkg.tar.xz
libdc1394-2.1.3-2-x86_64.pkg.tar.xz
libmng-1.0.10-4-x86_64.pkg.tar.xz
obex-data-server-0.4.6-2-x86_64.pkg.tar.xz
faac-1.28-3-x86_64.pkg.tar.xz
unixodbc-2.3.0-2-x86_64.pkg.tar.xz
dvd+rw-tools-7.1-4-x86_64.pkg.tar.xz
perl-socket6-0.23-1-x86_64.pkg.tar.xz
gd-2.0.36RC1-4-x86_64.pkg.tar.xz
ndesk-dbus-glib-0.4.1-3-any.pkg.tar.xz
libdca-0.0.5-3-x86_64.pkg.tar.xz
gnu-netcat-0.7.1-4-x86_64.pkg.tar.xz
mozilla-common-1.4-3-any.pkg.tar.xz
libavc1394-0.5.4-1-x86_64.pkg.tar.xz
libshout-1:2.2.2-4-x86_64.pkg.tar.xz
fribidi-0.19.2-2-x86_64.pkg.tar.xz
mcpp-2.7.2-3-x86_64.pkg.tar.xz
openjpeg-1.4-1-x86_64.pkg.tar.xz
ladspa-1.13-3-x86_64.pkg.tar.xz
t1lib-5.1.2-3-x86_64.pkg.tar.xz
speex-1.2rc1-2-x86_64.pkg.tar.xz
mono-addins-0.6.2-1-x86_64.pkg.tar.xz
libnice-0.1.1-1-x86_64.pkg.tar.xz
libxml++-2.34.2-1-x86_64.pkg.tar.xz
fluidsynth-1.1.5-1-x86_64.pkg.tar.xz
libmcrypt-2.5.8-3-x86_64.pkg.tar.xz
imlib2-1.4.5-1-x86_64.pkg.tar.xz
libcap-ng-0.6.6-1-x86_64.pkg.tar.xz
diffutils-3.2-1-x86_64.pkg.tar.xz
libmusicbrainz3-3.0.3-1-x86_64.pkg.tar.xz
orbit2-2.14.19-1-x86_64.pkg.tar.xz
libgnomeui-2.24.4-1-x86_64.pkg.tar.xz
xorg-fonts-misc-1.0.1-1-any.pkg.tar.xz
sound-theme-freedesktop-0.7-1-any.pkg.tar.xz
pm-quirks-0.20100619-1-any.pkg.tar.xz
ndesk-dbus-0.6.0-2-any.pkg.tar.gz
lib32-libxfixes-4.0.5-3-x86_64.pkg.tar.xz
lib32-libxdamage-1.1.3-3-x86_64.pkg.tar.xz
lib32-fontconfig-2.8.0-3-x86_64.pkg.tar.xz
libid3tag-0.15.1b-6-x86_64.pkg.tar.xz
icoutils-0.29.1-1-x86_64.pkg.tar.xz
libglade-2.6.4-2-x86_64.pkg.tar.xz
libieee1284-0.2.11-3-x86_64.pkg.tar.xz
musicbrainz-2.1.5-4-x86_64.pkg.tar.xz
Edit: I can confirm the capture card is working by using the QT V4L2 Test Utility.

Re: Cannot open memory map file

Posted: Sun Sep 09, 2012 10:46 pm
by duffrecords
While troubleshooting, I noticed the zmu command could not run because of the following error:

Code: Select all

error while loading shared libraries: libavformat.so.53: cannot open shared object file: No such file or directory
I added the correct directory to a file in /etc/ld.so.conf.d/ and ran ldconfig and it worked again. Now in the console, my two sources are green instead of red and there are no longer any errors in the log. However, if I view either source there is no video. It's empty--not even a black screen. With no errors in the log I don't know what to check next.

Re: Cannot open memory map file

Posted: Sun Sep 09, 2012 11:13 pm
by duffrecords
So now it seems ZoneMinder is utilizing the video device. It detected motion when I went outside and waved my hand in front of the camera and I can see a thumbnail. However, it won't display video. This error appeared in the system's logs:

Code: Select all

Sep  9 15:57:36 localhost web_php[12936]: ERR [socket_sendto( /srv/zoneminder/socks/zms-245955s.sock ) failed: No such file or directory]

Re: Cannot open memory map file

Posted: Tue Sep 11, 2012 3:16 am
by duffrecords
I noticed that after the major system upgrade there was a newer version of php.ini. The package manager left my original version in place, which was expected. I modified the new one to meet my needs and restarted Apache. However, the video stream is now a broken link. The Apache error log showed this:

Code: Select all

[Mon Sep 10 19:46:06 2012] [error] [client 108.60.42.130] /srv/http/cgi-bin/nph-zms: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory, referer: http://hostname.redacted.com/zm/index.php?view=watch&mid=1
During the upgrade, I guess the pcre package was upgraded as well, because I no longer have a libpcre.so.0 file. According to https://bugs.archlinux.org/task/28422, recompiling packages that depend on pcre should fix the issue. I have recompiled and installed ZoneMinder against the new pcre but it's still looking for libpcre.so.0 specifically. I made a symbolic link to libpcre.so.1 for now and that causes ZoneMinder to display a static image in place of the video feed, which will update if I refresh the browser. I'm still getting the socket_sendto "No such file or directory error" also.