$ tail /tmp/zmdc.log

09/01/2010 19:40:16.048487 zmdc[6649].INF ['zmc -d /dev/video' crashed, signal 6]

09/01/2010 19:42:56.008015 zmdc[6649].INF [Starting pending process, zmc -d /dev/video]

09/01/2010 19:42:56.014022 zmdc[6649].INF ['zmc -d /dev/video' starting at 10/09/01 19:42:56, pid = 6785]

09/01/2010 19:42:56.038112 zmdc[6649].INF ['zmc -d /dev/video' crashed, signal 6]

09/01/2010 19:48:16.089741 zmdc[6649].INF [Starting pending process, zmc -d /dev/video]

09/01/2010 19:48:16.091740 zmdc[6649].INF ['zmc -d /dev/video' starting at 10/09/01 19:48:16, pid = 6873]

09/01/2010 19:48:16.116217 zmdc[6649].INF ['zmc -d /dev/video' crashed, signal 6]

09/01/2010 19:58:16.068871 zmdc[6649].INF [Starting pending process, zmc -d /dev/video]

09/01/2010 19:58:16.075869 zmdc[6649].INF ['zmc -d /dev/video' starting at 10/09/01 19:58:16, pid = 6924]

09/01/2010 19:58:16.103869 zmdc[6649].INF ['zmc -d /dev/video' crashed, signal 6]

$ cat /etc/issue

Linux Mint 8 Helena - x64 Edition \n \l

$ apt-cache policy zoneminder

zoneminder:

  Installed: 1.24.1-1ubuntu2

  Candidate: 1.24.1-1ubuntu2

  Version table:

 *** 1.24.1-1ubuntu2 0

            500 http://archive.ubuntu.com karmic/universe Packages

            100 /var/lib/dpkg/status

bash# gdb zmc

GNU gdb (GDB) 7.0-ubuntu

Copyright (C) 2009 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "x86_64-linux-gnu".

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>...

Reading symbols from /usr/bin/zmc...(no debugging symbols found)...done.

(gdb) set args -d /dev/video

(gdb) start

Function "main" not defined.

Make breakpoint pending on future shared library load? (y or [n]) y

Temporary breakpoint 1 (main) pending.

Starting program: /usr/bin/zmc -d /dev/video

[Thread debugging using libthread_db enabled]

Program received signal SIGABRT, Aborted.

0x00007ffff50e04b5 in raise () from /lib/libc.so.6

(gdb) where

#0  0x00007ffff50e04b5 in raise () from /lib/libc.so.6

#1  0x00007ffff50e3f50 in abort () from /lib/libc.so.6

#2  0x000000000041192e in ?? ()

#3  0x0000000000422d95 in ?? ()

#4  0x00000000004235ae in ?? ()

#5  0x0000000000431492 in ?? ()

#6  0x0000000000406c04 in ?? ()

#7  0x00007ffff50cbabd in __libc_start_main () from /lib/libc.so.6

#8  0x0000000000406699 in ?? ()

#9  0x00007fffffffec68 in ?? ()

#10 0x000000000000001c in ?? ()

#11 0x0000000000000003 in ?? ()

#12 0x00007fffffffee7c in ?? ()

#13 0x00007fffffffee89 in ?? ()

#14 0x00007fffffffee8c in ?? ()

#15 0x0000000000000000 in ?? ()

(gdb)

cute. let’s use /dev/video0.  the defaults implied the channel would append to /dev/video to form /dev/video0 (at least in my mind, at first).

09/01/2010 20:11:40.055968 zmdc[6649].INF [Starting pending process, zmc -d /dev/video0]

09/01/2010 20:11:40.058053 zmdc[6649].INF ['zmc -d /dev/video0' starting at 10/09/01 20:11:40, pid = 7128]

09/01/2010 20:11:40.094422 zmdc[6649].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]

$ zmu -d /dev/video0 -q -v

Video Capabilities

  Name: UVC Camera (046d:0821)

  Type: 1

        Can capture

  Video Channels: 1

  Audio Channels: 0

  Maximum Width: 2592

  Maximum Height: 1944

  Minimum Width: 48

  Minimum Height: 32

Window Attributes

  X Offset: 0

  Y Offset: 0

  Width: 640

  Height: 480

Picture Attributes

  Palette: 8 - YUYV

  Colour Depth: 16

  Brightness: 32896

  Hue: 0

  Colour :8224

  Contrast: 8224

  Whiteness: 0

Channel 0 Attributes

  Name: Camera 1

  Channel: 0

  Flags: 0

  Type: 2 - Camera

  Format: 0 - PAL

bash# echo 134217728 >/proc/sys/kernel/shmall

bash# echo 134217728 >/proc/sys/kernel/shmmax

bash# /etc/init.d/zoneminder restart

Stopping ZoneMinder: success

Starting ZoneMinder: success

bash# strace -fFo zmc-sux.log zmc -d /dev/video0

bash# tail zmc-sux.log

7342  poll([{fd=4, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)

7342  write(4, "\3\2\0\0\3select Id, Name, Function+0"..., 519) = 519

7342  read(4, "\1\0\0\1#,\0\0\2\3def\2zm\10Monitors\10Monito"..., 16384) = 2331

7342  mmap(NULL, 6221824, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6672b0f000

7342  mmap(NULL, 6221824, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6672520000

7342  shmget(0x7a6d0001, 248833524, IPC_CREAT|0700) = -1 EINVAL (Invalid argument)

7342  stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3543, ...}) = 0

7342  timer_gettime(0x465163, 0x7fff42802638) = -1 EINVAL (Invalid argument)

7342  sendto(3, "<139>Sep  1 20:22:15 zmc_dvideo0"..., 122, MSG_NOSIGNAL, NULL, 0) = 122

7342  exit_group(-1)                        = ?