Help troubleshooting zms streaming issue with Annke 8mp camera

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
SBCDave
Posts: 36
Joined: Tue Mar 24, 2020 8:32 pm

Help troubleshooting zms streaming issue with Annke 8mp camera

Post by SBCDave »

Anyone know zms well enough to help me troubleshoot why this one camera can't live stream and zm_signal says I'm getting a floating point exception? Or know where I can find documentation on zms that might be helpful?

Code: Select all

08/04/21 19:21:57.643721 zms_m3[84622].ERR-zm_signal.cpp/49 [Got signal 8 (Floating point exception), crashing]
08/04/21 19:21:57.643800 zms_m3[84622].ERR-zm_signal.cpp/79 [Signal address is 0x55bfa728d705, from 0x55bfa728d705]
08/04/21 19:21:57.644037 zms_m3[84622].ERR-zm_signal.cpp/100 [Backtrace 0: /usr/lib/zoneminder/cgi-bin/nph-zms(+0xcc2b4) [0x55bfa72f62b4]]
08/04/21 19:21:57.644064 zms_m3[84622].ERR-zm_signal.cpp/100 [Backtrace 1: /lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0) [0x7fdd2589a3c0]]
08/04/21 19:21:57.644082 zms_m3[84622].ERR-zm_signal.cpp/100 [Backtrace 2: /usr/lib/zoneminder/cgi-bin/nph-zms(+0x63705) [0x55bfa728d705]]
08/04/21 19:21:57.644097 zms_m3[84622].ERR-zm_signal.cpp/100 [Backtrace 3: /usr/lib/zoneminder/cgi-bin/nph-zms(+0xd1d1a) [0x55bfa72fbd1a]]
08/04/21 19:21:57.644107 zms_m3[84622].ERR-zm_signal.cpp/100 [Backtrace 4: /usr/lib/zoneminder/cgi-bin/nph-zms(+0x68dd0) [0x55bfa7292dd0]]
08/04/21 19:21:57.644117 zms_m3[84622].ERR-zm_signal.cpp/100 [Backtrace 5: /usr/lib/zoneminder/cgi-bin/nph-zms(+0x17fe5) [0x55bfa7241fe5]]
08/04/21 19:21:57.644127 zms_m3[84622].ERR-zm_signal.cpp/100 [Backtrace 6: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7fdd22a810b3]]
08/04/21 19:21:57.644137 zms_m3[84622].ERR-zm_signal.cpp/100 [Backtrace 7: /usr/lib/zoneminder/cgi-bin/nph-zms(+0x1967a) [0x55bfa724367a]]
This camera works in zmc and I can play back the recordings. Is zms used for playback? I used to be able to live stream it in browser and ZM Ninja, but it's been displaying "Unable to stream" in a black window for a while now. I'm assuming it broke on an update.

I have wyze cams, light bulb cams, and a bunch of reolink 5mp cams that all work great, this one is an 8mp Annke cam and it's the only one like it that I have (nice because it's super wide angle, has great IR, and covers my entire front yard). I'm assuming the 8mp is related to the floating point error, but I don't know zms well enough to troubleshoot it.

I've got an older dual socket server board with hexcore xenon chips, 128Gb DDR4 ram, and a GeForce GTX 1660 Ti 6GB GDDR6 192-Bit Gaming Graphics Card.

I also occasionally get zms_m3.log errors that say:

Code: Select all

08/04/21 01:10:00.045752 zms_m3[18535].ERR-zm_monitor.cpp/916 [Can't open memory map file /dev/shm/zm.mmap.3: No such file or directory]
08/04/21 01:10:00.045810 zms_m3[18535].ERR-zm_stream.cpp/58 [Unable to connect to monitor id 3 for streaming]
08/04/21 01:10:00.045830 zms_m3[18535].ERR-zms.cpp/268 [Unable set start stream for monitor 3]
but I haven't figured out how to duplicate these, and zm.mmap.3 does exist every time I've looked:

Code: Select all

dave@server:/dev/shm$ ll
total 110252
drwxrwxrwt  3 root     root          260 Aug  4 19:31 ./
drwxr-xr-x 21 root     root         4800 Aug  3 22:19 ../
drwx------  4 root     root           80 Aug  3 22:19 multipath/
-rw-rw----  1 www-data www-data  9442744 Aug  4 19:29 zm.mmap.1
-rw-rw----  1 www-data www-data  9442744 Aug  4 19:28 zm.mmap.10
-rw-rw----  1 www-data www-data  9442744 Aug  4 19:31 zm.mmap.11
-rw-rw----  1 www-data www-data  6149592 Aug  4 18:00 zm.mmap.14
-rw-rw----  1 www-data www-data  9442744 Aug  4 19:29 zm.mmap.2
-rw-rw----  1 www-data www-data 24888760 Aug  4 19:29 zm.mmap.3
-rw-rw----  1 www-data www-data  9442744 Aug  4 19:29 zm.mmap.4
-rw-rw----  1 www-data www-data  9442744 Aug  4 19:31 zm.mmap.6
-rw-rw----  1 www-data www-data 12588472 Aug  4 19:29 zm.mmap.7
-rw-rw----  1 www-data www-data 12588472 Aug  4 19:29 zm.mmap.9
dave@server:/dev/shm$
Any help would be really appreciated.
SBCDave
Posts: 36
Joined: Tue Mar 24, 2020 8:32 pm

Re: Help troubleshooting zms streaming issue with Annke 8mp camera

Post by SBCDave »

I used the browser to confirm that replaying my zmc captured files does not rely on zms, which is what I had expected.

The URI my browser is executing calls my zm/cgi-bin/nph-zms and POSTs arguments to it. I used apache config to find my cgi-bin directory and my nph-zms is a symlink to the compiled zms.cpp.

My URI causes zms to build a zm_monitorstream.cpp MonitorStream object, where it sets the object properties and then executes MonitorStream::runStream.

I tried a lot of different POST options to pass different arguments into zms but all do the black background "Unable to stream" except when I pass

Code: Select all

&source=fifo
which stalls out and never returns anything.

On line 476 of zm_monitorstream.cpp the MonitorStream::runStream uses

Code: Select all

openComms();
But I can't tell which #include this is working from. I have the same problem on line 486 and 487

Code: Select all

    if (!checkInitialised()) {
      if (!loadMonitor(monitor_id)) {
        if (!sendTextFrame("Not connected")) return;
      } else {
        if (!sendTextFrame("Unable to stream")) return;
      }
Where are these checkInitialised() and loadMonitor() function? They seem like a likely culprits since the "Unable to stream" TextFrame is being sent if either fails. I checked all the zm #include cpp code and tried googling each of these function with the other #includes and didn't find it in any of them.

I still haven't figured out what is calling zm_signal either, which is the code that's populating my zms log file with the floating point exception, I'm assuming it's one of these mystery functions.

I sure hope someone sees this and can help me. I'm not a fool and I'm up against a wall I can't see a way around with this camera that used to work fine.

I don't even know where to start in setting up a development environment that will let me debug this code. If anyone has any helpful resources they can point me to I would greatly appreciate it.
bbunge
Posts: 2935
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Help troubleshooting zms streaming issue with Annke 8mp camera

Post by bbunge »

Well, I am guessing you are using Zoneminder 1.36 because you are in the 1.36 forum area.
But what Linux distro and version?
What instructions did you use to install Zoneminder?
Something was mentioned about an upgrade but upgrade from what to what?
You mention a graphics card in your Zoneminder server but are you using that to process video and if so how did you set it up?
Does the cam in question stream in VLC?
Have you tried to lower the cam resolution and frame rate to see if that helps?
SBCDave
Posts: 36
Joined: Tue Mar 24, 2020 8:32 pm

Re: Help troubleshooting zms streaming issue with Annke 8mp camera

Post by SBCDave »

Thanks for responding, this is the first sign of life I've seen on this forum. I tried several other older threads before this one too that had floating point exceptions or issues with Annke camera.

I'm using 1.37 but that thread group seems dead and no one was responding there to the same post, and I really just need help debugging zms, so I didn't think it was 1.37 specific.

Ubuntu 20.04

I installed it on 1.2x can't remember, a few years ago. Installation instructions are long gone from my memory.

I think it was from 1.34 to 1.35 that it stopped working, but that's a total guess unfortunately.

I assumed some of the underlying binaries may take advantage of the graphics card, and mainly mentioned it so people wouldn't assume it was a not-enough-hardware issue.

Yes the cam streams in VLC, and zmc recording work.

I tried several sets of resolutions and frame rates (set in the cam's browser interface), including the lowest resolution and frame rate, but still see the same issue.

Thanks for any ideas, especially if you know anything about the checkInitialised() or loadMonitor(monitor_id) functions in zm_monitorstream.cpp. The floating point exception seems to be coming from within one of them.
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: Help troubleshooting zms streaming issue with Annke 8mp camera

Post by SteveGilvarry »

SBCDave wrote: Sat Aug 07, 2021 3:35 am Thanks for responding, this is the first sign of life I've seen on this forum
*cough I must be dead cough*
viewtopic.php?f=43&t=31041
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
SBCDave
Posts: 36
Joined: Tue Mar 24, 2020 8:32 pm

Re: Help troubleshooting zms streaming issue with Annke 8mp camera

Post by SBCDave »

Thank you. I hadn't seen the reply on that one and thought it was dead too, since you posted it and a month later I posted saying I was having the same issue. I'll follow that thread. Thanks. My son was born a few days ago, so I'm exhausted, but hopefully the divide by zero gets found and I'll be able to fix this from tracking that thread thanks
Post Reply