Motion - Bug Report 2005x 01x 30x 190907
You are here: Foswiki>Motion Web>BugReports>BugReport2005x01x30x190907 (25 Feb 2005, AngelCarpintero)Edit Attach

BUG: Illegal instruction

Starting motion 3.1.18 it writes out

Thread0 device: /dev/video0 input: 8
Illegal instruction

and steps out.

Test case

EPIA 5000 mainboard, spca50x camera driver, Slackware 10.0. Sooner the 3.1.17 was installed on this machine, and it worked fine, but I decided to upgrade because of the brightness controll feature of the latest version

Environment

Motion version: 3.1.18
ffmpeg version: 0.4.8
Shared libraries: curl, ffmpeg, mysql
Server OS: slackware 10.0 kernel 2.4.26

-- TWikiGuest - 30 Jan 2005

Follow up

What do you have in your syslog?

How does your motion.conf look like?

What was the output from configure?

I need more information to be able to do anything.

-- KennethLavrsen - 30 Jan 2005


You should try and rebuild Motion with

./configure --without-optimizecpu
make clean
make
make install

I have the feeling that it may be the CPU on the EPIA board which does not have the special assembler instructions that were added in 3.1.18 to significantly speed up the motion detection.

So we may have to find out how to add the right detection mechanism in the configure script. First we need to see if the --without-optimizecpu actually works.


Zoltan reports that the configure --without-optimizecpu cures the problem.

We still need to find out how to make configure autodetecting this itself. For now I will add it to the Motion Guide.

-- KennethLavrsen - 02 Feb 2005

--

From the logs, it seems that the only result of the "optimizecpu" in this instance was the setting of the -march=i686 flag, so we should try to look at why the VIA Samuel 2 CPU can't have that flag set, what it should be set to, and how (within the configure script) we can make the right decision for this CPU (and any other similar ones).

I noticed there was no optimisation when compiling on my AMD dual-cpu systems, so I tried playing around a bit with the configure script. The main trouble was because /proc/cpuinfo contains information for two separate CPU's, so when the script runs grep on the different variables it doesn't do what's expected (because two separate lines are found for each of the five variables). A simple solution for this is to just extract the first line, e.g.
   CPU_FAMILY=`cat /proc/cpuinfo | grep "cpu family" | head -n1`
   CPU_MODEL=`cat /proc/cpuinfo | grep model[^\ ] | head -n1`
   CPU_NAME=`cat /proc/cpuinfo | grep "model name" | head -n1`
   CPU_FLAGS=`cat /proc/cpuinfo | grep "flags" | head -n1`
   CPU_VENDOR=`cat /proc/cpuinfo | grep "vendor_id" | head -n1`

Also, I'm a little uncomfortable with the following several lines, which are using Bash parameter changing with the '#' construct. They seem to work ok, but I'd rather see, e.g.,
   CPU_FAMILY=${CPU_FAMILY#'cpu family     : '}
changed to
   CPU_FAMILY=${CPU_FAMILY#*: }
which I think is somewhat more robust.

-- BillBrack - 15 February 2005

The script is not perfect as new CPUs are coming to the market as new VIA so any help is welcome. Your modification have sense since , btw nobody has tested any dual cpu system , i'll test first if will work in FreeBSD too.

Thanks for the report. -- AngelCarpintero - 15 Feb 2005

Included support for athlon64 in last netcam patch. Thanks Bill for the support smile

-- AngelCarpintero - 20 Feb 2005

Fix record

Fix include in motion-3.1.19_snap4

-- AngelCarpintero - 25 Feb 2005

BugReportForm edit

TopicTitle Illegal instruction
BugStatus Released
AssignedBugTo KennethLavrsen
SubmittedBy Zoltan Zagarics
Topic attachments
I Attachment Action Size Date Who Comment
conf.outout conf.out manage 2 K 01 Feb 2005 - 07:52 KennethLavrsen  
make.outout make.out manage 4 K 01 Feb 2005 - 07:52 KennethLavrsen  
Topic revision: r8 - 25 Feb 2005, AngelCarpintero
Copyright © 1999-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.