Segfault with zmeventnotification

Discussion topics related to mobile applications for ZoneMinder
Post Reply
SkippyDo
Posts: 97
Joined: Mon Nov 20, 2017 6:49 pm

Segfault with zmeventnotification

Post by SkippyDo » Fri Jan 04, 2019 9:44 am

I have manged to get push notifications on my Android phone*, but on the ZM server system (Debian 9) end of things I'm getting this error:
kernel: [282400.698341] zmeventnotifica[19942]: segfault at 10008 ip 00007f5527a42f10 sp 00007ffd93f3cc90 error 4 in libcrypto.so.1.1[7f5527939000+1a0000]
*While I am notified via pop-up OK, the underlying data reference (I'm guessing that by clicking on the pop-up that it should bring up the event in ZMninja) is corrupted (ZMninja is a bit messed up- the event won't load and if I go to montage I get broken cameras [restarting ZMninja resolves]).

This is what I'm seeing for libcrypto on my Debian system:

#:/usr/lib/x86_64-linux-gnu$ ls -lsa *cryp*
56 -rw-r--r-- 1 root root 54260 Dec 29 02:04 libcrypt.a
2436 -rw-r--r-- 1 root root 2492160 Nov 24 04:02 libcrypto.so.1.0.2
2964 -rw-r--r-- 1 root root 3031904 Nov 22 10:40 libcrypto.so.1.1
0 lrwxrwxrwx 1 root root 35 Dec 29 02:04 libcrypt.so -> /lib/x86_64-linux-gnu/libcrypt.so.1
0 lrwxrwxrwx 1 root root 18 Dec 31 12:25 libk5crypto.so.3 -> libk5crypto.so.3.1
200 -rw-r--r-- 1 root root 203600 Dec 31 12:25 libk5crypto.so.3.1
0 lrwxrwxrwx 1 root root 22 Dec 29 04:21 libssh-gcrypt.so.4 -> libssh-gcrypt.so.4.7.3
520 -rw-r--r-- 1 root root 530776 Dec 29 04:21 libssh-gcrypt.so.4.7.3


Not sure exactly where to start looking to debug this, so would be thankful for any insights.

User avatar
asker
Posts: 1079
Joined: Sun Mar 01, 2015 12:12 pm

Re: Segfault with zmeventnotification

Post by asker » Fri Jan 04, 2019 1:32 pm

You may have to dive in deeper. I've never seen this before.

1. Run the event server in manual and verbose mode (see this)
2. If you are using any intermediate gateways, make sure you are not enforcing an SSL algorithm. This causes issues. (see this for an example of SSL settings that are known to cause issues)
3. When is this error occurring exactly? At the time of sending a notification or some other situation?
4. Try to turn off SSL (disable in event server and change zmNinja to ws instead of wss) to see if the error is really SSL related. If the error goes away, it may even be SSL version/library issues between your phone and the server.
5. In general, post logs with as much context as possible. 1 liners never help.
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

SkippyDo
Posts: 97
Joined: Mon Nov 20, 2017 6:49 pm

Re: Segfault with zmeventnotification

Post by SkippyDo » Sat Jan 05, 2019 2:17 am

OK... I found the culprit!

I had had a leftover IP in my Debian server's /etc/hosts file: leftover from battling some networking issues. Something was using the value from here while most everything else was using the correct IP (as, I believe, provided by resolver).

zmeventnotification is working well now. I even got the "AI" hook stuff installed and working (maybe now I can stop messing with things? :D )

MoOz
Posts: 23
Joined: Tue Jan 17, 2017 9:49 pm

Re: Segfault with zmeventnotification

Post by MoOz » Sat Feb 09, 2019 12:35 am

Great work
can you please share some information
Zoneminder version
are you using Debian
what procedure did you use for the Push notification

SkippyDo
Posts: 97
Joined: Mon Nov 20, 2017 6:49 pm

Re: Segfault with zmeventnotification

Post by SkippyDo » Sun Feb 17, 2019 6:36 pm

MoOz wrote:
Sat Feb 09, 2019 12:35 am
Great work
can you please share some information
Zoneminder version
are you using Debian
what procedure did you use for the Push notification
I had been running ZM 1.32.3 and Debian Sid but it was too unstable (nothing to do with zmeventnotification and or the AI bits). I have reverted back to ZM 1.30.4 and Debian Stretch and though I have zmeventnotification hooked in I do not have push notifications working at this time. I kind of got over-quota on time spent for all of this; my motivation is lacking seeing as it's not likely that the AI stuff will work under ZM 1.30.4 and Debian Stretch: I might, however, look to see if I can at least get simple push notifications working (I get lots of alarms, which is why I was gunning for the AI bits).

Not sure of your last question. Sorry.

MoOz
Posts: 23
Joined: Tue Jan 17, 2017 9:49 pm

Re: Segfault with zmeventnotification

Post by MoOz » Wed Feb 20, 2019 8:06 am

Thanks for the reply
I have given up on the Push notification
wait until it better

User avatar
asker
Posts: 1079
Joined: Sun Mar 01, 2015 12:12 pm

Re: Segfault with zmeventnotification

Post by asker » Wed Feb 20, 2019 2:49 pm

MoOz wrote:
Wed Feb 20, 2019 8:06 am
Thanks for the reply
I have given up on the Push notification
wait until it better
Push notifications are as good as they can be with ZM. You may have to work on being able to report more details and/or being more thorough while reading instructions, however.
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

SkippyDo
Posts: 97
Joined: Mon Nov 20, 2017 6:49 pm

Re: Segfault with zmeventnotification

Post by SkippyDo » Thu Feb 21, 2019 3:56 am

It works fine, even under ZM 1.30.4. I am not, however, running the detection bits, just push notifications (and no images- although I don't claim to be the definitive source, I don' believe this function will work with a ZM version older than 1.32.

I went by the installation documentation (tip of the hat to asker). Have done it with two different versions of ZM now: easier on ZM 1.32.3, but not too much more work for ZM 1.30.4.

Sometimes a problem lies elsewhere or there are multiple issues. Really have to be methodical on tracking things down. And often more experienced eyes can spot something that someone else missed (which is why providing information helps).

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest