Issues with 1.24 release on Slackware 12.2

Forum for questions and support relating to the 1.24.x releases only.
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Issues with 1.24 release on Slackware 12.2

Post by nuck »

As noted previously, I'm running into a snag with 2 multiplexed cameras. Sometimes they work, sometimes not. I don't really seem to be able to nail down anything specific.

For reference, I'm running on a Athlon 2400XP with 2 gigs of ram. I'm using a LMLBT4 card with 5 cameras, 2 of which are multiplexed on /dev/video0

Here's an excerpt from zmdc.log

02/10/2009 12:38:17.143954 zmdc[2882].INF [Server starting at 09/02/10 12:38:17]
02/10/2009 12:38:20.389882 zmdc[2882].INF ['zmc -d /dev/video3' starting at 09/02/10 12:38:20, pid = 2904]
02/10/2009 12:38:20.809008 zmdc[2882].INF ['zma -m 1' starting at 09/02/10 12:38:20, pid = 2907]
02/10/2009 12:38:21.285003 zmdc[2882].INF ['zmc -d /dev/video0' starting at 09/02/10 12:38:21, pid = 2910]
02/10/2009 12:38:21.808995 zmdc[2882].INF ['zma -m 2' starting at 09/02/10 12:38:21, pid = 2913]
02/10/2009 12:38:22.025308 zmdc[2882].ERR ['zmc -d /dev/video0' exited abnormally, exit status 11]
02/10/2009 12:38:22.026017 zmdc[2882].INF [Starting pending process, zmc -d /dev/video0]
02/10/2009 12:38:22.084990 zmdc[2882].INF ['zmc -d /dev/video0' starting at 09/02/10 12:38:22, pid = 2915]
02/10/2009 12:38:22.570383 zmdc[2882].INF ['zmc -d /dev/video0' already running at 09/02/10 12:38:22, pid = 2915]
02/10/2009 12:38:22.861322 zmdc[2882].ERR ['zmc -d /dev/video0' exited abnormally, exit status 11]
02/10/2009 12:38:23.047328 zmdc[2882].INF ['zma -m 3' starting at 09/02/10 12:38:23, pid = 2918]
02/10/2009 12:38:23.642942 zmdc[2882].INF ['zmc -d /dev/video1' starting at 09/02/10 12:38:23, pid = 2920]
02/10/2009 12:38:24.421144 zmdc[2882].INF ['zma -m 4' starting at 09/02/10 12:38:24, pid = 2923]
02/10/2009 12:38:25.093146 zmdc[2882].INF ['zmc -d /dev/video2' starting at 09/02/10 12:38:25, pid = 2926]
02/10/2009 12:38:25.917201 zmdc[2882].INF ['zma -m 5' starting at 09/02/10 12:38:25, pid = 2929]
02/10/2009 12:38:26.580441 zmdc[2882].INF ['zmfilter.pl' starting at 09/02/10 12:38:26, pid = 2932]
02/10/2009 12:38:27.025046 zmdc[2882].INF [Starting pending process, zmc -d /dev/video0]
02/10/2009 12:38:27.042857 zmdc[2882].INF ['zmc -d /dev/video0' starting at 09/02/10 12:38:27, pid = 2935]
02/10/2009 12:38:27.717303 zmdc[2882].INF ['zmaudit.pl -c' starting at 09/02/10 12:38:27, pid = 2936]
02/10/2009 12:38:28.010416 zmdc[2882].ERR ['zmc -d /dev/video0' exited abnormally, exit status 11]
02/10/2009 12:38:28.777291 zmdc[2882].INF ['zmwatch.pl' starting at 09/02/10 12:38:28, pid = 2938]
02/10/2009 12:38:29.853079 zmdc[2882].INF ['zmupdate.pl -c' starting at 09/02/10 12:38:29, pid = 2954]
02/10/2009 12:38:38.013580 zmdc[2882].INF [Starting pending process, zmc -d /dev/video0]
02/10/2009 12:38:38.069160 zmdc[2882].INF ['zmc -d /dev/video0' starting at 09/02/10 12:38:38, pid = 2961]
02/10/2009 12:38:38.612074 zmdc[2882].ERR ['zmc -d /dev/video0' exited abnormally, exit status 11]
02/10/2009 12:38:58.030595 zmdc[2882].INF [Starting pending process, zmc -d /dev/video0]
02/10/2009 12:38:58.066847 zmdc[2882].INF ['zmc -d /dev/video0' starting at 09/02/10 12:38:58, pid = 2977]
02/10/2009 12:38:58.636040 zmdc[2882].ERR ['zmc -d /dev/video0' exited abnormally, exit status 11]
02/10/2009 12:39:10.395477 zmdc[2882].INF ['zmc -d /dev/video0' starting at 09/02/10 12:39:10, pid = 2979]
02/10/2009 12:39:10.953106 zmdc[2882].ERR ['zmc -d /dev/video0' exited abnormally, exit status 11]
02/10/2009 12:39:20.992034 zmdc[2882].INF ['zmc -d /dev/video0' starting at 09/02/10 12:39:20, pid = 2981]
02/10/2009 12:39:21.607693 zmdc[2882].ERR ['zmc -d /dev/video0' exited abnormally, exit status 11]
02/10/2009 12:39:31.627984 zmdc[2882].INF ['zmc -d /dev/video0' starting at 09/02/10 12:39:31, pid = 2983]
02/10/2009 12:39:32.249790 zmdc[2882].ERR ['zmc -d /dev/video0' exited abnormally, exit status 11]
02/10/2009 12:39:42.212709 zmdc[2882].INF ['zmc -d /dev/video0' starting at 09/02/10 12:39:42, pid = 2985]
02/10/2009 12:39:42.782601 zmdc[2882].ERR ['zmc -d /dev/video0' exited abnormally, exit status 11]
02/10/2009 12:39:52.753626 zmdc[2882].INF ['zmc -d /dev/video0' starting at 09/02/10 12:39:52, pid = 2987]
02/10/2009 12:39:53.330938 zmdc[2882].ERR ['zmc -d /dev/video0' exited abnormally, exit status 11]

and on, and on......

I've also noticed that my system is running slower than the second coming. Checking with top I see -

Code: Select all

PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                
2907 apache    20   0  151m  46m  38m S 29.7  2.4   1:46.21 zma                                                       
2904 apache    20   0  168m  63m  54m R 25.8  3.2   1:48.89 zmc                                                             
2923 apache    20   0  123m  18m  12m S  4.0  0.9   0:07.18 zma                                                            
2926 apache    20   0  139m  34m  28m S  4.0  1.7   0:06.80 zmc                                                   
2929 apache    20   0  123m  18m  12m S  4.0  0.9   0:07.20 zma                                                     
2795 apache    20   0 60212 5976 1976 S  0.0  0.3   0:00.00 httpd                                                   
2796 apache    20   0 60212 5976 1976 S  0.0  0.3   0:00.00 httpd                                                      
2797 apache    20   0 60212 5976 1976 S  0.0  0.3   0:00.00 httpd                                                        
2798 apache    20   0 60212 5976 1976 S  0.0  0.3   0:00.00 httpd                                                        
2799 apache    20   0 60212 5976 1976 S  0.0  0.3   0:00.00 httpd                                                        
2882 apache    20   0 11712 6192 1416 S  0.0  0.3   0:00.66 zmdc.pl                                                      
2913 apache    20   0  123m 9.9m 3568 S  0.0  0.5   0:00.32 zma                                                         
2918 apache    20   0  123m 9920 3556 S  0.0  0.5   0:00.20 zma                                                         
2920 apache    20   0  139m  34m  28m S  0.0  1.7   0:06.98 zmc                                                             
2932 apache    20   0 14724  10m 2836 S  0.0  0.5   0:00.32 zmfilter.pl                                               
2936 apache    20   0 12352 8396 2872 S  0.0  0.4   0:00.36 zmaudit.pl                                                
2938 apache    20   0 11584 7528 2860 S  0.0  0.4   0:00.38 zmwatch.pl                                         
2954 apache    20   0 13176 9084 2824 S  0.0  0.4   0:00.28 zmupdate.pl
Should I expect to see this kind of cpu usage for zma and zmc? I've seen the cpu usage hit close to 45% for both on a forced alarm.

Suggestions??
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Check what is in your syslog, maybe /var/log/messages I don't know on Slackware.

CPU use varies depending on how things are configured but I would suggest getting things working first but your CPU does seem high. There is a FAQ on CPU use in the Wiki which is probably worth having a look at.
Phil
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Post by nuck »

zoneminder wrote:Check what is in your syslog, maybe /var/log/messages I don't know on Slackware.
Here's an excerpt from /var/log/syslog

Feb 10 13:48:18 ZM zma_m1[2833]: WAR [Waiting for capture daemon]
Feb 10 13:48:19 ZM zmc_dvideo0[2836]: ERR [Signal address is 0x8, from 0x8061596]
Feb 10 13:48:19 ZM zmc_dvideo0[2836]: ERR [Backtrace: /usr/bin/zmc [0x8061596]]
Feb 10 13:48:19 ZM zmc_dvideo0[2836]: ERR [Backtrace: /usr/bin/zmc [0x8061596]]
Feb 10 13:48:19 ZM zmc_dvideo0[2836]: ERR [Backtrace: /usr/bin/zmc [0x806947f]]
Feb 10 13:48:19 ZM zmc_dvideo0[2836]: ERR [Backtrace: /usr/bin/zmc [0x804d06e]]
Feb 10 13:48:19 ZM zmc_dvideo0[2836]: ERR [Backtrace: /lib/libc.so.6(__libc_start_main+0xe0) [0xb734f390]]
Feb 10 13:48:19 ZM zmc_dvideo0[2836]: ERR [Backtrace: /usr/bin/zmc [0x804c8f1]]
Feb 10 13:48:19 ZM zmdc[2808]: ERR ['zmc -d /dev/video0' exited abnormally, exit status 11]
Feb 10 13:48:20 ZM zmc_dvideo0[2842]: ERR [Signal address is 0x8, from 0x8061596]
Feb 10 13:48:20 ZM zmc_dvideo0[2842]: ERR [Backtrace: /usr/bin/zmc [0x8061596]]
Feb 10 13:48:20 ZM zmc_dvideo0[2842]: ERR [Backtrace: /usr/bin/zmc [0x8061596]]
Feb 10 13:48:20 ZM zmc_dvideo0[2842]: ERR [Backtrace: /usr/bin/zmc [0x806947f]]
Feb 10 13:48:20 ZM zmc_dvideo0[2842]: ERR [Backtrace: /usr/bin/zmc [0x804d06e]]
Feb 10 13:48:20 ZM zmc_dvideo0[2842]: ERR [Backtrace: /lib/libc.so.6(__libc_start_main+0xe0) [0xb72b8390]]
Feb 10 13:48:20 ZM zmc_dvideo0[2842]: ERR [Backtrace: /usr/bin/zmc [0x804c8f1]]
Feb 10 13:48:20 ZM zmdc[2808]: ERR ['zmc -d /dev/video0' exited abnormally, exit status 11]
Feb 10 13:48:21 ZM zma_m3[2844]: WAR [Waiting for capture daemon]
Feb 10 13:48:26 ZM last message repeated 5 times
Feb 10 13:48:26 ZM zmc_dvideo0[2861]: ERR [Signal address is 0x8, from 0x8061596]
Feb 10 13:48:26 ZM zmc_dvideo0[2861]: ERR [Backtrace: /usr/bin/zmc [0x8061596]]
Feb 10 13:48:26 ZM zmc_dvideo0[2861]: ERR [Backtrace: /usr/bin/zmc [0x8061596]]
Feb 10 13:48:26 ZM zmc_dvideo0[2861]: ERR [Backtrace: /usr/bin/zmc [0x806947f]]
Feb 10 13:48:26 ZM zmc_dvideo0[2861]: ERR [Backtrace: /usr/bin/zmc [0x804d06e]]
Feb 10 13:48:26 ZM zmc_dvideo0[2861]: ERR [Backtrace: /lib/libc.so.6(__libc_start_main+0xe0) [0xb736b390]]
Feb 10 13:48:26 ZM zmc_dvideo0[2861]: ERR [Backtrace: /usr/bin/zmc [0x804c8f1]]
Feb 10 13:48:26 ZM zmdc[2808]: ERR ['zmc -d /dev/video0' exited abnormally, exit status 11]
Feb 10 13:48:27 ZM zma_m3[2844]: WAR [Waiting for capture daemon]

And here's the corresponding excerpt from /var/log/messages

Feb 10 13:48:13 ZM zmpkg[2793]: INF [Command: start]
Feb 10 13:48:13 ZM sudo: root : TTY=console ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/bin/true
Feb 10 13:48:13 ZM sudo: root : TTY=console ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl check
Feb 10 13:48:14 ZM sudo: root : TTY=console ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmfix
Feb 10 13:48:14 ZM sudo: root : TTY=console ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl startup
Feb 10 13:48:15 ZM zmdc[2808]: INF [Server starting at 09/02/10 13:48:15]
Feb 10 13:48:18 ZM sudo: root : TTY=console ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmc -d /dev/video3
Feb 10 13:48:18 ZM zmdc[2830]: INF ['zmc -d /dev/video3' started at 09/02/10 13:48:18]
Feb 10 13:48:18 ZM zmdc[2808]: INF ['zmc -d /dev/video3' starting at 09/02/10 13:48:18, pid = 2830]
Feb 10 13:48:18 ZM sudo: root : TTY=console ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zma -m 1
Feb 10 13:48:18 ZM zmc_dvideo3[2830]: INF [Debug Level = 0, Debug Log = <none>]
Feb 10 13:48:18 ZM zmdc[2833]: INF ['zma -m 1' started at 09/02/10 13:48:18]
Feb 10 13:48:18 ZM zmdc[2808]: INF ['zma -m 1' starting at 09/02/10 13:48:18, pid = 2833]
Feb 10 13:48:18 ZM sudo: root : TTY=console ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmc -d /dev/video0
Feb 10 13:48:18 ZM zmc_dvideo3[2830]: INF [Starting Capture]
Feb 10 13:48:18 ZM zma_m1[2833]: INF [Debug Level = 0, Debug Log = <none>]
Feb 10 13:48:19 ZM zmdc[2836]: INF ['zmc -d /dev/video0' started at 09/02/10 13:48:19]
Feb 10 13:48:19 ZM zmdc[2808]: INF ['zmc -d /dev/video0' starting at 09/02/10 13:48:19, pid = 2836]
Feb 10 13:48:19 ZM sudo: root : TTY=console ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zma -m 2
Feb 10 13:48:19 ZM zmc_dvideo0[2836]: INF [Debug Level = 0, Debug Log = <none>]
Feb 10 13:48:19 ZM zmc_dvideo0[2836]: INF [Starting Capture]
Feb 10 13:48:19 ZM zmdc[2839]: INF ['zma -m 2' started at 09/02/10 13:48:19]
Feb 10 13:48:19 ZM zmdc[2808]: INF ['zma -m 2' starting at 09/02/10 13:48:19, pid = 2839]
Feb 10 13:48:19 ZM sudo: root : TTY=console ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmc -d /dev/video0
Feb 10 13:48:19 ZM zma_m2[2839]: INF [Debug Level = 0, Debug Log = <none>]
Feb 10 13:48:19 ZM zma_m2[2839]: INF [In mode 3/1, warming up]
Feb 10 13:48:19 ZM zmc_dvideo0[2836]: INF [Got signal 11 (Segmentation fault), crashing]
Feb 10 13:48:19 ZM zmc_dvideo0[2836]: INF [Backtrace complete]
Feb 10 13:48:19 ZM zma_m1[2833]: INF [In mode 3/1, warming up]
Feb 10 13:48:19 ZM zmdc[2808]: INF [Starting pending process, zmc -d /dev/video0]
Feb 10 13:48:19 ZM zmdc[2842]: INF ['zmc -d /dev/video0' started at 09/02/10 13:48:19]
Feb 10 13:48:19 ZM zmdc[2808]: INF ['zmc -d /dev/video0' starting at 09/02/10 13:48:19, pid = 2842]
Feb 10 13:48:20 ZM zmc_dvideo0[2842]: INF [Debug Level = 0, Debug Log = <none>]
Feb 10 13:48:20 ZM zmc_dvideo0[2842]: INF [Starting Capture]
Feb 10 13:48:20 ZM zmdc[2808]: INF ['zmc -d /dev/video0' already running at 09/02/10 13:48:19, pid = 2842]
Feb 10 13:48:20 ZM sudo: root : TTY=console ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zma -m 3
Feb 10 13:48:20 ZM zmc_dvideo0[2842]: INF [Got signal 11 (Segmentation fault), crashing]
Feb 10 13:48:20 ZM zmc_dvideo0[2842]: INF [Backtrace complete]
Feb 10 13:48:20 ZM zmdc[2844]: INF ['zma -m 3' started at 09/02/10 13:48:20]
Feb 10 13:48:20 ZM zmdc[2808]: INF ['zma -m 3' starting at 09/02/10 13:48:20, pid = 2844]
Feb 10 13:48:20 ZM sudo: root : TTY=console ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmc -d /dev/video1
Feb 10 13:48:21 ZM zma_m3[2844]: INF [Debug Level = 0, Debug Log = <none>]
Feb 10 13:48:21 ZM zmdc[2846]: INF ['zmc -d /dev/video1' started at 09/02/10 13:48:21]
Feb 10 13:48:21 ZM zmdc[2808]: INF ['zmc -d /dev/video1' starting at 09/02/10 13:48:21, pid = 2846]
Feb 10 13:48:21 ZM sudo: root : TTY=console ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zma -m 4
Feb 10 13:48:21 ZM zmc_dvideo1[2846]: INF [Debug Level = 0, Debug Log = <none>]
Feb 10 13:48:21 ZM zmc_dvideo1[2846]: INF [Starting Capture]
Feb 10 13:48:22 ZM zmdc[2849]: INF ['zma -m 4' started at 09/02/10 13:48:22]
Feb 10 13:48:22 ZM zmdc[2808]: INF ['zma -m 4' starting at 09/02/10 13:48:22, pid = 2849]
Feb 10 13:48:22 ZM sudo: root : TTY=console ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmc -d /dev/video2
Feb 10 13:48:22 ZM zma_m4[2849]: INF [Debug Level = 0, Debug Log = <none>]
Feb 10 13:48:22 ZM zma_m4[2849]: INF [In mode 3/1, warming up]
Feb 10 13:48:22 ZM zmdc[2852]: INF ['zmc -d /dev/video2' started at 09/02/10 13:48:22]
Feb 10 13:48:22 ZM zmdc[2808]: INF ['zmc -d /dev/video2' starting at 09/02/10 13:48:22, pid = 2852]
Feb 10 13:48:23 ZM sudo: root : TTY=console ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zma -m 5
Feb 10 13:48:23 ZM zmc_dvideo2[2852]: INF [Debug Level = 0, Debug Log = <none>]
Feb 10 13:48:23 ZM zmc_dvideo2[2852]: INF [Starting Capture]
Feb 10 13:48:23 ZM zmdc[2855]: INF ['zma -m 5' started at 09/02/10 13:48:23]
Feb 10 13:48:23 ZM zmdc[2808]: INF ['zma -m 5' starting at 09/02/10 13:48:23, pid = 2855]
Feb 10 13:48:23 ZM sudo: root : TTY=console ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmfilter.pl
Feb 10 13:48:23 ZM zma_m5[2855]: INF [Debug Level = 0, Debug Log = <none>]
Feb 10 13:48:24 ZM zma_m5[2855]: INF [In mode 3/1, warming up]
Feb 10 13:48:24 ZM zmdc[2858]: INF ['zmfilter.pl' started at 09/02/10 13:48:24]
Feb 10 13:48:24 ZM zmdc[2808]: INF ['zmfilter.pl' starting at 09/02/10 13:48:24, pid = 2858]
Feb 10 13:48:24 ZM sudo: root : TTY=console ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmaudit.pl -c
Feb 10 13:48:25 ZM zmdc[2808]: INF [Starting pending process, zmc -d /dev/video0]
Feb 10 13:48:25 ZM zmdc[2861]: INF ['zmc -d /dev/video0' started at 09/02/10 13:48:25]
Feb 10 13:48:25 ZM zmdc[2808]: INF ['zmc -d /dev/video0' starting at 09/02/10 13:48:25, pid = 2861]
Feb 10 13:48:25 ZM zmc_dvideo0[2861]: INF [Debug Level = 0, Debug Log = <none>]
Feb 10 13:48:25 ZM zmdc[2862]: INF ['zmaudit.pl -c' started at 09/02/10 13:48:25]
Feb 10 13:48:25 ZM zmdc[2808]: INF ['zmaudit.pl -c' starting at 09/02/10 13:48:25, pid = 2862]
Feb 10 13:48:25 ZM sudo: root : TTY=console ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmwatch.pl
Feb 10 13:48:25 ZM zmc_dvideo0[2861]: INF [Starting Capture]
Feb 10 13:48:26 ZM zmfilter[2858]: INF [Scanning for events]
Feb 10 13:48:26 ZM zmc_dvideo0[2861]: INF [Got signal 11 (Segmentation fault), crashing]
Feb 10 13:48:26 ZM zmc_dvideo0[2861]: INF [Backtrace complete]
Feb 10 13:48:26 ZM zmdc[2865]: INF ['zmwatch.pl' started at 09/02/10 13:48:26]
Feb 10 13:48:26 ZM zmdc[2808]: INF ['zmwatch.pl' starting at 09/02/10 13:48:26, pid = 2865]
Feb 10 13:48:26 ZM sudo: root : TTY=console ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmupdate.pl -c
Feb 10 13:48:27 ZM zmwatch[2865]: INF [Watchdog starting]
Feb 10 13:48:27 ZM zmwatch[2865]: INF [Watchdog pausing for 30 seconds]
Feb 10 13:48:27 ZM zmdc[2868]: INF ['zmupdate.pl -c' started at 09/02/10 13:48:27]
Feb 10 13:48:27 ZM zmdc[2808]: INF ['zmupdate.pl -c' starting at 09/02/10 13:48:27, pid = 2868]
Feb 10 13:48:36 ZM zmdc[2808]: INF [Starting pending process, zmc -d /dev/video0]
Feb 10 13:48:36 ZM zmdc[2889]: INF ['zmc -d /dev/video0' started at 09/02/10 13:48:36]
Feb 10 13:48:36 ZM zmdc[2808]: INF ['zmc -d /dev/video0' starting at 09/02/10 13:48:36, pid = 2889]
Feb 10 13:48:36 ZM zmc_dvideo0[2889]: INF [Debug Level = 0, Debug Log = <none>]
Feb 10 13:48:36 ZM zmc_dvideo0[2889]: INF [Starting Capture]
Feb 10 13:48:36 ZM zmc_dvideo0[2889]: INF [Got signal 11 (Segmentation fault), crashing]
Feb 10 13:48:36 ZM zmc_dvideo0[2889]: INF [Backtrace complete]


Does this tell you anything?

Doesn't do much for me other than telling me that zmc is seg faulting for some reason and it appears to me as though what's happening is zmc crashing when it is starting on /dev/video0 on the second channel. I'll fire it up later tonight with the debugging cranked up and see what it has to say.
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Post by nuck »

zoneminder wrote:CPU use varies depending on how things are configured but I would suggest getting things working first but your CPU does seem high. There is a FAQ on CPU use in the Wiki which is probably worth having a look at.
I'm running pretty much the exact same setup I use with 1.23.3, but I'll have a read later and see what I can find. I'm not seeing much over 8-9% cpu total usage on all instances of either zma or zmc combined with 1.23.3 at the moment.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Typing

Code: Select all

addr2line -e /usr/bin/zmc 0x8061596 0x806947f 0x804d06e
can sometime give some useful information. Failing that, stop ZM and then (probably as root) type

Code: Select all

gdb /usr/bin/zmc
run -d /dev/video0
<wait>
bt
If you think it may be V4L2 related you can configure monitors to use V4L1 instead so that might be worth a try.
Phil
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Post by nuck »

zoneminder wrote:If you think it may be V4L2 related you can configure monitors to use V4L1 instead so that might be worth a try.
I got it.... What is happening is when I go to define a new monitor (the first time) as V4L2 the list box of device formats is only giving me the protocols for V4L1 and I've been selecting NTSC and then selecting grey for the palette. That setup was failing (of course) so I then selected V4L1 (not knowing that I wasn't seeing the full list of options available for V4L2) which is crashing when multiplexing the inputs.

When I went back in to redefine the monitors as V4L2, I got the full list of protocols as well as palette choices. I don't know if it is something peculiar to my system or not but I think I stumbled onto a bug.

Otherwise, all is good now or seems to be. Funny how it's always what you inspect and not what you expect...

All that said, what I am seeing when I first define a monitor with the default V4L2 selected, under the device format options I get the choices of undefined, PAL, NTSC, Secam, Auto FMT4, FMt5, FMT6 and FMT7 and under the capture pallete drop down I'm getting the choices undefined, grey, rgb24, rgb565, rgb555, yuv422, yuyv, yuv422p and yuv420p. If I switch from V4L2 to V4L1 and then back to V4L2 I then get the more extensive list that corresponds to V4L2.
Last edited by nuck on Wed Feb 11, 2009 6:40 am, edited 1 time in total.
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Post by nuck »

Seems all is not well afterall. I can get a monitor working with V4L2 on /dev/video0 but if I add a monitor on the second channel I lose both monitors. But no crashes, so I thnk progress has been made.

Just for the giggles, I fired up gdb and here's what I got with 2 monitors configured as V4L1 (which seems to be causing the crash).

Code: Select all

Starting program: /usr/bin/zmc -d /dev/video0
[Thread debugging using libthread_db enabled]
[New Thread 0xb68426d0 (LWP 3920)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb68426d0 (LWP 3920)]
0x08061596 in LocalCamera::Capture (this=0xdb542c0, image=@0xdb54440) at zm_local_camera.cpp:1292
1292	        sws_scale( imgConversionContext, ffPictures[capture_frame]->data, ffPictures[capture_frame]->linesize, 0, height, tmpPicture->data, tmpPicture->linesize );
#0  0x08061596 in LocalCamera::Capture (this=0xdb542c0, image=@0xdb54440) at zm_local_camera.cpp:1292
#1  0x0806947f in Monitor::Capture (this=0xdb54310) at zm_monitor.cpp:2472
#2  0x0804d06e in main (argc=420483088, argv=0x11121017) at zmc.cpp:256
The program is running.  Exit anyway? (y or n)  
With the monitors set up as V4L2 everything checks out fine with gdb.

I tried mutplexing on /dev/video1 and the result is the same. ZM indicates all is well with green labels but the frame rate is 0 when I view either monitor. I checked both channels with xawtv and I can select either channel fine. I've even gone so far as to define a monitor on /dev/videox channel 1 and left channel 0 undefined and it's working ok. Seems as though simultaneous access is where the problem lies.
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Post by nuck »

Here's a copy of my /var/log/messages right after starting up ZM. The trouble spot I'm seeing begins with zmdc[5478] @ 02:29:56 (monitor 2 /dev/video0 0) and continues through setting up monitor 8 (/dev/video0 1).

Code: Select all

Feb 11 02:29:51 ZM zmpkg[5443]: INF [Command: start] 
Feb 11 02:29:51 ZM sudo:     root : TTY=pts/2 ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/bin/true
Feb 11 02:29:51 ZM sudo:     root : TTY=pts/2 ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl check
Feb 11 02:29:51 ZM sudo:     root : TTY=pts/2 ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmfix
Feb 11 02:29:51 ZM sudo:     root : TTY=pts/2 ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl startup
Feb 11 02:29:52 ZM zmdc[5452]: INF [Server starting at 09/02/11 02:29:52] 
Feb 11 02:29:55 ZM sudo:     root : TTY=pts/2 ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmc -d /dev/video3
Feb 11 02:29:55 ZM zmdc[5474]: INF ['zmc -d /dev/video3' started at 09/02/11 02:29:55] 
Feb 11 02:29:55 ZM zmdc[5452]: INF ['zmc -d /dev/video3' starting at 09/02/11 02:29:55, pid = 5474] 
Feb 11 02:29:55 ZM sudo:     root : TTY=pts/2 ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zma -m 1
Feb 11 02:29:55 ZM zmc_dvideo3[5474]: INF [Debug Level = 0, Debug Log = <none>]
Feb 11 02:29:55 ZM zmc_dvideo3[5474]: INF [Starting Capture]
Feb 11 02:29:55 ZM zmdc[5476]: INF ['zma -m 1' started at 09/02/11 02:29:55] 
Feb 11 02:29:55 ZM zmdc[5452]: INF ['zma -m 1' starting at 09/02/11 02:29:55, pid = 5476] 
Feb 11 02:29:55 ZM sudo:     root : TTY=pts/2 ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmc -d /dev/video0
Feb 11 02:29:55 ZM zma_m1[5476]: INF [Debug Level = 0, Debug Log = <none>]
Feb 11 02:29:55 ZM zma_m1[5476]: INF [In mode 3/1, warming up]
Feb 11 02:29:56 ZM zmdc[5478]: INF ['zmc -d /dev/video0' started at 09/02/11 02:29:56] 
Feb 11 02:29:56 ZM zmdc[5452]: INF ['zmc -d /dev/video0' starting at 09/02/11 02:29:56, pid = 5478] 
Feb 11 02:29:56 ZM sudo:     root : TTY=pts/2 ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zma -m 2
Feb 11 02:29:56 ZM zmc_dvideo0[5478]: INF [Debug Level = 0, Debug Log = <none>]
Feb 11 02:29:56 ZM zmc_dvideo0[5478]: INF [Starting Capture]
Feb 11 02:29:56 ZM zmdc[5480]: INF ['zma -m 2' started at 09/02/11 02:29:56] 
Feb 11 02:29:56 ZM zmdc[5452]: INF ['zma -m 2' starting at 09/02/11 02:29:56, pid = 5480] 
Feb 11 02:29:56 ZM sudo:     root : TTY=pts/2 ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmc -d /dev/video0
Feb 11 02:29:56 ZM zma_m2[5480]: INF [Debug Level = 0, Debug Log = <none>]
Feb 11 02:29:56 ZM zmdc[5452]: INF ['zmc -d /dev/video0' already running at 09/02/11 02:29:56, pid = 5478] 
Feb 11 02:29:56 ZM sudo:     root : TTY=pts/2 ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zma -m 8
Feb 11 02:29:57 ZM zmdc[5483]: INF ['zma -m 8' started at 09/02/11 02:29:57] 
Feb 11 02:29:57 ZM zmdc[5452]: INF ['zma -m 8' starting at 09/02/11 02:29:57, pid = 5483] 
Feb 11 02:29:57 ZM sudo:     root : TTY=pts/2 ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmc -d /dev/video1
Feb 11 02:29:57 ZM zma_m8[5483]: INF [Debug Level = 0, Debug Log = <none>]
Feb 11 02:29:57 ZM zmdc[5485]: INF ['zmc -d /dev/video1' started at 09/02/11 02:29:57] 
Feb 11 02:29:57 ZM zmdc[5452]: INF ['zmc -d /dev/video1' starting at 09/02/11 02:29:57, pid = 5485] 
Feb 11 02:29:57 ZM sudo:     root : TTY=pts/2 ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zma -m 4
Feb 11 02:29:57 ZM zmc_dvideo1[5485]: INF [Debug Level = 0, Debug Log = <none>]
Feb 11 02:29:57 ZM zmc_dvideo1[5485]: INF [Starting Capture]
Feb 11 02:29:57 ZM zmdc[5487]: INF ['zma -m 4' started at 09/02/11 02:29:57] 
Feb 11 02:29:57 ZM zmdc[5452]: INF ['zma -m 4' starting at 09/02/11 02:29:57, pid = 5487] 
Feb 11 02:29:57 ZM sudo:     root : TTY=pts/2 ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmc -d /dev/video2
Feb 11 02:29:57 ZM zma_m4[5487]: INF [Debug Level = 0, Debug Log = <none>]
Feb 11 02:29:58 ZM zma_m4[5487]: INF [In mode 3/1, warming up]
Feb 11 02:29:58 ZM zmdc[5490]: INF ['zmc -d /dev/video2' started at 09/02/11 02:29:58] 
Feb 11 02:29:58 ZM zmdc[5452]: INF ['zmc -d /dev/video2' starting at 09/02/11 02:29:58, pid = 5490] 
Feb 11 02:29:58 ZM sudo:     root : TTY=pts/2 ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zma -m 5
Feb 11 02:29:58 ZM zmc_dvideo2[5490]: INF [Debug Level = 0, Debug Log = <none>]
Feb 11 02:29:58 ZM zmc_dvideo2[5490]: INF [Starting Capture]
Feb 11 02:29:58 ZM zmdc[5493]: INF ['zma -m 5' started at 09/02/11 02:29:58] 
Feb 11 02:29:58 ZM zmdc[5452]: INF ['zma -m 5' starting at 09/02/11 02:29:58, pid = 5493] 
Feb 11 02:29:58 ZM sudo:     root : TTY=pts/2 ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmfilter.pl
Feb 11 02:29:58 ZM zma_m5[5493]: INF [Debug Level = 0, Debug Log = <none>]
Feb 11 02:29:58 ZM zma_m5[5493]: INF [In mode 3/1, warming up]
Feb 11 02:29:58 ZM zmdc[5496]: INF ['zmfilter.pl' started at 09/02/11 02:29:58] 
Feb 11 02:29:59 ZM zmdc[5452]: INF ['zmfilter.pl' starting at 09/02/11 02:29:59, pid = 5496] 
Feb 11 02:29:59 ZM sudo:     root : TTY=pts/2 ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmaudit.pl -c
Feb 11 02:29:59 ZM zmdc[5498]: INF ['zmaudit.pl -c' started at 09/02/11 02:29:59] 
Feb 11 02:29:59 ZM zmdc[5452]: INF ['zmaudit.pl -c' starting at 09/02/11 02:29:59, pid = 5498] 
Feb 11 02:29:59 ZM sudo:     root : TTY=pts/2 ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmwatch.pl
Feb 11 02:29:59 ZM zmfilter[5496]: INF [Scanning for events] 
Feb 11 02:30:00 ZM zmdc[5501]: INF ['zmwatch.pl' started at 09/02/11 02:30:00] 
Feb 11 02:30:00 ZM zmdc[5452]: INF ['zmwatch.pl' starting at 09/02/11 02:30:00, pid = 5501] 
Feb 11 02:30:00 ZM sudo:     root : TTY=pts/2 ; PWD=/var/www/htdocs/zm ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmupdate.pl -c
Feb 11 02:30:00 ZM zmwatch[5501]: INF [Watchdog starting] 
Feb 11 02:30:00 ZM zmwatch[5501]: INF [Watchdog pausing for 30 seconds] 
Feb 11 02:30:00 ZM zmdc[5505]: INF ['zmupdate.pl -c' started at 09/02/11 02:30:00] 
Feb 11 02:30:00 ZM zmdc[5452]: INF ['zmupdate.pl -c' starting at 09/02/11 02:30:00, pid = 5505] 
Not that it says much, here's part of syslog (this goes on forever)

Code: Select all

Feb 11 02:29:56 ZM zma_m2[5480]: WAR [Waiting for capture daemon]
Feb 11 02:29:57 ZM zma_m8[5483]: WAR [Waiting for capture daemon]
Feb 11 02:29:57 ZM zma_m2[5480]: WAR [Waiting for capture daemon]
Feb 11 02:29:58 ZM zma_m8[5483]: WAR [Waiting for capture daemon]
Feb 11 02:29:58 ZM zma_m2[5480]: WAR [Waiting for capture daemon]
Feb 11 02:29:59 ZM zma_m8[5483]: WAR [Waiting for capture daemon]
Feb 11 02:29:59 ZM zma_m2[5480]: WAR [Waiting for capture daemon]
Feb 11 02:30:00 ZM zma_m8[5483]: WAR [Waiting for capture daemon]
Feb 11 02:30:00 ZM zma_m2[5480]: WAR [Waiting for capture daemon]
Feb 11 02:30:01 ZM zma_m8[5483]: WAR [Waiting for capture daemon]
Last but not least, here's zmdc.log right after zm startup

Code: Select all

02/11/2009 02:29:52.179852 zmdc[5452].INF [Server starting at 09/02/11 02:29:52]
02/11/2009 02:29:55.450446 zmdc[5452].INF ['zmc -d /dev/video3' starting at 09/02/11 02:29:55, pid = 5474]
02/11/2009 02:29:55.801554 zmdc[5452].INF ['zma -m 1' starting at 09/02/11 02:29:55, pid = 5476]
02/11/2009 02:29:56.142724 zmdc[5452].INF ['zmc -d /dev/video0' starting at 09/02/11 02:29:56, pid = 5478]
02/11/2009 02:29:56.558378 zmdc[5452].INF ['zma -m 2' starting at 09/02/11 02:29:56, pid = 5480]
02/11/2009 02:29:56.854697 zmdc[5452].INF ['zmc -d /dev/video0' already running at 09/02/11 02:29:56, pid = 5478]
02/11/2009 02:29:57.133993 zmdc[5452].INF ['zma -m 8' starting at 09/02/11 02:29:57, pid = 5483]
02/11/2009 02:29:57.458540 zmdc[5452].INF ['zmc -d /dev/video1' starting at 09/02/11 02:29:57, pid = 5485]
02/11/2009 02:29:57.858341 zmdc[5452].INF ['zma -m 4' starting at 09/02/11 02:29:57, pid = 5487]
02/11/2009 02:29:58.218448 zmdc[5452].INF ['zmc -d /dev/video2' starting at 09/02/11 02:29:58, pid = 5490]
02/11/2009 02:29:58.639878 zmdc[5452].INF ['zma -m 5' starting at 09/02/11 02:29:58, pid = 5493]
02/11/2009 02:29:59.006494 zmdc[5452].INF ['zmfilter.pl' starting at 09/02/11 02:29:59, pid = 5496]
02/11/2009 02:29:59.586029 zmdc[5452].INF ['zmaudit.pl -c' starting at 09/02/11 02:29:59, pid = 5498]
02/11/2009 02:30:00.254950 zmdc[5452].INF ['zmwatch.pl' starting at 09/02/11 02:30:00, pid = 5501]
02/11/2009 02:30:00.846334 zmdc[5452].INF ['zmupdate.pl -c' starting at 09/02/11 02:30:00, pid = 5505]
And on that note, I've had enough for tonight.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Thanks for all that. There are a few things there I can look at. Have you tried just defining both monitors to be V4L1 and seeing if it still crashes?
Phil
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I can confirm the broken behaviour on adding new monitors so I will fix that. I will look at the other issues also next.
Phil
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Post by nuck »

zoneminder wrote:Thanks for all that. There are a few things there I can look at. Have you tried just defining both monitors to be V4L1 and seeing if it still crashes?
Actually Phil, the crash only occurs when I have two monitors defined on the same port using channels 0 and 1 with V4L1. I was mistakenly configuring for V4L1 thinking V4L2 wouldn't work properly. :oops: When I configure for V4L2, one monitor will work fine on either channel 0 or 1, but if I enable a second channel on a port I get nothing on either.
Last edited by nuck on Wed Feb 11, 2009 3:33 pm, edited 1 time in total.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Ok. I did go through all this last week to check nothing was broken but I will go back in and have another look. Multiple monitors on one device are very fiddly as they break all the frame buffering optimisations in the driver.
Phil
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Post by nuck »

zoneminder wrote:Ok. I did go through all this last week to check nothing was broken but I will go back in and have another look. Multiple monitors on one device are very fiddly as they break all the frame buffering optimisations in the driver.
I think I did mention it, but my appologies just the same for not persuing it further, earlier. I was happy to assume that V4L2 wasn't going to work for me and was, like most people typically do, looking for the easy way out.

If you come up with something and want me to try it out before putting out for general consumption pass it along. Being the free-loader that I've been to this point, it's the least I can do.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Can you confirm the exact device and channel settings you are trying to use? Is it just channel 0 and 1 on /dev/video0 or something a bit more esoteric?
Phil
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Post by nuck »

zoneminder wrote:Can you confirm the exact device and channel settings you are trying to use? Is it just channel 0 and 1 on /dev/video0 or something a bit more esoteric?
Near as I can tell it's just channels 0 and 1. I initially setup the monitor on /dev/video0 and have verified that the problem moves to /dev/video1 if I make the change, so I'd assume (there's that word again.. ) it would do the same on either of the other 2 ports as well. I can use either channel 0 or 1, but not both channels simultaneously.
Locked