SourceSecondPath and "Got signal 11 (Segmentation fault), crashing"

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
zmaximz
Posts: 29
Joined: Mon Sep 03, 2018 12:27 pm

SourceSecondPath and "Got signal 11 (Segmentation fault), crashing"

Post by zmaximz »

Hello, I try to test SourceSecondPath and getting error with ffmpeg
At Source Path I have:
rtsp://user:password@xxx.xxx.xxx.xxx:554/user=user_password=password_channel=1_stream=0.sdp?real_stream
And it's working ok, but when I try to add SourceSecondPath:
rtsp://user:password@xxx.xxx.xxx.xxx:554/user=user_password=password_channel=1_stream=1.sdp?real_stream
I've got error:

Code: Select all

2022-04-13 14:53:32	zmc_m1		4574	ERR	Backtrace 6: /usr/bin/zmc(+0x42e2e) [0x56039db11e2e]	zm_signal.cpp	101
2022-04-13 14:53:32	zmc_m1		4574	ERR	Backtrace 5: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f343b2d60b3]	zm_signal.cpp	101
2022-04-13 14:53:32	zmc_m1		4574	ERR	Backtrace 4: /usr/bin/zmc(+0x403e7) [0x56039db0f3e7]	zm_signal.cpp	101
2022-04-13 14:53:32	zmc_m1		4574	ERR	Backtrace 3: /usr/bin/zmc(+0x6e36f) [0x56039db3d36f]	zm_signal.cpp	101
2022-04-13 14:53:32	zmc_m1		4574	ERR	Backtrace 2: /usr/bin/zmc(+0x8c6b4) [0x56039db5b6b4]	zm_signal.cpp	101
2022-04-13 14:53:32	zmc_m1		4574	ERR	Backtrace 1: /lib/x86_64-linux-gnu/libpthread.so.0(+0x143c0) [0x7f343bfad3c0]	zm_signal.cpp	101
2022-04-13 14:53:32	zmc_m1		4574	ERR	Backtrace 0: /usr/bin/zmc(+0xd1821) [0x56039dba0821]	zm_signal.cpp	101
2022-04-13 14:53:32	zmc_m1		4574	ERR	Signal address is 0x18, from 0x56039db5b6b4	zm_signal.cpp	80
2022-04-13 14:53:32	zmc_m1		4574	ERR	Got signal 11 (Segmentation fault), crashing	zm_signal.cpp	50
2022-04-13 14:53:27	zmc_m1		4574	INF	Starting Capture version 1.37.13
This error happens with 1.36 mariadb (recently updated from 1.34) and 1.37 mysql (got from docker hub), I try different settings of camera, seems it's not camera fault, any ideas whats wrong please?
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: SourceSecondPath and "Got signal 11 (Segmentation fault), crashing"

Post by Magic919 »

Why have you added the second source?
-
zmaximz
Posts: 29
Joined: Mon Sep 03, 2018 12:27 pm

Re: SourceSecondPath and "Got signal 11 (Segmentation fault), crashing"

Post by zmaximz »

Magic919 wrote: Wed Apr 13, 2022 4:43 pm Why have you added the second source?
Low res can be used for motion detection in 1.37 with more efficient CPU usage (I guess in 1.36 too)

Got some ffmeg logs, not really understand whats going on but this maybe will be in help
04/13/22 20:37:04.881588 zmc_m1[4825].INF-zmc.cpp/218 [Starting Capture version 1.37.13]
04/13/22 20:37:04.881628 zmc_m1[4825].DB1-zm_monitor.cpp/842 [Unable to map file /dev/shm/zm.mmap.1 (35837384 bytes) to locked memory, trying unlocked]
04/13/22 20:37:04.881639 zmc_m1[4825].DB1-zm_monitor.cpp/845 [Mapped file /dev/shm/zm.mmap.1 (35837384 bytes) to unlocked memory]
04/13/22 20:37:04.883275 zmc_m1[4826].DB1-zm_db.cpp/190 [Success running sql query INSERT INTO `Logs` ( `TimeKey`, `Component`, `ServerId`, `Pid`, `Level`, `Code`, `Message`, `File`, `Line` ) VALUES ( 164987142>
04/13/22 20:37:04.893117 zmc_m1[4825].DB1-zm_monitor.cpp/984 [Not Starting ONVIF]
04/13/22 20:37:04.898732 zmc_m1[4826].DB1-zm_db.cpp/190 [Success running sql query INSERT INTO `Logs` ( `TimeKey`, `Component`, `ServerId`, `Pid`, `Level`, `Code`, `Message`, `File`, `Line` ) VALUES ( 164987142>
04/13/22 20:37:04.920815 zmc_m1[4825].DB1-zm_db.cpp/190 [Success running sql query INSERT INTO Monitor_Status (MonitorId,Status,CaptureFPS,AnalysisFPS) VALUES (1, 'Running',0,0) ON DUPLICATE KEY UPDATE Status='>
04/13/22 20:37:04.920836 zmc_m1[4825].DB1-zm_ffmpeg_camera.cpp/168 [Priming capture from rtsp://*************_channel=1_stream=0.sdp?real_stream]
04/13/22 20:37:04.920858 zmc_m1[4825].DB1-zm_ffmpeg_camera.cpp/285 [Calling avformat_open_input for rtsp://*************_channel=1_stream=0.sdp?real_stream]
04/13/22 20:37:07.207043 zmc_m1[4825].DB1-zm_ffmpeg.cpp/246 [Dumping stream index i(0) index(0)]
04/13/22 20:37:07.207066 zmc_m1[4825].DB1-zm_ffmpeg.cpp/252 [ Stream #0:0]
04/13/22 20:37:07.207071 zmc_m1[4825].DB1-zm_ffmpeg.cpp/260 [frame_size:0 stream timebase: 1/90000]
04/13/22 20:37:07.207077 zmc_m1[4825].DB1-zm_ffmpeg.cpp/265 [codec: hevc video]
04/13/22 20:37:07.207081 zmc_m1[4825].DB1-zm_ffmpeg.cpp/283 [, SAR 0:1 ]
04/13/22 20:37:07.207086 zmc_m1[4825].DB1-zm_ffmpeg.cpp/175 [10 fps]
04/13/22 20:37:07.207092 zmc_m1[4825].DB1-zm_ffmpeg.cpp/177 [90k stream tb numerator]
04/13/22 20:37:07.207454 zmc_m1[4825].DB1-zm_ffmpeg.cpp/215 [Dumping codec_context codec_type 0 video codec_id 173 hevc width 2304 height 1296 timebase 1/10 format yuvj420p profile 1 level 153 gop_size 12 has_b>
04/13/22 20:37:07.207466 zmc_m1[4825].DB1-zm_ffmpeg_camera.cpp/480 [Trying secondary stream at rtsp://*************_channel=1_stream=1.sdp?real_stream]
04/13/22 20:37:09.537108 zmc_m1[4825].DB1-zm_ffmpeg.cpp/246 [Dumping stream index i(0) index(0)]
04/13/22 20:37:09.537163 zmc_m1[4825].DB1-zm_ffmpeg.cpp/252 [ Stream #0:0]
04/13/22 20:37:09.537175 zmc_m1[4825].DB1-zm_ffmpeg.cpp/260 [frame_size:0 stream timebase: 1/90000]
04/13/22 20:37:09.537187 zmc_m1[4825].DB1-zm_ffmpeg.cpp/265 [codec: hevc video]
04/13/22 20:37:09.537197 zmc_m1[4825].DB1-zm_ffmpeg.cpp/283 [, SAR 0:1 ]
04/13/22 20:37:09.537208 zmc_m1[4825].DB1-zm_ffmpeg.cpp/175 [10 fps]
04/13/22 20:37:09.537241 zmc_m1[4825].DB1-zm_ffmpeg.cpp/177 [90k stream tb numerator]
04/13/22 20:37:09.537283 zmc_m1[4825].DB1-zm_ffmpeg_input.cpp/99 [Using codec (hevc) for stream 0]
04/13/22 20:37:09.537381 zmc_m1[4825].DB1-zm_packetqueue.cpp/651 [DIdn't Found a keyframe for stream 0, so returning the it to it]
04/13/22 20:37:09.537398 zmc_m1[4825].DB1-zm_monitor.cpp/3132 [Creating decoder thread]
04/13/22 20:37:09.537511 zmc_m1[4825].DB1-zm_monitor.cpp/3139 [Done restarting decoder]
04/13/22 20:37:09.537527 zmc_m1[4825].DB1-zm_monitor.cpp/3141 [getting analysis_it]
04/13/22 20:37:09.537537 zmc_m1[4825].DB1-zm_packetqueue.cpp/651 [DIdn't Found a keyframe for stream 0, so returning the it to it]
04/13/22 20:37:09.537548 zmc_m1[4825].DB1-zm_monitor.cpp/3147 [Starting an analysis thread for monitor (1)]
04/13/22 20:37:09.553284 zmc_m1[4825].DB1-zm_db.cpp/190 [Success running sql query INSERT INTO Monitor_Status (MonitorId,Status) VALUES (1, 'Connected') ON DUPLICATE KEY UPDATE Status='Connected']
04/13/22 20:37:09.553361 zmc_m1[4825].ERR-zm_signal.cpp/50 [Got signal 11 (Segmentation fault), crashing]
04/13/22 20:37:09.553456 zmc_m1[4825].DB1-zm_signal.cpp/57 [Signal information: number 11 code 1 errno 0 pid 24 uid 0 status 0]
04/13/22 20:37:09.553472 zmc_m1[4825].ERR-zm_signal.cpp/80 [Signal address is 0x18, from 0x5566916996b4]
04/13/22 20:37:09.553683 zmc_m1[4825].ERR-zm_signal.cpp/101 [Backtrace 0: /usr/bin/zmc(+0xd1821) [0x5566916de821]]
04/13/22 20:37:09.553737 zmc_m1[4825].ERR-zm_signal.cpp/101 [Backtrace 1: /lib/x86_64-linux-gnu/libpthread.so.0(+0x143c0) [0x7f39f97833c0]]
04/13/22 20:37:09.553779 zmc_m1[4825].ERR-zm_signal.cpp/101 [Backtrace 2: /usr/bin/zmc(+0x8c6b4) [0x5566916996b4]]
04/13/22 20:37:09.553821 zmc_m1[4825].ERR-zm_signal.cpp/101 [Backtrace 3: /usr/bin/zmc(+0x6e36f) [0x55669167b36f]]
04/13/22 20:37:09.553863 zmc_m1[4825].ERR-zm_signal.cpp/101 [Backtrace 4: /usr/bin/zmc(+0x403e7) [0x55669164d3e7]]
04/13/22 20:37:09.553904 zmc_m1[4825].ERR-zm_signal.cpp/101 [Backtrace 5: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f39f8aac0b3]]
04/13/22 20:37:09.553936 zmc_m1[4825].ERR-zm_signal.cpp/101 [Backtrace 6: /usr/bin/zmc(+0x42e2e) [0x55669164fe2e]]
04/13/22 20:37:09.553955 zmc_m1[4825].INF-zm_signal.cpp/108 [Backtrace complete, please execute the following command for more information: addr2line -e /usr/bin/zmc 0x5566916de821 0x7f39f97833c0 0x5566916996b4>
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: SourceSecondPath and "Got signal 11 (Segmentation fault), crashing"

Post by Magic919 »

Set up the low resolution stream as a separate monitor.
-
zmaximz
Posts: 29
Joined: Mon Sep 03, 2018 12:27 pm

Re: SourceSecondPath and "Got signal 11 (Segmentation fault), crashing"

Post by zmaximz »

Magic919 wrote: Wed Apr 13, 2022 7:12 pm Set up the low resolution stream as a separate monitor.
It was already in that way, but if I have 20 cams it's annoying to have 40 monitors and to edit their settings for example, I think this function must work


Other way is to use zmtrigger, but I dont understand it well... it mast to select monitor by ip of camera and some message to socket from it.
I'll use maybe python and api... is it a good way to trigger alarm through api?
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: SourceSecondPath and "Got signal 11 (Segmentation fault), crashing"

Post by Magic919 »

SourceSecondPath doesn't do what you think it does.

I haven't used external triggers.
-
zmaximz
Posts: 29
Joined: Mon Sep 03, 2018 12:27 pm

Re: SourceSecondPath and "Got signal 11 (Segmentation fault), crashing"

Post by zmaximz »

Magic919 wrote: Thu Apr 14, 2022 7:25 am SourceSecondPath doesn't do what you think it does.
Heh? But in 1.37 if you define SourceSecondPath and save, there will be option to select Secondary Stream in Analysis, I can't find more info about it

Other option, there are onvif motion trigger, but I have error with onvif, I'm using this docker image https://hub.docker.com/r/bkjaya1952/zon ... ker-latest and don't understand. There must be some sort of specific compilation or release of zoneminder to support onvif? (I've send some onvif post request to camera with postman and they working)

Code: Select all

2022-04-14 14:12:49	zmc_m1		370	ERR	zmc not compiled with GSOAP. ONVIF support not built in!	zm_monitor.cpp	980
2022-04-14 14:12:49	zmc_m1		370	INF	Starting Capture version 1.37.13
I will build zoneminder from source next time, don't understand, at source all that proxy wsdl already exist

At this point I can write alarm server that will trigger event with zmtrigger, but searching more elegant way...

Anyway 1.37 looks super promising, great cpu improvement, especially with decoding on demand and janus, about 60 cams 4fps with motion detection decreased cpu usage from 60% to 10%
User avatar
iconnor
Posts: 2904
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: SourceSecondPath and "Got signal 11 (Segmentation fault), crashing"

Post by iconnor »

The multistream feature isn't implemented yet. SecondStream can only be used for an audio stream.
Post Reply