Working cameras fail with shared mem err & wrong card ty

Post here to ask any questions about hardware suitability, configuration in ZoneMinder, or experiences. If you just want to know if something works with ZoneMinder or not, please check the Hardware Compatibility sections in the forum, and the Wiki first. Also search this topic as well.
Post Reply
p0g0ZoneM
Posts: 4
Joined: Mon Jul 30, 2007 6:43 pm

Working cameras fail with shared mem err & wrong card ty

Post by p0g0ZoneM »

Hi All,

ZoneMinder won't present images for me in the monitor popups, it appears I have a misconfiguration.

I've installed ZoneMinder from .deb. I've three /dev/video devices (0,1,2) and can view camera output from them with xawtv. I've set up three monitors (m1,m2,m3), bound them to the video devices using the web interface by assigning the Source Device Path (/dev/video0, etc) and Channel (none work, but composite2 should, so channel=2). The other settings are NTSC, RGB24, and 320x240.

The cards are running the saa7134 module with options "card=54,54,54 tuner=2,2,2 i2c_scan=1 alsa=1" and zmu sees the cards: "zmu -d /dev/video0 -q -v ", however zmu sees the wrong card type (47 not the 54 assigned by modprobe/saa7134) -

zmu -d /dev/video0 -q -v
Video Capabilities
Name: LifeView FlyTV Platinum FM / Go
Type: 47
Can capture
Can tune
Does teletext
Overlay onto frame buffer
Can clip
Video Channels: 4
Audio Channels: 0
Maximum Width: 704
Maximum Height: 480
Minimum Width: 48
Minimum Height: 32


The cards are saa7130 chipsets, like the LifeView 2000.

To date FireFox, Mozilla, and Konqueror all fail to show an image in the monitor popups, but the cgi paths are right (if I tweak them, no image frame is shown, when they are right, the "broken imge" icon is shown).


zmdc.log contains:
07/30/07 15:10:23.372385 zmdc[32519].INF ['zmc -d /dev/video0' starting at 07/07/30 15:10:23, pid = 3222]
07/30/07 15:10:23.383889 zmdc[32519].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]

zmwatch.log contains lines like:
07/30/07 15:11:48.991023 zmwatch[32557].INF ['zmc -d /dev/video0' starting at 07/07/30 15:11:48, pid = 3347]
07/30/07 15:11:48.991981 zmwatch[32557].ERR [Can't get shared memory id '7a6d2002', 2: No such file or directory]
07/30/07 15:11:59.448776 zmwatch[32557].INF [Restarting capture daemon for m1, shared memory not valid]



ipcs shows shared memory in use. No shared memory is committed until I try to view a monitor by clicking on the monitor name in the web gui, then I can see values like the below (Monitor 1 has been clicked, but not 2 or 3):
ipcs -m | grep www
0x7a6d2001 7372842 www-data 700 9217188 0


When I next try Monitor 2, it too shows up
ipcs -m | grep www
0x7a6d2001 7372842 www-data 700 9217188 0
0x7a6d2002 7405612 www-data 700 9217188 0






If I stop ZoneMinder, it releases the shared memory, but otherwise the allocations remain. When I restart ZoneMinder, the zmwatch log shows that Zoneminder is still looking for the shared memory that it just released:


ipcs -m | grep www
<no output->

ivyeyes:/tmp# tail zmwatch.log
07/30/07 15:31:01.279287 zmwatch[5016].INF [Restarting capture daemon for m1, shared memory not valid]
07/30/07 15:31:01.505071 zmwatch[5016].INF ['zmc -d /dev/video0' starting at 07/07/30 15:31:01, pid = 5059]

And when ZoneMinder is restarted, the shared memory is re-allocated when I re-click the monitors, but again

07/30/07 15:39:06.718708 zmwatch[5016].INF ['zmc -d /dev/video0' starting at 07/07/30 15:39:06, pid = 5888]
07/30/07 15:39:06.719865 zmwatch[5016].INF [Restarting capture daemon for m2, shared memory not valid]
07/30/07 15:39:06.944234 zmwatch[5016].INF ['zmc -d /dev/video1' starting at 07/07/30 15:39:06, pid = 5890]
07/30/07 15:39:06.945373 zmwatch[5016].INF [Restarting capture daemon for m3, shared memory not valid]
07/30/07 15:39:07.172763 zmwatch[5016].INF ['zmc -d /dev/video2' starting at 07/07/30 15:39:07, pid = 5892]

and

07/30/07 15:39:06.698345 zmdc[4978].INF ['zmc -d /dev/video0' starting at 07/07/30 15:39:06, pid = 5888]
07/30/07 15:39:06.711977 zmdc[4978].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
07/30/07 15:39:06.924371 zmdc[4978].INF ['zmc -d /dev/video1' starting at 07/07/30 15:39:06, pid = 5890]
07/30/07 15:39:06.937717 zmdc[4978].ERR ['zmc -d /dev/video1' exited abnormally, exit status 255]
07/30/07 15:39:07.148705 zmdc[4978].INF ['zmc -d /dev/video2' starting at 07/07/30 15:39:07, pid = 5892]
07/30/07 15:39:07.166347 zmdc[4978].ERR ['zmc -d /dev/video2' exited abnormally, exit status 255]


Suggestions?

I _did_ assign a password to mysql, but I see nothing amiss there (the tables exist, are active and seem to be bound to the www-data user).

p0g0
p0g0ZoneM
Posts: 4
Joined: Mon Jul 30, 2007 6:43 pm

Post by p0g0ZoneM »

Fixed! The videoX devices had permission issues (hint, launch ZM, turn on debugging, stop ZM from the web GUI, wipe all the /tmp/zm*.log files, restart from the web GUI, then view the first entries in the log files).
rfk
Posts: 5
Joined: Mon Jul 30, 2007 11:47 am
Location: Germany

Post by rfk »

Hum, I am having the same problem. My first camera (video0) is working just perfect, the second one (video1) causes the same failures you described. The permissions on my video devices should be correct:

Code: Select all

# ls -l /dev/v4l/video*
crwxrwxrwx 1 root video 81, 0 Aug  1 16:02 /dev/v4l/video0
crwxrwxrwx 1 root video 81, 1 Aug  2 08:57 /dev/v4l/video1
Shared memory output:

Code: Select all

# ipcs -l|head -n7

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

# cat /proc/sys/kernel/shmall 
2147483648
# cat /proc/sys/kernel/shmmax 
2147483648
# cat /proc/sys/kernel/shmmni 
4096
The problem until I want to view the camera image within ZoneMinder:

Code: Select all

08/02/07 09:45:58.756207 zmwatch[6972].ERR [Can't get shared memory id '7a6d2003', 3: No such file or directory]
08/02/07 09:45:58.756406 zmwatch[6972].INF [Restarting capture daemon for CAM2, shared memory not valid]
And afterwards:

Code: Select all

08/02/07 09:46:15.649971 zmwatch[6972].INF [Restarting capture daemon for CAM2, shared memory not valid]
The machine is a dual-core Opteron with 4 GB system memory running Gentoo with kernel 2.6.21.5. The cameras are two identical Logitech webcams which both work if they're connected one after another. Any other ideas? Thanks in advance.
Last edited by rfk on Fri Aug 03, 2007 9:56 am, edited 1 time in total.
rfk
Posts: 5
Joined: Mon Jul 30, 2007 11:47 am
Location: Germany

Post by rfk »

Seems like I narrowed down the problem. The kernel messages (DEALLOC error on init_Isoc) tell me that the issue is caused by USB bandwidth limitation. An option would be to add a USB extension card or something (presumably :lol:) but maybe this can be solved with a hacked gspcav1 driver...

Edit: a PCI extension card solved the problem...
Post Reply