[help] Zoneminder suddenly stopped working

Support and queries relating to all previous versions of ZoneMinder
Locked
Jolaf
Posts: 14
Joined: Mon May 02, 2005 10:46 pm
Location: Bordeaux (france)

[help] Zoneminder suddenly stopped working

Post by Jolaf »

My verision 1.22 suddendy stopped functionning this weekend.
It was runing very smooth from weeks now.
I have a pal camera plugged in a miro PCTV board.
My mysql version is 4.0.23_Debian-3ubuntu2.1-log, runing on an old fashioned celeron 500 with 128 Mbytes of memory.

My source device appears red on the console.
With xawtv i have a good image.

Here is a sample of what i can read in zmdc.log
02/19/06 22:47:24.065747 zmdc[9945].ERR ['zma -m 1' crashed, exit status 255]
Use of uninitialized value in numeric ne (!=) at /usr/local/share/perl/5.8.4/Zon
eMinder/SharedMem.pm line 247.
Use of uninitialized value in concatenation (.) or string at /usr/local/share/pe
rl/5.8.4/ZoneMinder/SharedMem.pm line 255.
02/19/06 22:47:25.316597 zmdc[10040].INF ['zmc -d /dev/video0' started at 06/02/
19 22:47:25]
02/19/06 22:47:25.351199 zmdc[9945].INF ['zmc -d /dev/video0' starting at 06/02/
19 22:47:25, pid = 10040]
02/19/06 22:47:25.352802 zmdc[9945].ERR ['zmc -d /dev/video0' crashed, exit stat
us 255]
Use of uninitialized value in numeric ne (!=) at /usr/local/share/perl/5.8.4/Zon
eMinder/SharedMem.pm line 247.
Use of uninitialized value in concatenation (.) or string at /usr/local/share/pe
rl/5.8.4/ZoneMinder/SharedMem.pm line 255.
Here is the line 247 of SharedMem.pm
if ( $sd_size != $shm_data->{shared_data}->{size} )
and its line 255
Debug( "Shared memory size conflict in shared_data, expected ".$shm_data->{shared_data}->{size}.", got ".$sd_size );

After reading the forum I found this post
http://www.zoneminder.com/forums/viewto ... 8277c8d6f9
I tried the "zmfix and zmupdate -f as root" solution, but it did not work.

Then I went into zmwatch.log and got on the same date/time :
02/19/06 22:46:54.566210 zmwatch[9992].INF [Watchdog starting]
02/19/06 22:46:54.581352 zmwatch[9992].INF [Watchdog pausing for 30 seconds]
02/19/06 22:47:24.587773 zmwatch[9992].ERR [Can't read 'shared_data:size' from s
hared memory '7a6d2001/0': Permission denied]
02/19/06 22:47:24.589298 zmwatch[9992].INF [Restarting capture daemon for rue, s
hared memory not valid]
02/19/06 22:47:25.369086 zmwatch[9992].INF ['zmc -d /dev/video0' started at 06/0
2/19 22:47:25] at /usr/local/bin/zmwatch.pl line 118
02/19/06 22:47:35.407175 zmwatch[9992].ERR [Can't read 'shared_data:size' from s
hared memory '7a6d2001/0': Permission denied]
02/19/06 22:47:35.408266 zmwatch[9992].INF [Restarting capture daemon for rue, s
hared memory not valid]
02/19/06 22:47:36.298090 zmwatch[9992].INF ['zmc -d /dev/video0' starting at 06/
02/19 22:47:36, pid = 10053] at /usr/local/bin/zmwatch.pl line 118

in /var/log/messages
Feb 19 22:47:24 localhost zmwatch[9992]: INF [Restarting capture daemon for rue,
shared memory not valid]

I also unchecked ZM_STRICT_VIDEO_CONFIG, did nothing

I activated debug informations loging.
here are some informations :
02/20/06 12:08:50.843877 zmfix[11401].DB1-zmfix.cpp/67 [Permissions on /dev/vide
o0 are ok at 20666]

During my search for a solution i created a second monitor, which I can not delete now !

:arrow: Now, the most interesting thing I found

I ran, as root, this script

Code: Select all

#!/usr/bin/perl -w0

use strict;

$| = 1;

use ZoneMinder::Config qw/:all/;

print ZM_SHM_KEY."\n";
Which outputs :
0x7a6d2000
I ran ipcs -m to check if the shared memory is initialized here is the output
------ Segment de mémoire partagé --------
clé shmid propriétaire perms octets nattch états
0x7a6d2001 0 root 700 2560708 0
There is a difference on the numbers : 0x7a6d2001 and 0x7a6d2000
is this the problem source ?
Should I change ZM_SHM_KEY in my options panel to 0x7a6d2001 ?
Is the fact that the shared memory belong to root the problem ?
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Try checking your database integrity and repair if needed. Sounds like the DB might have gotten corrupted or the data is not being returned in a timely matter.

Regards,
Corey
Jolaf
Posts: 14
Joined: Mon May 02, 2005 10:46 pm
Location: Bordeaux (france)

Post by Jolaf »

how to do integrity checking ?

It seems that the computer runing ZM hard rebooted during the night (I have kernel starting messages not preceeded by stopping messages).
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

It's detailed in this thread:
http://www.zoneminder.com/forums/viewto ... base+mysql

Regards,
Corey
Jolaf
Posts: 14
Joined: Mon May 02, 2005 10:46 pm
Location: Bordeaux (france)

Post by Jolaf »

I did the two checkings, and, as far as I can see, they found nothing special (is there a log of what is done ?)

I manually deleted the second monitor, and it seems that things are now unlocked : zoneminder functions now !

I guess that things went wrong when the computer suddenly rebooted (stormy night).

Many thanks for your assistance.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

It's a bit late now but it looked to me like you were still running some old binaries with the new installation. I can't be sure though.
Phil
Jolaf
Posts: 14
Joined: Mon May 02, 2005 10:46 pm
Location: Bordeaux (france)

Post by Jolaf »

I have each file in only one exemplar.
I also compared sizes and dates for a few binary (zma zmu) files in the source directory and in the execution directory. It appears to me that they are the same.

Do you want me to investigate a little deeper ?
Locked