Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Zoneminder Segfault after MariaDB-10.1.34
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
WintermuteX
n00b
n00b


Joined: 29 Apr 2006
Posts: 27
Location: Germany

PostPosted: Fri Jul 20, 2018 4:55 pm    Post subject: Zoneminder Segfault after MariaDB-10.1.34 Reply with quote

Hello :)

Unfortunately I have a problem with zoneminder 1.30.4. After the package of mariadb was updated from 10.1.31-r1 to 10.1.34 zoneminder stopped working.
I re-emerge dev-perl/DBD-mysql but the zms cgi binary is segfaulting:
Code:

2018-07-20 18:38:21.229450   zmwatch      31489   ERR   Memory map file '/dev/shm/zm.mmap.3' does not exist. zmc might not be running.   zmwatch.pl   
2018-07-20 18:38:18.388189   zms         31520   ERR   Backtrace 7: /usr/libexec/zoneminder/cgi-bin/zms(_start+0x2a) [0x561540aeeb6a]   zm_signal.cpp   102
2018-07-20 18:38:18.387407   zms         31520   ERR   Backtrace 6: /lib64/libc.so.6(__libc_start_main+0xea) [0x7fc166770faa]   zm_signal.cpp   102
2018-07-20 18:38:18.386692   zms         31520   ERR   Backtrace 5: /usr/libexec/zoneminder/cgi-bin/zms(main+0xaf2) [0x561540aedd12]   zm_signal.cpp   102
2018-07-20 18:38:18.385957   zms         31520   ERR   Backtrace 4: /usr/libexec/zoneminder/cgi-bin/zms(_ZN10StreamBase11loadMonitorEi+0x30) [0x561540b77c50]   zm_signal.cpp   102
2018-07-20 18:38:18.385274   zms         31520   ERR   Backtrace 3: /usr/libexec/zoneminder/cgi-bin/zms(_ZN7Monitor4LoadEjbNS_7PurposeE+0x77) [0x561540b2cc87]   zm_signal.cpp   102
2018-07-20 18:38:18.384543   zms         31520   ERR   Backtrace 2: /lib64/libc.so.6(+0x3b6f0) [0x7fc16678b6f0]   zm_signal.cpp   102
2018-07-20 18:38:18.382985   zms         31520   ERR   Backtrace 1: /lib64/libpthread.so.0(+0x14120) [0x7fc169c9d120]   zm_signal.cpp   102
2018-07-20 18:38:18.382161   zms         31520   ERR   Backtrace 0: /usr/libexec/zoneminder/cgi-bin/zms(_Z14zm_die_handleriP9siginfo_tPv+0x78) [0x561540b75338]   zm_signal.cpp   102
2018-07-20 18:38:18.380762   zms         31520   ERR   Signal address is (nil), from 0x7fc16678b6f0   zm_signal.cpp   81
2018-07-20 18:38:18.378759   zms         31520   ERR   Got signal 11 (Segmentation fault), crashing   zm_signal.cpp   50

2018-07-20 18:38:18.353887   web_js      30712   ERR   getStreamCmdResponse stream error: Socket /var/run/zm/zms-203526s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. - checkStreamForErrors()   ?view=watch   
2018-07-20 18:38:18.307742   web_php      30712   ERR   Socket /var/run/zm/zms-203526s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information.


I really tried to find the culprit, but to no avail. Using a higher debuglevel doesn't help either:
Code:

07/20/18 16:59:12.906721 zms[18510].DB1-zm_logger.cpp/234 [LogOpts: level=DB1/DB1, screen=OFF, database=WAR, logfile=DB1->/var/log/zm/zm_debug.log.18510, syslog=ERR]
07/20/18 16:59:12.906752 zms[18510].DB1-zm_utils.cpp/266 [Detected a x86\x86-64 processor with SSSE3]
07/20/18 16:59:12.906764 zms[18510].DB1-zms.cpp/102 [Query: mode=jpeg&scale=75&maxfps=30&buffer=1000&monitor=3&auth=534c20f96e8403785e6b2e9f6dfe4ea4&connkey=355240&rand=678156]
07/20/18 16:59:12.906775 zms[18510].DB1-zm_user.cpp/172 [Attempting to authenticate user from auth string 'XXX']
07/20/18 16:59:12.906862 zms[18510].DB1-zm_user.cpp/235 [Checking auth_key 'XXX' -> auth_md5 'XXX']
07/20/18 16:59:12.906869 zms[18510].DB1-zm_user.cpp/235 [Checking auth_key 'XXX' -> auth_md5 'XXX']
07/20/18 16:59:12.906875 zms[18510].DB1-zm_user.cpp/235 [Checking auth_key 'XXX' -> auth_md5 'XXX']
07/20/18 16:59:12.906879 zms[18510].DB1-zm_user.cpp/241 [Authenticated user 'XXX']
07/20/18 16:59:12.907054 zms[18510].ERR-zm_signal.cpp/50 [Got signal 11 (Segmentation fault), crashing]
07/20/18 16:59:12.908659 zms[18510].DB1-zm_signal.cpp/61 [Signal information: number 11 code 128 errno 0 pid 0 uid 0 status 570100386]
07/20/18 16:59:12.908666 zms[18510].ERR-zm_signal.cpp/81 [Signal address is (nil), from 0x7fa21f4ae6f0]
07/20/18 16:59:12.909719 zms[18510].ERR-zm_signal.cpp/102 [Backtrace 0: /usr/libexec/zoneminder/cgi-bin/nph-zms(_Z14zm_die_handleriP9siginfo_tPv+0x78) [0x55a39c90b338]]
07/20/18 16:59:12.910401 zms[18510].ERR-zm_signal.cpp/102 [Backtrace 1: /lib64/libpthread.so.0(+0x14120) [0x7fa2229c0120]]
07/20/18 16:59:12.911049 zms[18510].ERR-zm_signal.cpp/102 [Backtrace 2: /lib64/libc.so.6(+0x3b6f0) [0x7fa21f4ae6f0]]
07/20/18 16:59:12.911686 zms[18510].ERR-zm_signal.cpp/102 [Backtrace 3: /usr/libexec/zoneminder/cgi-bin/nph-zms(_ZN7Monitor4LoadEjbNS_7PurposeE+0x77) [0x55a39c8c2c87]]
07/20/18 16:59:12.912423 zms[18510].ERR-zm_signal.cpp/102 [Backtrace 4: /usr/libexec/zoneminder/cgi-bin/nph-zms(_ZN10StreamBase11loadMonitorEi+0x30) [0x55a39c90dc50]]
07/20/18 16:59:12.913794 zms[18510].ERR-zm_signal.cpp/102 [Backtrace 5: /usr/libexec/zoneminder/cgi-bin/nph-zms(main+0xaf2) [0x55a39c883d12]]
07/20/18 16:59:12.914458 zms[18510].ERR-zm_signal.cpp/102 [Backtrace 6: /lib64/libc.so.6(__libc_start_main+0xea) [0x7fa21f493faa]]
07/20/18 16:59:12.915159 zms[18510].ERR-zm_signal.cpp/102 [Backtrace 7: /usr/libexec/zoneminder/cgi-bin/nph-zms(_start+0x2a) [0x55a39c884b6a]]
07/20/18 16:59:12.915816 zms[18510].INF-zm_signal.cpp/109 [Backtrace complete, please execute the following command for more information]
07/20/18 16:59:12.915825 zms[18510].INF-zm_signal.cpp/110 [addr2line -e /usr/libexec/zoneminder/cgi-bin/nph-zms 0x55a39c90b338 0x7fa2229c0120 0x7fa21f4ae6f0 0x55a39c8c2c87 0x55a39c90dc50 0x55a39c883d12 0x7fa21f493faa 0x55a39c884b6a]


Running "addr2line -e /usr/libexec/zoneminder/cgi-bin/nph-zms 0x55a39c90b338 0x7fa2229c0120 0x7fa21f4ae6f0 0x55a39c8c2c87 0x55a39c90dc50 0x55a39c883d12 0x7fa21f493faa 0x55a39c884b6a" results in:
Code:

addr2line -e /usr/libexec/zoneminder/cgi-bin/nph-zms 0x562ea60f7338 0x7feea4274120 0x7feea0d626f0 0x562ea60aec87 0x562ea60f9c50 0x562ea606fd12 0x7feea0d47faa 0x562ea6070b6a
??:0
??:0
??:0
??:0
??:0
??:0
??:0
??:0


I don't have any idea anymore. :(
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12514

PostPosted: Sat Jul 21, 2018 5:25 pm    Post subject: Reply with quote

You need to rebuild zoneminder (and possibly other involved packages) with debug symbols before you can use addr2line in a useful way. Generally, this means setting FEATURES=nostrip and adding -ggdb to your CFLAGS and CXXFLAGS for these packages. Once you have made these changes, reproduce the crash and try to extract a backtrace from the core file. If you need more detail about how to do any of these steps, post back.
Back to top
View user's profile Send private message
WintermuteX
n00b
n00b


Joined: 29 Apr 2006
Posts: 27
Location: Germany

PostPosted: Sat Jul 21, 2018 9:22 pm    Post subject: Reply with quote

Hu wrote:
You need to rebuild zoneminder (and possibly other involved packages) with debug symbols before you can use addr2line in a useful way. Generally, this means setting FEATURES=nostrip and adding -ggdb to your CFLAGS and CXXFLAGS for these packages. Once you have made these changes, reproduce the crash and try to extract a backtrace from the core file. If you need more detail about how to do any of these steps, post back.


Thank you, I will rebuild the packages with nostrip and -ggdb tomorrow!
Back to top
View user's profile Send private message
WintermuteX
n00b
n00b


Joined: 29 Apr 2006
Posts: 27
Location: Germany

PostPosted: Sun Jul 22, 2018 4:30 pm    Post subject: Reply with quote

I rebuild zoneminder with --emptytree and nostrip aswell as -ggdb, but my output is still:

Code:
addr2line -e /usr/libexec/zoneminder/cgi-bin/zms 0x55b140d25338 0x7f4e9e15a120 0x7f4e9ac486f0 0x55b140cdcc87 0x55b140d27c50 0x55b140c9dd12 0x7f4e9ac2dfaa 0x55b140c9eb6a
??:0
??:0
??:0
??:0
??:0
??:0
??:0
??:0


My settings in make.conf:

Code:
CFLAGS="-march=native -ggdb -ftree-vectorize -mxsavec -mxsaves -O2 -pipe"
CXXFLAGS="${CFLAGS}"
FEATURES="ccache nostrip"



Any other idea? :(
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12514

PostPosted: Sun Jul 22, 2018 6:05 pm    Post subject: Reply with quote

What is the output of file /usr/libexec/zoneminder/cgi-bin/zms?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum