Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#14400 - [motion] segfaults

Attached to Project: Arch Linux
Opened by Frank (shawabawa) - Monday, 20 April 2009, 12:24 GMT
Last edited by Paul Mattal (paul) - Saturday, 03 October 2009, 18:53 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Paul Mattal (paul)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Motion segfaults the moment I run it

If I run with no motion.conf I get:
# motion
Segmentation fault

If i run with the default config I get:

# motion
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Unknown config option "sql_log_image"
[0] Unknown config option "sql_log_snapshot"
[0] Unknown config option "sql_log_mpeg"
[0] Unknown config option "sql_log_timelapse"
[0] Unknown config option "sql_query"
[0] Motion 3.2.11 Started
[0] Motion going to daemon mode
# killall motion
motion: no process killed

If I run with the default config file with daemon off I get:
# motion
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Unknown config option "sql_log_image"
[0] Unknown config option "sql_log_snapshot"
[0] Unknown config option "sql_log_mpeg"
[0] Unknown config option "sql_log_timelapse"
[0] Unknown config option "sql_query"
[0] Motion 3.2.11 Started
[0] ffmpeg LIBAVCODEC_BUILD 3411712 LIBAVFORMAT_BUILD 3415296
[0] Thread 1 is from /etc/motion/motion.conf
[1] Thread 1 started
[1] cap.driver: "spca561"
[1] cap.card: "Camera"
[1] cap.bus_info: "0000:00:1d.0"
[1] cap.capabilities=0x05000001
[1] - VIDEO_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] Supported palettes:
[1] 0: S561 (S561)
[1] 1: GBRG (GBRG)
[1] Unable to find a compatible palette format.
[1] Using VIDEO_PALETTE_YUV420P palette
[1] Using V4L1
[1] Resizing pre_capture buffer to 1 items
[0] motion-httpd/3.2.11 running, accepting connections
[0] motion-httpd: waiting for data on port TCP 8080
[1] Started stream webcam server in port 8081
Segmentation fault

Package version: 3.2.11-1

My entire system is up to date as of 20th April

Steps to reproduce:
# pacman -S motion
# motion
This task depends upon

Closed by  Paul Mattal (paul)
Saturday, 03 October 2009, 18:53 GMT
Reason for closing:  Fixed
Additional comments about closing:  Applied the patch in motion-3.2.11-4 for both arches, and put in extra.

Tested and it does, indeed, remove the segfaults.
Comment by Andrea Scarpino (BaSh) - Monday, 20 April 2009, 14:22 GMT
I think this is caused by curl, I moved motion 3.2.11-2 from testing to extra which is built with curl 7.19
try it and let us now
Comment by Frank (shawabawa) - Monday, 20 April 2009, 14:45 GMT
I can't find motion 3.2.11-2 in either testing or extra, do I have to wait for the repos to be updated?
Comment by Frank (shawabawa) - Monday, 20 April 2009, 15:21 GMT
I found an updated mirror, exactly the same problem with 3.2.11-2
Comment by Andrea Scarpino (BaSh) - Monday, 20 April 2009, 15:27 GMT
did you start the daemon with /etc/rc.d/motion start ?
Comment by Frank (shawabawa) - Monday, 20 April 2009, 15:31 GMT
# /etc/rc.d/motion start
:: Starting Motion [BUSY]
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Unknown config option "sql_log_image"
[0] Unknown config option "sql_log_snapshot"
[0] Unknown config option "sql_log_mpeg"
[0] Unknown config option "sql_log_timelapse"
[0] Unknown config option "sql_query"
[0] Motion 3.2.11 Started
[0] ffmpeg LIBAVCODEC_BUILD 3412992 LIBAVFORMAT_BUILD 3415808
[0] Thread 1 is from /etc/motion/motion.conf
[1] Thread 1 started
/etc/rc.d/motion: line 7: 2894 Segmentation fault /usr/bin/motion
[FAIL]
Comment by Frank (shawabawa) - Monday, 20 April 2009, 15:44 GMT
rename the default config file in /etc/motion/ to /etc/motion/motion.conf to get the other messages
Comment by Andrea Scarpino (BaSh) - Monday, 20 April 2009, 15:47 GMT
Yes I read that, thanks

it starts now, only renamed /etc/motion/motion-dist.conf to /etc/motion/motion.conf

:: Starting Motion [BUSY]
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Unknown config option "sql_log_image"
[0] Unknown config option "sql_log_snapshot"
[0] Unknown config option "sql_log_mpeg"
[0] Unknown config option "sql_log_timelapse"
[0] Unknown config option "sql_query"
[0] Motion 3.2.11 Started
[0] Motion going to daemon mode
[DONE]

daemon works with motion 3.2.11-2
Comment by Frank (shawabawa) - Monday, 20 April 2009, 15:55 GMT
I don't think it actually starts even though it reports [DONE]

# /etc/rc.d/motion start [BUSY]
<blah>
[DONE]

# /etc/rc.d/motion stop [FAIL]

Also, running motion not through rc.d/motion still has the exact same output with the segmentation fault
Comment by Andrea Scarpino (BaSh) - Monday, 20 April 2009, 16:18 GMT
well, I edited motion.conf; I set target_dir on /srv/http/cam1 (which I created)
also I created /var/run/motion which motion put is process PID
I started the daemon from rc.d, I watch the ps output: motion were in the list
so, I put my webcamera, count to 10 and...system FREEZE
Comment by Mario St-Gelais (marxav) - Wednesday, 27 May 2009, 00:08 GMT
I am having similar problems. Neither motion nor /etc/rc.d/motion will work. But if I do motion -n -c /home/marst/.motion/motion.conf, working fine. I also commented all sql config statements.
Comment by Gerardo Exequiel Pozzi (djgera) - Tuesday, 09 June 2009, 03:34 GMT
Compiling with debug symbols and doing a backtrace with gdb shows...

(gdb) bt
#0 0xb75c3a19 in strcat () from /lib/libc.so.6
#1 0x0804b0dc in motion_log (level=-1, errno_flag=1, fmt=0x806b84d "could not open configfile %s") at motion.c:2778
#2 0x08050817 in conf_load (cnt=0x9634008) at conf.c:1669
#3 0x0804ba9f in motion_startup (daemonize=1, argc=1, argv=0x0) at motion.c:2054
#4 0x0804f15e in main (argc=1, argv=0xbfb0e054) at motion.c:2263

Searching in the web for this issue... found this [#1] tested this patch and fixes the issue when no config file (the default install)

But please see that there are more patches for bugs [#2]

[#1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523932
[#2] http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionPatches

Comment by filippo colombo (ombra85) - Tuesday, 16 June 2009, 19:54 GMT Comment by Roman Kyrylych (Romashka) - Wednesday, 16 September 2009, 07:59 GMT
@Andrea: would you like to update the package?
@Paul: according to the PKGBUILD you're the maintainer, but the package is orphaned. Do you still maintain it?
Comment by Paul Mattal (paul) - Saturday, 03 October 2009, 18:25 GMT
I don't generally maintain motion anymore, but I'll take a shot at applying this patch.

Loading...