1.22.3 crashes with segfault

Support and queries relating to all previous versions of ZoneMinder
Locked
darkpaw
Posts: 166
Joined: Thu Apr 26, 2007 2:35 am

1.22.3 crashes with segfault

Post by darkpaw »

I had a camera get taken out with a failed power supply (spiked to 15V and nuked it before I caught it) :( and my new camera is causing some issues.

ZMA crashes with a segfault. Camera goes Yellow (assuming monitor mode only) after ZMA goes down...so no events being captured. Here's the traceback(s). Has anyone seen why this would happen:

Jun 23 00:36:01 webserv zmdc[18204]: INF ['zmc -d /dev/video3' starting at 08/06/23 00:36:01, pid = 31295]
Jun 23 00:36:01 webserv zmc_dvideo3[31295]: INF [Debug Level = 0, Debug Log = <none>]
Jun 23 00:36:01 webserv zmc_dvideo3[31295]: INF [Starting Capture]
Jun 23 00:36:01 webserv zmdc[18204]: INF [Command 'zma -m 4' removed from pending list at 08/06/23 00:36:01]
Jun 23 00:36:01 webserv zmdc[31303]: INF ['zma -m 4' started at 08/06/23 00:36:01]
Jun 23 00:36:01 webserv zmdc[18204]: INF ['zma -m 4' starting at 08/06/23 00:36:01, pid = 31303]
Jun 23 00:36:01 webserv zma_m4[31303]: INF [Debug Level = 0, Debug Log = <none>]
Jun 23 00:36:01 webserv zma_m4[31303]: INF [In mode 3/1, warming up]
Jun 23 00:36:06 webserv zma_m4[31303]: ERR [Got signal (Segmentation fault), crashing]
Jun 23 00:36:06 webserv zma_m4[31303]: ERR [Signal address is 0xef32000, from 0x2f13d7#012]
Jun 23 00:36:06 webserv zma_m4[31303]: ERR [Backtrace: /lib/libc.so.6(memset+0x37) [0x2f13d7]]
Jun 23 00:36:06 webserv zma_m4[31303]: ERR [Backtrace: /lib/libc.so.6(memset+0x37) [0x2f13d7]]
Jun 23 00:36:06 webserv zma_m4[31303]: ERR [Backtrace: /usr/bin/zma [0x805551f]]
Jun 23 00:36:06 webserv zma_m4[31303]: ERR [Backtrace: /usr/bin/zma [0x80614df]]
Jun 23 00:36:06 webserv zma_m4[31303]: ERR [Backtrace: /usr/bin/zma [0x8069ab6]]
Jun 23 00:36:06 webserv zma_m4[31303]: ERR [Backtrace: /usr/bin/zma [0x804a599]]
Jun 23 00:36:06 webserv zma_m4[31303]: ERR [Backtrace: /lib/libc.so.6(__libc_start_main+0xe0) [0x296390]]
Jun 23 00:36:06 webserv zma_m4[31303]: ERR [Backtrace: /usr/bin/zma(__gxx_personality_v0+0x1d5) [0x804a241]]
Jun 23 00:36:06 webserv zma_m4[31303]: INF [Backtrace complete]
Jun 23 00:36:06 webserv zmdc[18204]: ERR ['zma -m 4' exited abnormally, exit status 11]
Jun 23 00:36:06 webserv zmdc[18204]: INF [Starting pending process, zma -m 4]
Jun 23 00:36:06 webserv zmdc[31314]: INF ['zma -m 4' started at 08/06/23 00:36:06]
Jun 23 00:36:06 webserv zmdc[18204]: INF ['zma -m 4' starting at 08/06/23 00:36:06, pid = 31314]
Jun 23 00:36:06 webserv zma_m4[31314]: INF [Debug Level = 0, Debug Log = <none>]
Jun 23 00:36:06 webserv zma_m4[31314]: INF [In mode 3/1, warming up]
Jun 23 00:36:11 webserv zma_m4[31314]: ERR [Got signal (Segmentation fault), crashing]
Jun 23 00:36:11 webserv zma_m4[31314]: ERR [Signal address is 0x10cfc000, from 0x2f13d7#012]
Jun 23 00:36:11 webserv zma_m4[31314]: ERR [Backtrace: /lib/libc.so.6(memset+0x37) [0x2f13d7]]
Jun 23 00:36:11 webserv zma_m4[31314]: ERR [Backtrace: /lib/libc.so.6(memset+0x37) [0x2f13d7]]
Jun 23 00:36:11 webserv zma_m4[31314]: ERR [Backtrace: /usr/bin/zma [0x805551f]]
Jun 23 00:36:11 webserv zma_m4[31314]: ERR [Backtrace: /usr/bin/zma [0x80614df]]
Jun 23 00:36:11 webserv zma_m4[31314]: ERR [Backtrace: /usr/bin/zma [0x8069ab6]]
Jun 23 00:36:11 webserv zma_m4[31314]: ERR [Backtrace: /usr/bin/zma [0x804a599]]
Jun 23 00:36:11 webserv zma_m4[31314]: ERR [Backtrace: /lib/libc.so.6(__libc_start_main+0xe0) [0x296390]]
Jun 23 00:36:11 webserv zma_m4[31314]: ERR [Backtrace: /usr/bin/zma(__gxx_personality_v0+0x1d5) [0x804a241]]
Jun 23 00:36:11 webserv zma_m4[31314]: INF [Backtrace complete]
Jun 23 00:36:11 webserv zmdc[18204]: ERR ['zma -m 4' exited abnormally, exit status 11]
Jun 23 00:36:16 webserv zmdc[18204]: INF [Starting pending process, zma -m 4]
Jun 23 00:36:16 webserv zmdc[31336]: INF ['zma -m 4' started at 08/06/23 00:36:16]
Jun 23 00:36:16 webserv zmdc[18204]: INF ['zma -m 4' starting at 08/06/23 00:36:16, pid = 31336]
Jun 23 00:36:16 webserv zma_m4[31336]: INF [Debug Level = 0, Debug Log = <none>]
Jun 23 00:36:16 webserv zma_m4[31336]: INF [In mode 3/1, warming up]
darkpaw
Posts: 166
Joined: Thu Apr 26, 2007 2:35 am

debug

Post by darkpaw »

More info. Here's the output with the DEBUG level cranked to 9:

[...]
06/23/08 00:43:32.020865 zma_m4[31664].DB7-zm_zone.cpp/161 [Checking line 477 from 236 -> 410]
06/23/08 00:43:32.020877 zma_m4[31664].DB7-zm_zone.cpp/161 [Checking line 478 from 306 -> 410]
06/23/08 00:43:32.020889 zma_m4[31664].DB7-zm_zone.cpp/161 [Checking line 479 from 376 -> 410]
06/23/08 00:43:32.020901 zma_m4[31664].DB5-zm_zone.cpp/204 [Got 0 alarmed pixels, need 14263 -> 0, avg pixel diff 0]
06/23/08 00:43:32.020914 zma_m4[31664].DB3-zm_monitor.cpp/2684 [Checking active zone Three]
06/23/08 00:43:32.021317 zma_m4[31664].DB4-zm_zone.cpp/141 [Checking alarms for zone 10/Three in lines 132 -> 479]
06/23/08 00:43:32.021331 zma_m4[31664].DB5-zm_zone.cpp/142 [Checking for alarmed pixels]
06/23/08 00:43:32.021557 zma_m4[31664].ERR-zm_signal.cpp/77 [Got signal (Segmentation fault), crashing]
06/23/08 00:43:32.021611 zma_m4[31664].ERR-zm_signal.cpp/89 [Signal address is 0x10e2b000, from 0x2f13d7
]
06/23/08 00:43:32.021881 zma_m4[31664].ERR-zm_signal.cpp/116 [Backtrace: /lib/libc.so.6(memset+0x37) [0x2f13d7]]
06/23/08 00:43:32.021914 zma_m4[31664].ERR-zm_signal.cpp/116 [Backtrace: /lib/libc.so.6(memset+0x37) [0x2f13d7]]
06/23/08 00:43:32.021943 zma_m4[31664].ERR-zm_signal.cpp/116 [Backtrace: /usr/bin/zma [0x805551f]]
06/23/08 00:43:32.021970 zma_m4[31664].ERR-zm_signal.cpp/116 [Backtrace: /usr/bin/zma [0x80614df]]
06/23/08 00:43:32.021999 zma_m4[31664].ERR-zm_signal.cpp/116 [Backtrace: /usr/bin/zma [0x8069ab6]]
06/23/08 00:43:32.022026 zma_m4[31664].ERR-zm_signal.cpp/116 [Backtrace: /usr/bin/zma [0x804a599]]
06/23/08 00:43:32.022053 zma_m4[31664].ERR-zm_signal.cpp/116 [Backtrace: /lib/libc.so.6(__libc_start_main+0xe0) [0x296390]]
06/23/08 00:43:32.022081 zma_m4[31664].ERR-zm_signal.cpp/116 [Backtrace: /usr/bin/zma(__gxx_personality_v0+0x1d5) [0x804a241]]
06/23/08 00:43:32.022107 zma_m4[31664].INF-zm_signal.cpp/117 [Backtrace complete]
User avatar
kingofkya
Posts: 1110
Joined: Mon Mar 26, 2007 6:07 am
Location: Las Vegas, Nevada

Post by kingofkya »

Did the pc/card get spiked through the cam it can happed something like that happen to a dvr card i had

check for toasted circuits on board (i assume analog)
the only reason i can see but still wait for a second opinion
i could be wrong
darkpaw
Posts: 166
Joined: Thu Apr 26, 2007 2:35 am

card

Post by darkpaw »

No, the card itself (luckily) is fine.
darkpaw
Posts: 166
Joined: Thu Apr 26, 2007 2:35 am

zones

Post by darkpaw »

Well, it looks like the problem was with the zones. I guess I changed one of my zones around the same time this happened, and didn't realize that it was causing a crash in zma.

I blew away all my zones and went back to a single zone just to test it. It works fine now. Would be nice to know what the problem was with the zones that was causing the segfault.
Aquillar
Posts: 4
Joined: Wed Nov 05, 2008 11:09 pm

Post by Aquillar »

Just to add. This resolved the problem for me as well on ZM_VERSION=1.23.3. I was getting the following in /var/log/messages:

Code: Select all

Nov  5 18:08:40 Camera zmc_dvideo0[4164]: WAR [Buffer overrun at index 5, slow down capture, speed up analysis or increase ring buffer size]
Nov  5 18:09:11 Camera zmc_dvideo0[4164]: WAR [Buffer overrun at index 5, slow down capture, speed up analysis or increase ring buffer size]
Nov  5 18:09:41 Camera zmc_dvideo0[4164]: WAR [Buffer overrun at index 5, slow down capture, speed up analysis or increase ring buffer size]
Nov  5 18:10:11 Camera zmc_dvideo0[4164]: WAR [Buffer overrun at index 5, slow down capture, speed up analysis or increase ring buffer size]
Nov  5 18:10:41 Camera zmc_dvideo0[4164]: WAR [Buffer overrun at index 5, slow down capture, speed up analysis or increase ring buffer size]
Nov  5 18:11:11 Camera zmc_dvideo0[4164]: WAR [Buffer overrun at index 5, slow down capture, speed up analysis or increase ring buffer size]
At the same time, /tmp/zm_debug.log:

Code: Select all

11/05/08 18:03:49.965634 zmc_dvideo0[4164].WAR-zm_monitor.cpp/2161 [Buffer overrun at index 14, slow down capture, speed up analysis or increase ring buffer size]
11/05/08 18:04:19.978809 zmc_dvideo0[4164].WAR-zm_monitor.cpp/2161 [Buffer overrun at index 14, slow down capture, speed up analysis or increase ring buffer size]
11/05/08 18:04:49.991819 zmc_dvideo0[4164].WAR-zm_monitor.cpp/2161 [Buffer overrun at index 14, slow down capture, speed up analysis or increase ring buffer size]
11/05/08 18:05:19.999620 zmc_dvideo0[4164].WAR-zm_monitor.cpp/2161 [Buffer overrun at index 14, slow down capture, speed up analysis or increase ring buffer size]
11/05/08 18:05:49.999351 zmc_dvideo0[4164].WAR-zm_monitor.cpp/2161 [Buffer overrun at index 14, slow down capture, speed up analysis or increase ring buffer size]
11/05/08 18:06:19.999286 zmc_dvideo0[4164].WAR-zm_monitor.cpp/2161 [Buffer overrun at index 14, slow down capture, speed up analysis or increase ring buffer size]
11/05/08 18:06:49.999968 zmc_dvideo0[4164].WAR-zm_monitor.cpp/2161 [Buffer overrun at index 14, slow down capture, speed up analysis or increase ring butail: zm_debug.log: file truncated
11/05/08 18:07:50.045453 zma_m8[4446].INF-zm_debug.c/305 [New Debug Level = 0, New Debug Log = /tmp/zm_debug.log]
11/05/08 18:07:50.076654 zma_m8[4446].INF-zma.cpp/99 [In mode 5/1, warming up]
11/05/08 18:08:12.043365 zma_m8[4446].ERR-zm_signal.cpp/77 [Got signal (Segmentation fault), crashing]
No other errors out of the ordinary.

This was even after reducing the camera to minimal specs (1 FPS, low res, greyscale...) and with any buffer size (I tried right up to about 800 ring buffer. Shared memory is tweaked to allow very large amounts).

Cleared out all the zones and re-made the default zone and all is good.

This had me very stumped as the system is barely loaded, very large amounts of free space, shared memory segments allowed to be very large, and all settings minimized. Seems to be working fine now! Any idea what's wrong with the zones?
Locked