[SOLVED]Capture process crashing due to presence of multiple motion detection zones on 1.36.2 - F34 aarch64

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
ergamus
Posts: 27
Joined: Sat May 29, 2021 10:09 am

[SOLVED]Capture process crashing due to presence of multiple motion detection zones on 1.36.2 - F34 aarch64

Post by ergamus »

I've got a test snapshot with 1.36.2 running on a RPI4B / AARCH64 / Fedora 34 / Kernel 5.12.7.

After upgrading from 1.34.26 to 1.36.2, one specific camera starting in Monitor or Modect mode will crash the zmc process immediately with the following stack trace:

Code: Select all

May 29 12:06:31 nvr systemd-coredump[14384]: [🡕] Process 14381 (zmc) of user 48 dumped core.
                                             
                                             Stack trace of thread 14381:
                                             #0  0x0000aaaaccecc3a4 _ZN5Image4FillEjiRK7Polygon (zmc + 0x2c3a4)
                                             #1  0x0000aaaaccf0e6d8 _ZN4Zone5SetupENS_8ZoneTypeERK7PolygonjNS_11CheckMethodEiiiiRK7Vector2iiiiiiii (zmc + 0x6e6d8)
                                             #2  0x0000aaaaccf0f29c _ZN4Zone4LoadEP7Monitor (zmc + 0x6f29c)
                                             #3  0x0000aaaacced0b58 _ZN7Monitor11ReloadZonesEv (zmc + 0x30b58)
                                             #4  0x0000aaaacced7948 _ZN7Monitor4LoadEPPcbNS_7PurposeE (zmc + 0x37948)
                                             #5  0x0000aaaaccede1d8 _ZN7Monitor4LoadEjbNS_7PurposeE (zmc + 0x3e1d8)
                                             #6  0x0000aaaacceb0d04 main (zmc + 0x10d04)
                                             #7  0x0000ffff909ffa9c __libc_start_main (libc.so.6 + 0x24a9c)
                                             #8  0x0000aaaacceb1cf8 _start (zmc + 0x11cf8)
                                             
                                             Stack trace of thread 14382:
                                             #0  0x0000ffff925069c8 __futex_abstimed_wait_cancelable64 (libpthread.so.0 + 0x159c8)
                                             #1  0x0000ffff924ff61c pthread_cond_wait (libpthread.so.0 + 0xe61c)
                                             #2  0x0000ffff90d12ee4 _ZNSt18condition_variable4waitERSt11unique_lockISt5mutexE (libstdc++.so.6 + 0xcaee4)
                                             #3  0x0000aaaacceba534 _ZN9zmDbQueue7processEv (zmc + 0x1a534)
                                             #4  0x0000ffff90d19de0 execute_native_thread_routine (libstdc++.so.6 + 0xd1de0)
                                             #5  0x0000ffff924f9008 start_thread (libpthread.so.0 + 0x8008)
                                             #6  0x0000ffff90ab639c thread_start (libc.so.6 + 0xdb39c)
I've enabled debugging, level 9 and this is the output from zmc_m4.log when attempting to start a monitor with the faulty zones:
https://pastebin.com/a21m64NS

The camera has 8 zones setup for motion detection. I've narrowed it down to one specific zone, after deleting it the capture process starts normally. However, any modification to the remaining zones after that will result in the same stack trace again. Even moving one point in a zone by 1px left or right will result in the entire zone having to be removed to restore functionality. Even worse, deleting all the zones and recreating them by hand will result in the same crashing after 3, 4 zones are created.

I've made sure there are no overlapping zones, I've tried changing the color from 24b to 32b. It tried various other things, but couldn't find a pattern.

The second camera has one zone setup with 100% coverage, and displays no crashing or instability. Zoneminder on this RPI4B was rock solid, working 24/7 for nearly a year now, so the issue is new for me.

I'd be willing to try out your suggestion, even if they might result in data loss since this is cordoned off from my working 1.34 install. I can send the coredump to a dev via PM if needed as well.
Last edited by ergamus on Thu Jun 03, 2021 3:53 pm, edited 1 time in total.
User avatar
iconnor
Posts: 2936
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Capture process crashing due to presence of multiple motion detection zones on 1.36.2 - F34 aarch64

Post by iconnor »

Thanks for the quality report!

I think I know whats going on, and a potential fix. Just investigating repercussions.
Will try to get 1.36.3 out with a fix by monday.
ergamus
Posts: 27
Joined: Sat May 29, 2021 10:09 am

Re: Capture process crashing due to presence of multiple motion detection zones on 1.36.2 - F34 aarch64

Post by ergamus »

Thank you for the quick fix! Everything is up and running on 1.36.3 on my end.
Post Reply