camera does not obey switch from Modect to Monitor

Previous development branch now released as 1.36
Locked
User avatar
sammael
Posts: 13
Joined: Fri Jul 31, 2020 11:26 am

camera does not obey switch from Modect to Monitor

Post by sammael »

Hi,
I have 2 identical rtsp cameras set up, the outside one is in Modect all the time, the inside one is on Monitor if I'm at home and on Modect if I'm away (automated via Home Assistant ZM integration + node-red). This setup was working fine for nearly half a year until I returned from work yesterday evening.

The automations are working as expected, when the issue occurs I can see in ZM console the camera is set to Monitor, yet it keeps recording events. To fix this I have to manually select any other mode, then Monitor again. I suspect this might be the case for the other camera as well I just don't notice it as that one is in Modect all the time.

Running ZM master v1.35.14 in docker, the image hasn't been updated recently and the container is up for ~12 days.

Any help welcome, thanks!
User avatar
sammael
Posts: 13
Joined: Fri Jul 31, 2020 11:26 am

Re: camera does not obey switch from Modect to Monitor

Post by sammael »

Happened again tonight, I caught these in dmesg output, no idea if it's useful though:

Code: Select all

[544249.878076] zma[692621]: segfault at 4 ip 00005588ba6adfc0 sp 00007ffd23ceb090 error 4 in zma[5588ba664000+190000]
[544249.878082] Code: 80 3d e6 d5 35 00 00 0f 85 2d 02 00 00 48 89 df e8 75 ca ff ff 84 c0 48 8b 93 a8 24 00 00 74 0a 80 7a 34 00 0f 85 a1 06 00 00 <8b> 42 04 3b 83 98 01 00 00 0f 85 0b 02 00 00 48 83 7a 58 00 0f 85
[544252.246419] zma[692661]: segfault at 4 ip 000055a71241cfc0 sp 00007ffd56fa4af0 error 4 in zma[55a7123d3000+190000]
[544252.246425] Code: 80 3d e6 d5 35 00 00 0f 85 2d 02 00 00 48 89 df e8 75 ca ff ff 84 c0 48 8b 93 a8 24 00 00 74 0a 80 7a 34 00 0f 85 a1 06 00 00 <8b> 42 04 3b 83 98 01 00 00 0f 85 0b 02 00 00 48 83 7a 58 00 0f 85
[544258.598598] zma[692789]: segfault at 4 ip 0000556869725fc0 sp 00007ffdffc7ce20 error 4 in zma[5568696dc000+190000]
[544258.598604] Code: 80 3d e6 d5 35 00 00 0f 85 2d 02 00 00 48 89 df e8 75 ca ff ff 84 c0 48 8b 93 a8 24 00 00 74 0a 80 7a 34 00 0f 85 a1 06 00 00 <8b> 42 04 3b 83 98 01 00 00 0f 85 0b 02 00 00 48 83 7a 58 00 0f 85
[544260.294507] zma[692825]: segfault at 4e9 ip 000055f69cd7c20f sp 00007ffcaa37d3b0 error 4 in zma[55f69cd32000+190000]
[544260.294514] Code: 48 8b bb e8 24 00 00 48 83 ec 08 8b 53 5c 8b 73 58 48 8d 04 c1 44 8b 47 2c 8b 4f 28 48 8b 40 08 ff 77 38 48 8b bd 88 ef ff ff <4c> 8b 48 68 e8 38 05 ff ff 58 5a 48 8b b5 50 ef ff ff c6 83 cc 01
[544262.626175] zma[692830]: segfault at 4e9 ip 0000558cdb55e20f sp 00007ffc17138a60 error 4 in zma[558cdb514000+190000]
[544262.626180] Code: 48 8b bb e8 24 00 00 48 83 ec 08 8b 53 5c 8b 73 58 48 8d 04 c1 44 8b 47 2c 8b 4f 28 48 8b 40 08 ff 77 38 48 8b bd 88 ef ff ff <4c> 8b 48 68 e8 38 05 ff ff 58 5a 48 8b b5 50 ef ff ff c6 83 cc 01
[544268.879180] zma[692951]: segfault at 4e9 ip 0000560e821e920f sp 00007fffd71957a0 error 4 in zma[560e8219f000+190000]
[544268.879185] Code: 48 8b bb e8 24 00 00 48 83 ec 08 8b 53 5c 8b 73 58 48 8d 04 c1 44 8b 47 2c 8b 4f 28 48 8b 40 08 ff 77 38 48 8b bd 88 ef ff ff <4c> 8b 48 68 e8 38 05 ff ff 58 5a 48 8b b5 50 ef ff ff c6 83 cc 01
[544280.204226] zma[693165]: segfault at 4e9 ip 00005636fdf1920f sp 00007fff61c96040 error 4 in zma[5636fdecf000+190000]
[544280.204233] Code: 48 8b bb e8 24 00 00 48 83 ec 08 8b 53 5c 8b 73 58 48 8d 04 c1 44 8b 47 2c 8b 4f 28 48 8b 40 08 ff 77 38 48 8b bd 88 ef ff ff <4c> 8b 48 68 e8 38 05 ff ff 58 5a 48 8b b5 50 ef ff ff c6 83 cc 01
[544302.435325] zma[693474]: segfault at 4e9 ip 000055973fb8a20f sp 00007ffdce3fa540 error 4 in zma[55973fb40000+190000]
[544302.435333] Code: 48 8b bb e8 24 00 00 48 83 ec 08 8b 53 5c 8b 73 58 48 8d 04 c1 44 8b 47 2c 8b 4f 28 48 8b 40 08 ff 77 38 48 8b bd 88 ef ff ff <4c> 8b 48 68 e8 38 05 ff ff 58 5a 48 8b b5 50 ef ff ff c6 83 cc 01
[544310.740651] zma[693623]: segfault at 4 ip 000055afdcc85fc0 sp 00007ffe609babf0 error 4 in zma[55afdcc3c000+190000]
[544310.740659] Code: 80 3d e6 d5 35 00 00 0f 85 2d 02 00 00 48 89 df e8 75 ca ff ff 84 c0 48 8b 93 a8 24 00 00 74 0a 80 7a 34 00 0f 85 a1 06 00 00 <8b> 42 04 3b 83 98 01 00 00 0f 85 0b 02 00 00 48 83 7a 58 00 0f 85
[544313.089683] zma[693652]: segfault at 4 ip 0000564a87c4ffc0 sp 00007ffc62987a20 error 4 in zma[564a87c06000+190000]
[544313.089704] Code: 80 3d e6 d5 35 00 00 0f 85 2d 02 00 00 48 89 df e8 75 ca ff ff 84 c0 48 8b 93 a8 24 00 00 74 0a 80 7a 34 00 0f 85 a1 06 00 00 <8b> 42 04 3b 83 98 01 00 00 0f 85 0b 02 00 00 48 83 7a 58 00 0f 85
[544319.420048] zma[693723]: segfault at 4 ip 0000562465048fc0 sp 00007ffed01834c0 error 4 in zma[562464fff000+190000]
[544319.420063] Code: 80 3d e6 d5 35 00 00 0f 85 2d 02 00 00 48 89 df e8 75 ca ff ff 84 c0 48 8b 93 a8 24 00 00 74 0a 80 7a 34 00 0f 85 a1 06 00 00 <8b> 42 04 3b 83 98 01 00 00 0f 85 0b 02 00 00 48 83 7a 58 00 0f 85
[544371.486411] zma[694721]: segfault at 4 ip 00005649f2a1afc0 sp 00007ffccde42420 error 4 in zma[5649f29d1000+190000]
[544371.486418] Code: 80 3d e6 d5 35 00 00 0f 85 2d 02 00 00 48 89 df e8 75 ca ff ff 84 c0 48 8b 93 a8 24 00 00 74 0a 80 7a 34 00 0f 85 a1 06 00 00 <8b> 42 04 3b 83 98 01 00 00 0f 85 0b 02 00 00 48 83 7a 58 00 0f 85
[544373.863538] zma[694773]: segfault at 4e9 ip 000055c3ad9c620f sp 00007ffe13eadcb0 error 4 in zma[55c3ad97c000+190000]
[544373.863544] Code: 48 8b bb e8 24 00 00 48 83 ec 08 8b 53 5c 8b 73 58 48 8d 04 c1 44 8b 47 2c 8b 4f 28 48 8b 40 08 ff 77 38 48 8b bd 88 ef ff ff <4c> 8b 48 68 e8 38 05 ff ff 58 5a 48 8b b5 50 ef ff ff c6 83 cc 01
[544441.986793] zma[695803]: segfault at 4 ip 000055d7dc98efc0 sp 00007ffe2d74d0d0 error 4 in zma[55d7dc945000+190000]
[544441.986799] Code: 80 3d e6 d5 35 00 00 0f 85 2d 02 00 00 48 89 df e8 75 ca ff ff 84 c0 48 8b 93 a8 24 00 00 74 0a 80 7a 34 00 0f 85 a1 06 00 00 <8b> 42 04 3b 83 98 01 00 00 0f 85 0b 02 00 00 48 83 7a 58 00 0f 85
[544443.957420] zma[695818]: segfault at 4 ip 000055d04240dfc0 sp 00007ffd63f66b60 error 4 in zma[55d0423c4000+190000]
[544443.957426] Code: 80 3d e6 d5 35 00 00 0f 85 2d 02 00 00 48 89 df e8 75 ca ff ff 84 c0 48 8b 93 a8 24 00 00 74 0a 80 7a 34 00 0f 85 a1 06 00 00 <8b> 42 04 3b 83 98 01 00 00 0f 85 0b 02 00 00 48 83 7a 58 00 0f 85
[544450.294515] zma[695962]: segfault at 4e9 ip 000055828424120f sp 00007ffe3220aac0 error 4 in zma[5582841f7000+190000]
[544450.294522] Code: 48 8b bb e8 24 00 00 48 83 ec 08 8b 53 5c 8b 73 58 48 8d 04 c1 44 8b 47 2c 8b 4f 28 48 8b 40 08 ff 77 38 48 8b bd 88 ef ff ff <4c> 8b 48 68 e8 38 05 ff ff 58 5a 48 8b b5 50 ef ff ff c6 83 cc 01
[544522.772615] zma[697275]: segfault at 4 ip 000055b7362bcfc0 sp 00007fff9f6d97b0 error 4 in zma[55b736273000+190000]
[544522.772623] Code: 80 3d e6 d5 35 00 00 0f 85 2d 02 00 00 48 89 df e8 75 ca ff ff 84 c0 48 8b 93 a8 24 00 00 74 0a 80 7a 34 00 0f 85 a1 06 00 00 <8b> 42 04 3b 83 98 01 00 00 0f 85 0b 02 00 00 48 83 7a 58 00 0f 85
[544525.108587] zma[697313]: segfault at 4 ip 000056500996ffc0 sp 00007ffed73e18e0 error 4 in zma[565009926000+190000]
[544525.108596] Code: 80 3d e6 d5 35 00 00 0f 85 2d 02 00 00 48 89 df e8 75 ca ff ff 84 c0 48 8b 93 a8 24 00 00 74 0a 80 7a 34 00 0f 85 a1 06 00 00 <8b> 42 04 3b 83 98 01 00 00 0f 85 0b 02 00 00 48 83 7a 58 00 0f 85
[544531.442624] zma[697388]: segfault at 4 ip 0000561096ccbfc0 sp 00007ffdfdc1a520 error 4 in zma[561096c82000+190000]
[544531.442630] Code: 80 3d e6 d5 35 00 00 0f 85 2d 02 00 00 48 89 df e8 75 ca ff ff 84 c0 48 8b 93 a8 24 00 00 74 0a 80 7a 34 00 0f 85 a1 06 00 00 <8b> 42 04 3b 83 98 01 00 00 0f 85 0b 02 00 00 48 83 7a 58 00 0f 85
[544673.921123] zma[699751]: segfault at 4 ip 0000563e33c7afc0 sp 00007ffcd5ca3370 error 4 in zma[563e33c31000+190000]
[544673.921132] Code: 80 3d e6 d5 35 00 00 0f 85 2d 02 00 00 48 89 df e8 75 ca ff ff 84 c0 48 8b 93 a8 24 00 00 74 0a 80 7a 34 00 0f 85 a1 06 00 00 <8b> 42 04 3b 83 98 01 00 00 0f 85 0b 02 00 00 48 83 7a 58 00 0f 85
[544676.292321] zma[699759]: segfault at 4e9 ip 0000559548eec20f sp 00007ffca86b18e0 error 4 in zma[559548ea2000+190000]
[544676.292326] Code: 48 8b bb e8 24 00 00 48 83 ec 08 8b 53 5c 8b 73 58 48 8d 04 c1 44 8b 47 2c 8b 4f 28 48 8b 40 08 ff 77 38 48 8b bd 88 ef ff ff <4c> 8b 48 68 e8 38 05 ff ff 58 5a 48 8b b5 50 ef ff ff c6 83 cc 01
[545404.481242] zma[711919]: segfault at 4 ip 000055793c607fc0 sp 00007ffee1eb5cb0 error 4 in zma[55793c5be000+190000]
[545404.481248] Code: 80 3d e6 d5 35 00 00 0f 85 2d 02 00 00 48 89 df e8 75 ca ff ff 84 c0 48 8b 93 a8 24 00 00 74 0a 80 7a 34 00 0f 85 a1 06 00 00 <8b> 42 04 3b 83 98 01 00 00 0f 85 0b 02 00 00 48 83 7a 58 00 0f 85
[545406.954027] zma[711970]: segfault at 4e9 ip 000056196501720f sp 00007fff53c430b0 error 4 in zma[561964fcd000+190000]
[545406.954034] Code: 48 8b bb e8 24 00 00 48 83 ec 08 8b 53 5c 8b 73 58 48 8d 04 c1 44 8b 47 2c 8b 4f 28 48 8b 40 08 ff 77 38 48 8b bd 88 ef ff ff <4c> 8b 48 68 e8 38 05 ff ff 58 5a 48 8b b5 50 ef ff ff c6 83 cc 01
User avatar
iconnor
Posts: 2881
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: camera does not obey switch from Modect to Monitor

Post by iconnor »

zma crashing is bad. I spent some time yesterday fixing one example. I just pushed to master so today's update should help that.

Might not be the root cause of your issue though. I will have to look further. HOw does the home assistant integration work, is it through the api?
trumee
Posts: 69
Joined: Tue Mar 08, 2011 3:33 pm

Re: camera does not obey switch from Modect to Monitor

Post by trumee »

I have lot of zma crashes too with v1.35.14. I am using object/face detection.

Code: Select all

[Thu Nov 19 22:12:45 2020] Code: 48 8b bb e8 24 00 00 48 83 ec 08 8b 53 5c 8b 73 58 48 8d 04 c1 44 8b 47 2c 8b 4f 28 48 8b 40 08 ff 77 38 48 8b bd 88 ef ff ff <4c> 8b 48 68 e8 38 05 ff ff 58 5a 48 8b b5 50 ef ff ff c6 83 cc 01
[Thu Nov 19 22:12:52 2020] zma[3784948]: segfault at 4 ip 000056490cf7ef50 sp 00007fff949f72d0 error 4 in zma[56490cf35000+192000]
[Thu Nov 19 22:12:52 2020] Code: 80 3d 56 f6 35 00 00 0f 85 2d 02 00 00 48 89 df e8 75 ca ff ff 84 c0 48 8b 93 a8 24 00 00 74 0a 80 7a 34 00 0f 85 a1 06 00 00 <8b> 42 04 3b 83 98 01 00 00 0f 85 0b 02 00 00 48 83 7a 58 00 0f 85
[Thu Nov 19 22:12:55 2020] zma[3785319]: segfault at 4 ip 0000558fb9faaf50 sp 00007ffc4cb2efe0 error 4 in zma[558fb9f61000+192000]
[Thu Nov 19 22:12:55 2020] Code: 80 3d 56 f6 35 00 00 0f 85 2d 02 00 00 48 89 df e8 75 ca ff ff 84 c0 48 8b 93 a8 24 00 00 74 0a 80 7a 34 00 0f 85 a1 06 00 00 <8b> 42 04 3b 83 98 01 00 00 0f 85 0b 02 00 00 48 83 7a 58 00 0f 85
[Thu Nov 19 22:13:03 2020] zma[3786308]: segfault at 2f9 ip 000055fd7c1a119f sp 00007ffeff17ab10 error 4 in zma[55fd7c157000+192000]
[Thu Nov 19 22:13:03 2020] Code: 48 8b bb e8 24 00 00 48 83 ec 08 8b 53 5c 8b 73 58 48 8d 04 c1 44 8b 47 2c 8b 4f 28 48 8b 40 08 ff 77 38 48 8b bd 88 ef ff ff <4c> 8b 48 68 e8 38 05 ff ff 58 5a 48 8b b5 50 ef ff ff c6 83 cc 01
[Thu Nov 19 22:13:16 2020] zma[3787898]: segfault at 2f9 ip 0000556cd3d3119f sp 00007ffd0c10cee0 error 4 in zma[556cd3ce7000+192000]
[Thu Nov 19 22:13:16 2020] Code: 48 8b bb e8 24 00 00 48 83 ec 08 8b 53 5c 8b 73 58 48 8d 04 c1 44 8b 47 2c 8b 4f 28 48 8b 40 08 ff 77 38 48 8b bd 88 ef ff ff <4c> 8b 48 68 e8 38 05 ff ff 58 5a 48 8b b5 50 ef ff ff c6 83 cc 01
[Thu Nov 19 22:13:38 2020] zma[3789621]: segfault at 2f9 ip 000055d3f769319f sp 00007ffe40e628c0 error 4 in zma[55d3f7649000+192000]
[Thu Nov 19 22:13:38 2020] Code: 48 8b bb e8 24 00 00 48 83 ec 08 8b 53 5c 8b 73 58 48 8d 04 c1 44 8b 47 2c 8b 4f 28 48 8b 40 08 ff 77 38 48 8b bd 88 ef ff ff <4c> 8b 48 68 e8 38 05 ff ff 58 5a 48 8b b5 50 ef ff ff c6 83 cc 01
[Thu Nov 19 22:14:21 2020] zma[3793051]: segfault at 2f9 ip 0000557e7b79419f sp 00007ffe941b8800 error 4 in zma[557e7b74a000+192000]
[Thu Nov 19 22:14:21 2020] Code: 48 8b bb e8 24 00 00 48 83 ec 08 8b 53 5c 8b 73 58 48 8d 04 c1 44 8b 47 2c 8b 4f 28 48 8b 40 08 ff 77 38 48 8b bd 88 ef ff ff <4c> 8b 48 68 e8 38 05 ff ff 58 5a 48 8b b5 50 ef ff ff c6 83 cc 01
[Thu Nov 19 22:15:43 2020] zma[3801513]: segfault at 2f9 ip 00005637fb33b19f sp 00007ffda33e60e0 error 4 in zma[5637fb2f1000+192000]
[Thu Nov 19 22:15:43 2020] Code: 48 8b bb e8 24 00 00 48 83 ec 08 8b 53 5c 8b 73 58 48 8d 04 c1 44 8b 47 2c 8b 4f 28 48 8b 40 08 ff 77 38 48 8b bd 88 ef ff ff <4c> 8b 48 68 e8 38 05 ff ff 58 5a 48 8b b5 50 ef ff ff c6 83 cc 01
[Thu Nov 19 22:18:25 2020] zma[3811305]: segfault at 2f9 ip 0000555c3914019f sp 00007ffcff649b60 error 4 in zma[555c390f6000+192000]
[Thu Nov 19 22:18:25 2020] Code: 48 8b bb e8 24 00 00 48 83 ec 08 8b 53 5c 8b 73 58 48 8d 04 c1 44 8b 47 2c 8b 4f 28 48 8b 40 08 ff 77 38 48 8b bd 88 ef ff ff <4c> 8b 48 68 e8 38 05 ff ff 58 5a 48 8b b5 50 ef ff ff c6 83 cc 01
Is it possible to rollback to 1.34.x version?
User avatar
iconnor
Posts: 2881
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: camera does not obey switch from Modect to Monitor

Post by iconnor »

You can if you have a db backup.

I already told you I fixed the zma crash (I think). Just update. If you want to run 1.35 you are going to have to live with breakage and stay up to date.
User avatar
sammael
Posts: 13
Joined: Fri Jul 31, 2020 11:26 am

Re: camera does not obey switch from Modect to Monitor

Post by sammael »

iconnor wrote: Thu Nov 19, 2020 3:44 pm zma crashing is bad. I spent some time yesterday fixing one example. I just pushed to master so today's update should help that.

Might not be the root cause of your issue though. I will have to look further. HOw does the home assistant integration work, is it through the api?
I recreated the container from scratch after the image was updated at the end of the week and still had the issue, although the segfaults disappeared. Afaik the integration works through api as I only supply it with zm ip and login info (https://www.home-assistant.io/integrations/zoneminder). I've found out I can work around my issue by changing the switch the integration creates for each camera from switching between Monitor/Modect to switching between Nodect/Modect. As I have no external triggers defined, Nodect effectively acts as Monitor for me.
Locked