[1.22.2]shared mem: 1 of 6 cameras won't record events

Support and queries relating to all previous versions of ZoneMinder
Locked
essup
Posts: 77
Joined: Tue Jun 13, 2006 2:08 pm

[1.22.2]shared mem: 1 of 6 cameras won't record events

Post by essup »

Hi,
i got a problem with my zoneminder installation, since i installed it. i didn't notice this problem beforce, because all other 5 cameras do work fine. this is what i got since the early beginnings
zmwatch.log
09/07/06 16:27:04.843616 zmwatch[2115].INF [Watchdog starting]
09/07/06 16:27:04.844965 zmwatch[2115].INF [Watchdog pausing for 30 seconds]
09/07/06 16:27:34.850872 zmwatch[2115].ERR [Can't get shared memory id '7a6d2002', 2: No such file or directory]
09/07/06 16:27:34.851727 zmwatch[2115].INF [Restarting capture daemon for Kamera1, shared memory not valid]
09/07/06 16:27:35.218101 zmwatch[2115].INF ['zmc -d /dev/video0' started at 06/09/07 16:27:35] at /usr/local/bin/zmwatch.pl line 118
09/07/06 16:27:35.252446 zmwatch[2115].ERR [Can't get shared memory id '7a6d2003', 3: No such file or directory]
09/07/06 16:27:35.253079 zmwatch[2115].INF [Restarting capture daemon for Kamera2, shared memory not valid]
09/07/06 16:27:35.619465 zmwatch[2115].INF ['zmc -d /dev/video1' starting at 06/09/07 16:27:35, pid = 2170] at /usr/local/bin/zmwatch.pl line 118
09/07/06 16:27:45.625845 zmwatch[2115].ERR [Can't get shared memory id '7a6d2002', 2: No such file or directory]
...
so yesterday i rised the shmall and shmmax values up to 128mb as described in the wiki:
01.12.2006 07:49:58.071763 zmwatch[29469].INF [Restarting capture daemon for Eingang_von_rechts, shared memory not valid]
01.12.2006 07:49:58.548389 zmwatch[29469].INF ['zmc -d /dev/video1' stopping at 06/12/01 07:49:58]
01.12.2006 07:50:08.556464 zmwatch[29469].INF [Restarting capture daemon for Eingang_von_rechts, shared memory not valid]
01.12.2006 07:50:09.116843 zmwatch[29469].INF ['zmc -d /dev/video1' started at 06/12/01 07:50:08] at /usr/local/bin/zmwatch.pl line 118
01.12.2006 07:51:29.165476 zmwatch[29469].INF [Restarting capture daemon for Eingang_von_rechts, shared memory not valid]
01.12.2006 07:51:29.632340 zmwatch[29469].INF ['zmc -d /dev/video1' stopping at 06/12/01 07:51:29]
01.12.2006 07:51:39.638230 zmwatch[29469].INF [Restarting capture daemon for Eingang_von_rechts, shared memory not valid]
01.12.2006 07:51:42.420843 zmwatch[29469].INF ['zmc -d /dev/video1' starting at 06/12/01 07:51:42, pid = 3470] at /usr/local/bin/zmwatch.pl line 118
01.12.2006 07:53:12.520135 zmwatch[29469].INF [Restarting capture daemon for Eingang_von_rechts, shared memory not valid]
01.12.2006 07:53:12.935496 zmwatch[29469].INF ['zmc -d /dev/video1' stopping at 06/12/01 07:53:12]
01.12.2006 07:53:22.947122 zmwatch[29469].INF [Restarting capture daemon for Eingang_von_rechts, shared memory not valid]
01.12.2006 07:53:23.504956 zmwatch[29469].INF ['zmc -d /dev/video1' starting at 06/12/01 07:53:23, pid = 3480] at /usr/local/bin/zmwatch.pl line 118
01.12.2006 07:54:43.557858 zmwatch[29469].INF [Restarting capture daemon for Eingang_von_rechts, shared memory not valid]
01.12.2006 07:54:43.960757 zmwatch[29469].INF ['zmc -d /dev/video1' stopping at 06/12/01 07:54:43]
...
i also noticed some sql errors (i think) in zmdc.log, this one repeats ~every 15min
01.12.2006 07:04:58.024664 zmdc[29396].INF [Starting pending process, zma -m 2]
01.12.2006 07:04:58.027691 zmdc[3150].INF ['zma -m 2' started at 06/12/01 07:04:58]
01.12.2006 07:04:58.032965 zmdc[29396].INF ['zma -m 2' starting at 06/12/01 07:04:58, pid = 3150]
01.12.2006 07:05:03.334043 zmdc[29396].ERR ['zma -m 2' exited abnormally, exit status 11]
01.12.2006 07:05:11.226993 zmdc[29396].INF ['zmc -d /dev/video1' stopping at 06/12/01 07:05:11]
01.12.2006 07:05:11.314935 zmdc[29396].ERR ['zmc -d /dev/video1' exited abnormally, exit status 255]
01.12.2006 07:05:21.686657 zmdc[29396].INF ['zmc -d /dev/video1' starting at 06/12/01 07:05:21, pid = 3157]
01.12.2006 07:05:21.685646 zmdc[3157].INF ['zmc -d /dev/video1' started at 06/12/01 07:05:21]
prepare_cached(select distinct EventId from Frames left join Events on Frames.EventId = Events.Id where isnull(Events.Id) group by EventId) statement handle DBI::st=HASH(0x88c19d0) still Active at /usr/local/bin/zmaudit.pl line 279
prepare_cached(select distinct EventId from Stats left join Events on Stats.EventId = Events.Id where isnull(Events.Id) group by EventId) statement handle DBI::st=HASH(0x88c1a90) still Active at /usr/local/bin/zmaudit.pl line 291
prepare_cached(select E.Id, max(F.TimeStamp) as EndTime, unix_timestamp(max(F.TimeStamp)) - unix_timestamp(E.StartTime) as Length, count(F.Id) as Frames, count(if(F.Score>0,1,NULL)) as AlarmFrames, sum(F.Score) as TotScore, max(F.Score) as MaxScore, M.EventPrefix as Prefix from Events as E left join Monitors as M on E.MonitorId = M.Id inner join Frames as F on E.Id = F.EventId where isnull(E.Frames) group by E.Id having EndTime < (now() - interval 300 second)) statement handle DBI::st=HASH(0x88c1b68) still Active at /usr/local/bin/zmaudit.pl line 304
01.12.2006 07:06:33.077654 zmdc[29396].INF [Starting pending process, zma -m 2]
01.12.2006 07:06:33.080841 zmdc[3160].INF ['zma -m 2' started at 06/12/01 07:06:33]
01.12.2006 07:06:33.090819 zmdc[29396].INF ['zma -m 2' starting at 06/12/01 07:06:33, pid = 3160]
01.12.2006 07:06:40.351274 zmdc[29396].ERR ['zma -m 2' exited abnormally, exit status 11]
01.12.2006 07:06:42.469364 zmdc[29396].INF ['zmc -d /dev/video1' stopping at 06/12/01 07:06:42]
01.12.2006 07:06:42.557884 zmdc[29396].ERR ['zmc -d /dev/video1' exited abnormally, exit status 255]
01.12.2006 07:06:52.962892 zmdc[3166].INF ['zmc -d /dev/video1' started at 06/12/01 07:06:52]
...
are these known errors and already fixed in 1.22.3? or does this server have too few ram? ("319MB LOWMEM available.")
essup
Posts: 77
Joined: Tue Jun 13, 2006 2:08 pm

Post by essup »

i just upgraded to v1.22.3, telling me:
01.12.2006 10:25:58.497479 zmwatch[10239].INF ['zmc -d /dev/video1' starting at 06/12/01 10:25:58, pid = 10593]
01.12.2006 10:25:58.499810 zmwatch[10239].ERR [Can't get shared memory id '7a6d2007', 5: No such file or directory]
01.12.2006 10:25:58.500656 zmwatch[10239].INF [Restarting capture daemon for Wand_links, shared memory not valid]
01.12.2006 10:25:58.865821 zmwatch[10239].INF ['zmc -d /dev/video1' stopping at 06/12/01 10:25:58]

p.s.
root@ZoneMinder:/tmp# ipcs -m

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 25985024 root 600 33554432 11 dest
0x00000000 26279937 root 600 33554432 11 dest
0x00000000 26050562 root 600 46084 11 dest
0x7a6d2001 27295747 nobody 700 6913188 1
0x7a6d2006 27328516 nobody 700 6913188 1
0x7a6d2004 27361285 nobody 700 6913188 1
0x7a6d2003 27394054 nobody 700 6913188 0
0x7a6d2005 27426823 nobody 700 6913188 0
0x7a6d2002 27459592 nobody 700 6913188 0
0x606d2001 25788425 nobody 700 6912964 0
0x606d2004 25821194 nobody 700 6912964 0
0x606d2006 25853963 nobody 700 6912964 0
0x606d2002 25886732 nobody 700 6912964 0
0x606d2003 25919501 nobody 700 6912964 0
0x606d2005 25952270 nobody 700 6912964 0
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Did you calculate how much shared memory you need for how you have zm configured as discribed in the FAQ?
What is that total?
Is it larger than the shared memory you set?

Regards,
Corey
essup
Posts: 77
Joined: Tue Jun 13, 2006 2:08 pm

Post by essup »

No i didn't calculate, because i don't know how.
I've got 6 cameras. Each of them have a resolution of 480x360 in grey color mode. I don't know how much the ring buffer is and i don't know what "bit of overhead" ZM needs.


p.s.
6cameras x 480width x 360height x 1bit x 40fps x (6 x 1mb_overhead) = 237MB
i just put 256mb in shmmax/shmall but same error.


p.s.
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 25985024 root 600 33554432 10 dest
0x00000000 28082177 root 600 33554432 10 dest
0x00000000 26050562 root 600 46084 10 dest
0x5533ab04 28442627 nobody 700 6913188 0
essup
Posts: 77
Joined: Tue Jun 13, 2006 2:08 pm

Post by essup »

any ideas about this shared memory problem? i've put 256mb in shmall/shmmax but ZM does just reserve 6.59Mb as it seems
0x5533ab04 28442627 nobody 700 6913188 0
and then he isn't able to "find" the shared memory (seems like ZM assumes he reserved enough memory (>6MB i guess))
06.12.2006 11:06:25.784556 zmwatch[8533].ERR [Can't get shared memory id '5533abbe', 6: No such file or directory]
06.12.2006 11:06:25.785228 zmwatch[8533].INF [Restarting capture daemon for Wand_rechts, shared memory not valid]


p.s.
hey, i just played with the debug level of ZM and found some errors regarding interrupted system calls:
12/06/06 11:26:05.067617 zmc_dvideo0[10558].INF-zm_debug.c/304 [New Debug Level = 9, New Debug Log = /tmp/zm_debug.log.10558]
12/06/06 11:26:05.069549 zmc_dvideo0[10558].DB1-zm_monitor.cpp/1529 [Got 3 monitors]
12/06/06 11:26:05.069813 zmc_dvideo0[10558].DB1-zm_local_camera.cpp/91 [Old P:1]
12/06/06 11:26:05.069858 zmc_dvideo0[10558].DB1-zm_local_camera.cpp/92 [Old D:8]
...
12/06/06 11:26:05.072055 zmc_dvideo0[10558].DB1-zm_monitor.cpp/253 [monitor purpose=1]
12/06/06 11:26:05.072220 zmc_dvideo0[10558].DB1-zm_monitor.cpp/260 [shm.size=6913188]
12/06/06 11:26:05.094779 zmc_dvideo0[10558].DB1-zm_zone.cpp/49 [Initialised zone 0/All - 1 - 480x360 - Rgb:ff0000, CM:3, MnAT:15, MxAT:0, MnAP:50, MxAP:7500
12/06/06 11:26:05.095536 zmc_dvideo0[10558].DB9-zm_image.cpp/1134 [x1:0,y1:359 x2:0,y2:0]
12/06/06 11:26:05.095704 zmc_dvideo0[10558].DB9-zm_image.cpp/1134 [x1:0,y1:0 x2:479,y2:0]
12/06/06 11:26:05.095764 zmc_dvideo0[10558].DB9-zm_image.cpp/1134 [x1:479,y1:0 x2:479,y2:359]
12/06/06 11:26:05.095808 zmc_dvideo0[10558].DB9-zm_image.cpp/1134 [x1:479,y1:359 x2:0,y2:359]
12/06/06 11:26:05.095939 zmc_dvideo0[10558].DB9-zm_image.cpp/1154 [0: min_y: 0, max_y:359, min_x:0.00, 1/m:-0.00]
12/06/06 11:26:05.096027 zmc_dvideo0[10558].DB9-zm_image.cpp/1154 [1: min_y: 0, max_y:359, min_x:479.00, 1/m:0.00]
12/06/06 11:26:05.096073 zmc_dvideo0[10558].DB9-zm_image.cpp/1168 [Moving global edge]
12/06/06 11:26:05.096135 zmc_dvideo0[10558].DB9-zm_image.cpp/1168 [Moving global edge]
12/06/06 11:26:05.096185 zmc_dvideo0[10558].DB9-zm_image.cpp/1188 [0 - 0: min_y: 0, max_y:359, min_x:0.00, 1/m:-0.00]
12/06/06 11:26:05.096235 zmc_dvideo0[10558].DB9-zm_image.cpp/1188 [0 - 1: min_y: 0, max_y:359, min_x:479.00, 1/m:0.00]
...
12/06/06 11:26:05.909342 zmc_dvideo0[10558].DB9-zm_image.cpp/1096 [x:220, y:61.87]
12/06/06 11:26:05.909387 zmc_dvideo0[10558].DB9-zm_image.cpp/1096 [x:221, y:61.93]
12/06/06 11:26:05.911664 zmc_dvideo0[10558].DB1-zm_monitor.cpp/1619 [Loaded monitor 4(Parkplatz), 1 zones]
12/06/06 11:26:05.911749 zmc_dvideo0[10558].INF-zmc.cpp/183 [Starting Capture]
12/06/06 11:26:06.912888 zmc_dvideo0[10558].INF-zm_signal.cpp/54 [Got signal (Terminated), exiting]
12/06/06 11:26:06.913073 zmc_dvideo0[10558].ERR-zm_local_camera.cpp/615 [Sync failure for frame 7 buffer 7(1): Interrupted system call]
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

You appear to have configured your web user as 'nobody'. Can you confirm that is correct?
Phil
essup
Posts: 77
Joined: Tue Jun 13, 2006 2:08 pm

Post by essup »

yes, apache runs as 'nobody' under slackware, so i chosed 'nobody' for ZM as well.
./configure –with-webdir=/var/www/htdocs –with-cgidir=/var/www/cgi-bin/ --with-webuser=nobody –with-webgroup=nobody
Locked