Ubuntu 9.10, 2 cam 640x480. 1,5gb ram shared mem problem

Forum for questions and support relating to the 1.24.x releases only.
Locked
execcr
Posts: 19
Joined: Tue May 02, 2006 3:58 pm
Location: Italy -- Cremona

Ubuntu 9.10, 2 cam 640x480. 1,5gb ram shared mem problem

Post by execcr »

Hi everybody,
once week ago i set up this system for use it with zm in my home.
I used an old pc that was without a work...

AMD Athlon64 3200+
1,5 gb of ram, DDR, set up with 1gb slot, 2*256mb
Motherboard asus
PCI dvr card with 8 input BNC, 240 fps total

SO: Ubuntu 9.04
ZM 1.24.2

I install zm with the guide in the wiki, checking all pass
Then i set the permission for the video device using 777

I configure the first cam with these settings
device V4L2 /dev/video8
res 640x480
PAL
GREY (tried also RGB24)

the second is the same, change the path /dev/video5

The problem is that after one hour or two one camera stop working
In var/log/message i see this error:

Code: Select all

Dec  7 16:35:33 server-amd zms[16332]: WAR [Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results]
Dec  7 16:35:33 server-amd zms[16333]: INF [Got signal 15 (Terminated), exiting]
Dec  7 16:35:35 server-amd zms[16331]: INF [Got signal 15 (Terminated), exiting]
Dec  7 16:35:36 server-amd zms[16334]: INF [Debug Level = 0, Debug Log = <none>]
Dec  7 16:35:36 server-amd zms[16334]: WAR [Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results]
Dec  7 16:35:36 server-amd zms[16334]: INF [Got signal 15 (Terminated), exiting]
Dec  7 16:36:05 server-amd zms[16345]: INF [Debug Level = 0, Debug Log = <none>]
Dec  7 16:36:05 server-amd zms[16345]: WAR [Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results]
Dec  7 16:36:05 server-amd zms[16345]: INF [Got signal 15 (Terminated), exiting]
Dec  7 16:36:05 server-amd zms[16345]: WAR [Unable to store frame as shared memory invalid]
Dec  7 16:36:05 server-amd zms[16346]: INF [Debug Level = 0, Debug Log = <none>]
Dec  7 16:36:05 server-amd zms[16346]: WAR [Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results]
Dec  7 16:36:05 server-amd zms[16346]: WAR [Unable to store frame as shared memory invalid]
If i restart zm everything works again for some time, then one camera goes black

i change the sysctl.conf setting after zm install to:

kernel.shmmax=222184000
kernel.shmall=310000

But i have always shared memory problem.

In webmin running process panel i see that on 1,4gb of ram 1.2gb are free.

if i launch top from terminal it tell me differnt values: 1,2gb of ram used, 222mb free.

I dont know how i can figured out... i tried to change sysctl values, adding more and more ram, but nothing

IPCS -l tell me

Code: Select all

fede@server-amd:~$ ipcs -l

------ Limiti della memoria condivisa --------
numero massimo di segmenti = 4096
dimensione max seg (kbyte) = 216976
max total shared memory (kbytes) = 1240000
dimensione min seg (byte) = 1

------ Limiti di semaforo --------
numero max di matrici = 128
numero max di semafori per matrice = 250
numero max di semafori su tutto il sistema = 32000
numero max opz. per chiamata semop = 32
valore max del semaforo = 32767

------ Messaggi: limiti --------
numero max di code su tutto il sistema = 1718
dimensione max del messaggio (byte) = 8192
dimensione massima predefinita della coda (byte) = 16384
some help is very appreciated!!!
thanks
execcr
Posts: 19
Joined: Tue May 02, 2006 3:58 pm
Location: Italy -- Cremona

Post by execcr »

more log of when the image goes black

Code: Select all

 17:09:50 server-amd zmc_dvideo8[18003]: WAR [Capture failure, possible signal loss?: Input/output error]
Dec  7 17:09:50 server-amd zmc_dvideo8[18003]: ERR [Failed to capture image from monitor 4 (0/1)]
Dec  7 17:09:50 server-amd zmdc[17482]: ERR ['zmc -d /dev/video8' exited abnormally, exit status 255]
Dec  7 17:10:01 server-amd /USR/SBIN/CRON[18228]: (munin) CMD (if [ -x /usr/bin/munin-cron ]; then /usr/bin/munin-cron; fi)
Dec  7 17:10:01 server-amd /USR/SBIN/CRON[18242]: (root) CMD ([ -x /usr/sbin/update-motd ] && /usr/sbin/update-motd 2>/dev/null)
Dec  7 17:10:01 server-amd /USR/SBIN/CRON[18245]: (root) CMD (if [ -x /etc/munin/plugins/apt_all ]; then /etc/munin/plugins/apt_all update 7200 12 >/dev/null; elif [ -x /etc/munin/plugins/apt ]; then /etc/munin/plugins/apt update 7200 12 >/dev/null; fi)
Dec  7 17:10:10 server-amd zmdc[17482]: INF [Starting pending process, zmc -d /dev/video8]
Dec  7 17:10:10 server-amd zmdc[18453]: INF ['zmc -d /dev/video8' started at 09/12/07 17:10:10]
Dec  7 17:10:10 server-amd zmc_dvideo8[18453]: INF [Debug Level = 0, Debug Log = <none>]
Dec  7 17:10:10 server-amd zmdc[17482]: INF ['zmc -d /dev/video8' starting at 09/12/07 17:10:10, pid = 18453]
Dec  7 17:10:10 server-amd zmc_dvideo8[18453]: INF [Starting Capture]
Dec  7 17:10:38 server-amd zmc_dvideo8[18453]: WAR [Capture failure, possible signal loss?: Input/output error]
Dec  7 17:10:38 server-amd zmc_dvideo8[18453]: ERR [Failed to capture image from monitor 4 (0/1)]
Dec  7 17:10:38 server-amd zmdc[17482]: ERR ['zmc -d /dev/video8' exited abnormally, exit status 255]
Dec  7 17:11:18 server-amd zmdc[17482]: INF [Starting pending process, zmc -d /dev/video8]
Dec  7 17:11:18 server-amd zmdc[18484]: INF ['zmc -d /dev/video8' started at 09/12/07 17:11:18]
Dec  7 17:11:18 server-amd zmc_dvideo8[18484]: INF [Debug Level = 0, Debug Log = <none>]
Dec  7 17:11:18 server-amd zmdc[17482]: INF ['zmc -d /dev/video8' starting at 09/12/07 17:11:18, pid = 18484]
Dec  7 17:11:18 server-amd zmc_dvideo8[18484]: INF [Starting Capture]
Dec  7 17:12:08 server-amd zms[18518]: INF [Debug Level = 0, Debug Log = <none>]
Dec  7 17:12:08 server-amd zms[18519]: INF [Debug Level = 0, Debug Log = <none>]
Dec  7 17:12:08 server-amd zms[18520]: INF [Debug Level = 0, Debug Log = <none>]
Dec  7 17:12:08 server-amd zms[18520]: INF [Got signal 15 (Terminated), exiting]
Dec  7 17:12:11 server-amd zms[18521]: INF [Debug Level = 0, Debug Log = <none>]
Dec  7 17:12:11 server-amd zms[18521]: INF [Got signal 15 (Terminated), exiting]
Dec  7 17:12:12 server-amd zms[18519]: ERR [Frame send time 811 msec too slow, throttling maxfps to 10.00]
Dec  7 17:12:14 server-amd zms[18519]: ERR [Frame send time 306 msec too slow, throttling maxfps to 6.67]
Dec  7 17:12:19 server-amd zms[18519]: ERR [Frame send time 743 msec too slow, throttling maxfps to 4.44]
Dec  7 17:12:19 server-amd zmc_dvideo8[18484]: WAR [Capture failure, possible signal loss?: Input/output error]
Dec  7 17:12:19 server-amd zmc_dvideo8[18484]: ERR [Failed to capture image from monitor 4 (0/1)]
Dec  7 17:12:19 server-amd zmdc[17482]: ERR ['zmc -d /dev/video8' exited abnormally, exit status 255]
Dec  7 17:12:21 server-amd zmc_dvideo5[17990]: INF [cam1: 2000 - Capturing at 5.00 fps]
Dec  7 17:12:24 server-amd zms[18518]: INF [Got signal 15 (Terminated), exiting]
Dec  7 17:12:29 server-amd zms[18519]: ERR [Terminating, last frame sent time 10.012601 secs more than maximum of 10.000000]
execcr
Posts: 19
Joined: Tue May 02, 2006 3:58 pm
Location: Italy -- Cremona

Post by execcr »

i tried to recompile zm with mmap enabled.

Seems better!

one question; i have to rewrite original ubuntu shmmax and shmall in sysctl.conf back?
execcr
Posts: 19
Joined: Tue May 02, 2006 3:58 pm
Location: Italy -- Cremona

Post by execcr »

No way... camera goes again black!

i set sysctl.conf to kernel.shmall=393216
and kernel.shmmax=393216000
1,5gb ram DDR.

i have 3 cam operating as 640x480 in grey scale, v4l2 device, at 10fps.

Why one cam goes always black before some time???

I have to add more ram?? In top every zmc process take 120mb of ram, and i have only 3 of these!!

please, someone give me some advice...
adi1133
Posts: 6
Joined: Tue Dec 01, 2009 4:51 pm

Post by adi1133 »

just dont use ubuntu 9.10 , it has plenty of conflicts wth zoneminder, use a different distro or ubuntu 8.04. I wasnt able to use any version of zoneminder on ubuntu 9.10.
sunucu
Posts: 13
Joined: Fri May 02, 2008 11:02 am

Post by sunucu »

I've got same problem. Did you fix, how?
I wrote my server's system properties below (to my signature)
Both of two cams operating as 640x480 px in rgb24, v4l1 at 20fps

At first system start, the one of cams (mon1) was black and other one(mon2) was working. But now, mon-1 still black and mon-2 is not working. :(
OSVER: Ubuntu Server 9.10 Karmic
ZMVER: ZoneMinder 1.24.2
DEVICE: Conexant CX23881 (4 Channel) with 2 CCD cams.
VIDEO: GeForce 9400GT 1GB (non-shared)
RAM: 1GB DDR2
CPU: Intel Pentium Dual 2.00GHz
coke
Posts: 518
Joined: Wed Jan 30, 2008 5:53 pm
Location: St. Louis, MO, USA

Post by coke »

I've got a 9.10 running 1.24.2 dandy (at lower loads than it was at 8.0.4), aside from not being able to create video (yet), but that's probably something I screwed up compiling ffmpeg.
adi1133 wrote:just dont use ubuntu 9.10 , it has plenty of conflicts wth zoneminder, use a different distro or ubuntu 8.04. I wasnt able to use any version of zoneminder on ubuntu 9.10.
sunucu
Posts: 13
Joined: Fri May 02, 2008 11:02 am

Post by sunucu »

free

Code: Select all

             total       used       free     shared    buffers     cached
Mem:       1026520     992172      34348          0      33796     800944
-/+ buffers/cache:     157432     869088
Swap:      3036244          0    3036244
ipcs -l

Code: Select all

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 72000
max total shared memory (kbytes) = 1024000
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 = 1731
max size of message (bytes) = 8192
default max size of queue (bytes) = 16384
Please someone help me? One of my cam is still black!! :(

What is my fault?
OSVER: Ubuntu Server 9.10 Karmic
ZMVER: ZoneMinder 1.24.2
DEVICE: Conexant CX23881 (4 Channel) with 2 CCD cams.
VIDEO: GeForce 9400GT 1GB (non-shared)
RAM: 1GB DDR2
CPU: Intel Pentium Dual 2.00GHz
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

There isn't enough info to diagnose the problem.

:idea: run dmesg and check for driver problems, they will show up towards the end if this is the case.
:idea: Check your interrupts and make sure there is not a conflict -> cat /proc/interrupts
:idea: Turn on debug as described in the troubleshooting/Documentation in the wiki as well as the many posts.
Locked