| Summary: | motion segfault durring camera reconnect | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Zamir Ostroukhov <zamiron> |
| Component: | RPM Packages | Assignee: | QA Team <qa-bugs> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | andrewsfarm, geiger.david68210, herman.viaene, mageia, sysadmin-bugs |
| Version: | 7 | Keywords: | advisory, validated_update |
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | MGA7-64-OK | ||
| Source RPM: | motion | CVE: | |
| Status comment: | |||
|
Description
Zamir Ostroukhov
2020-02-27 09:52:45 CET
Thank you for the report, and all the work you did on the GIT thread. https://github.com/Motion-Project/motion/issues/1075#issuecomment-591493422 > Looks like the database handle is not NULL after thread restart https://github.com/Motion-Project/motion/issues/1075#issuecomment-591502929 > Meanwhile on Ubuntu the same values do not cause any issues: https://github.com/Motion-Project/motion/issues/1075#issuecomment-591512602 > Explicitly NULL'ing the handle at motion_init resolves the crash on Mageia > However I'm not sure if this is the correct way and we will not leak the > handle during shutdown. Maybe, this is rather a bug in the maria db libs > shipped with Mageia > For now will mark this as bug and let MrDave to make decision Note "Maybe, this is rather a bug in the maria db libs shipped with Mageia" Possible. Await MrDave's decision before assigning this. CC:
(none) =>
lewyssmith Hi Team, I found patch: https://github.com/Motion-Project/motion/commit/c73d60a8754d49fe6996e626fa5486359b4239e8 I tested version 4.3.1 too. It working fine. Assigning to QA, Advisory: ======================== Our current motion release doesn't work properly as it segfault with current Mariadb. So this updates motion to the latest upstream release and fixes this issue. For reference: https://github.com/Motion-Project/motion/issues/1075 https://github.com/Motion-Project/motion/issues/1123 ======================== Packages in 7/core/updates_testing: ======================== motion-4.3.1-1.mga7.x86_64.rpm motion-4.3.1-1.mga7.i586.rpm Source RPM: ======================== motion-4.3.1-1.mga7.src.rpm CC:
(none) =>
geiger.david68210 (In reply to Zamir Ostroukhov from comment #2) > I found patch: > https://github.com/Motion-Project/motion/commit/ > c73d60a8754d49fe6996e626fa5486359b4239e8 > I tested version 4.3.1 too. > It working fine. Thank you for this detective work, and your important test. @QA: believe that. It looks fiddly to test - if you have a camera... --------- @DavidG : Faster than lightning again! I was about assign the bug to you when I found comment 3. CC:
lewyssmith =>
(none) MGA7-64 Plasma on Lenovo B50 No installation issues. This laptop has mariadb installed, but not running. The references in Comment 3 are vague about how to handle the configuration for using the database for it. Found https://www.linux.com/training-tutorials/how-operate-linux-spycams-motion/ and had a go at it (it does not mention anything on the database connection). This laptop has a camera, so I tried: $ motion -c motion.conf -n [0:motion] [ALR] [ALL] conf_load: Configfile motion.conf not found - trying defaults.: No such file or directory [0:motion] [NTC] [ALL] conf_load: Processing thread 0 - config file /etc/motion/motion.conf [0:motion] [NTC] [ALL] motion_startup: Logging to syslog [0:motion] [NTC] [ALL] motion_startup: Motion 4.3.1 Started [0:motion] [NTC] [ALL] motion_startup: Using default log type (ALL) [0:motion] [NTC] [ALL] motion_startup: Using log type (ALL) log level (NTC) [0:motion] [NTC] [STR] webu_start_strm: Starting all camera streams on port 8081 [0:motion] [NTC] [STR] webu_strm_ntc: Started camera 0 stream on port 8081 [0:motion] [NTC] [STR] webu_start_ctrl: Starting webcontrol on port 8080 [0:motion] [NTC] [STR] webu_start_ctrl: Started webcontrol on port 8080 and more.... When I moved a little [1:ml1] [NTC] [ALL] motion_detected: Motion detected - starting event 1 [1:ml1] [NTC] [ALL] mlp_actions: End of event 1 [1:ml1] [NTC] [EVT] event_newfile: File of type 8 saved to: ./0-02-20200523143309.mkv Ended the session with Ctrl-C And tried again: $ motion [0:motion] [NTC] [ALL] conf_load: Processing thread 0 - config file /etc/motion/motion.conf [0:motion] [NTC] [ALL] motion_startup: Logging to syslog [0:motion] [NTC] [ALL] motion_startup: Motion 4.3.1 Started [0:motion] [NTC] [ALL] motion_startup: Using default log type (ALL) [0:motion] [NTC] [ALL] motion_startup: Using log type (ALL) log level (NTC) [0:motion] [NTC] [STR] webu_start_strm: Starting all camera streams on port 8081 [0:motion] [NTC] [STR] webu_strm_ntc: Started camera 0 stream on port 8081 and so on.... detected moving, stopped again. Started again and then pointed firefox to localhost:8081 and I saw myself. That all worked OK. Continuing research how to handel the connection to mysql. CC:
(none) =>
herman.viaene Found https://www.lavrsen.dk/foswiki/bin/view/Motion/UsingDatabases and https://www.lavrsen.dk/foswiki/bin/view/Motion/ConfigOptionSqlQuery and defined the database in phpmyadmin with the parameters as in https://github.com/Motion-Project/motion/issues/1075 and added the lines database_type mysql database_dbname motion database_host localhost database_port 3306 database_user motion database_password motionpass database_busy_timeout 0 sql_query insert into security(camera,filename,frame,file_type,event_time_stamp,text_event) values ('%t','%f','%q','%n','%Y-%m-%d %T','%C') into /etc/motion/motion.conf and started motion again. Motion registered motions from my camera, but in the CLI i kept getting the feedback: $ motion [0:motion] [NTC] [ALL] conf_load: Processing thread 0 - config file /etc/motion/motion.conf but then further [1:ml1] [WRN] [DBL] do_sql_query: Ignoring empty sql query and of course the database table remains empty. I tried to end the sql string with ; or put the whole string between "", but to no avail. I get the .mkv files in my home directory, that's OK, and there are no crashes. Giving up,unless someone else sees where I made a mistake. I'm going to OK this, based on Comment 2 and Herman's clean install. Validating. Advisory in Comment 3. Keywords:
(none) =>
validated_update
Nicolas Lécureuil
2020-06-10 23:11:19 CEST
Keywords:
(none) =>
advisory An update for this issue has been pushed to the Mageia Updates repository. https://advisories.mageia.org/MGAA-2020-0140.html Status:
NEW =>
RESOLVED |