Ubuntu

mplayer crashes with illegal instruction

Reported by Urs Fleisch on 2012-04-05
108
This bug affects 20 people
Affects Status Importance Assigned to Milestone
mplayer2 (Ubuntu)
Undecided
Unassigned
Oneiric
Undecided
Unassigned
Precise
Undecided
Unassigned
Quantal
Undecided
Unassigned

Bug Description

SRU explanation:
[Impact]
This bug makes mplayer2 (and gnome-mplayer which use it by default) unusable with some CPU (some Penthium3 and 4). As it's the video player by default on Lubuntu, it affects a large number of users (see also all the duplicate bugs : #934774, #928793, #858226, #974774, #987734, #1014279).
The patch only changes the way compiler flags are used, the same way it's used on mplayer source package.

[Test Case]
Open mplayer2 on an affected system.
See the crash.

[Regression Potential]
* It may affect performance on all architectures, since we are touching the compiler flags and optimization.
* It may also affect the non affected architectures for the same reasons above.
* However, since the same mechanism is used on mplayer source package without any problem reported, it should be quite safe.

Original bug report:
On a fresh install of Lubuntu 12.04 Beta on a HP Compaq Evo N610c, mplayer crashes with an illegal instruction. It can be reproduced with the command line mplayer or GNOME MPlayer (GNOME MPlayer itself does not crash, but goes to "Stopped" state). The reason for the crash is that a fisttpll instruction, a PNI (Prescott New Instructions), which requires SSE3, is executed, but my CPU (Pentium 4 Mobile) does not support SSE3 (it CPU flags are fpu vme de pse tsc msr pae mce cx8 mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe up pebs bts cid xtpr). Maybe this bug is related to https://bugs.launchpad.net/ubuntu/+source/mplayer2/+bug/858226, see there how to set the compiler flags to avoid issueing SSE2 instructions. Here are two GDB sessions which show the problem, the video file does not matter, it happens with all videos I tested.

$ gdb --args mplayer -noautosub InFlames_Touch_Of_Red.mpeg
GNU gdb (Ubuntu/Linaro 7.4-2012.02-0ubuntu2) 7.4-2012.02
(gdb) r
Starting program: /usr/bin/mplayer -noautosub InFlames_Touch_Of_Red.mpeg
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction.
0x080dd52e in parse_flag (opt=0x824743c, name=..., param=...,
    ambiguous_param=true, dst=0x83ee048) at m_option.c:118
118 m_option.c: No such file or directory.
(gdb) bt
#0 0x080dd52e in parse_flag (opt=0x824743c, name=..., param=...,
    ambiguous_param=true, dst=0x83ee048) at m_option.c:118
#1 0x080d95c4 in m_option_parse (dst=<optimized out>, ambiguous_param=true,
    param=..., name=..., opt=<optimized out>) at m_option.h:450
#2 m_config_parse_option (config=0x83d51e0, name=..., param=...,
    ambiguous_param=true, set=true) at m_config.c:506
#3 0x0809c11b in m_config_parse_mp_command_line (config=0x83d51e0, argc=3,
    argv=0xbffff424) at parser-mpcmd.c:217
#4 0x08086df4 in main (argc=3, argv=0xbffff424) at mplayer.c:4023
(gdb) disas
(..)
=> 0x080dd52e <+510>: fisttpl (%edx)

$ gdb --args mplayer InFlames_Touch_Of_Red.mpeg
(gdb) r
Starting program: /usr/bin/mplayer InFlames_Touch_Of_Red.mpeg
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
MPlayer2 UNKNOWN (C) 2000-2011 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing InFlames_Touch_Of_Red.mpeg.
Detected file format: MPEG-PS format (libavformat)
[mpeg @ 0x1a27d80]max_analyze_duration reached
[lavf] stream 0: video (mpeg1video), -vid 0
[lavf] stream 1: audio (mp2), -aid 0
VIDEO: [mpg1] 352x288 0bpp 25.000 fps 1150.0 kbps (140.4 kbyte/s)
Load subtitles in .

Program received signal SIGILL, Illegal instruction.
0x081586b3 in demux_lavf_fill_buffer (demux=0x841a940, dsds=0x8416328)
    at libmpdemux/demux_lavf.c:790
790 libmpdemux/demux_lavf.c: No such file or directory.
(gdb) bt
#0 0x081586b3 in demux_lavf_fill_buffer (demux=0x841a940, dsds=0x8416328)
    at libmpdemux/demux_lavf.c:790
#1 0x08146932 in demux_fill_buffer (ds=0x8416328, demux=0x841a940)
    at libmpdemux/demuxer.c:621
#2 ds_get_next_pts (ds=0x8416328) at libmpdemux/demuxer.c:863
#3 0x08088711 in print_file_properties (filename=<optimized out>,
    mpctx=0x83d41e8) at mplayer.c:538
#4 main (argc=2, argv=0xbffff434) at mplayer.c:4866
(gdb) disas
(..)
=> 0x081586b3 <+499>: fisttpll 0x8018(%esi)

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: mplayer2 2.0-426-gc32b3ed-2
ProcVersionSignature: Ubuntu 3.2.0-21.34-generic 3.2.13
Uname: Linux 3.2.0-21-generic i686
ApportVersion: 2.0-0ubuntu4
Architecture: i386
Date: Thu Apr 5 12:16:34 2012
InstallationMedia: Lubuntu 12.04 "Precise Pangolin" - Beta i386 (20120328)
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: mplayer2
UpgradeStatus: No upgrade log present (probably fresh install)

Urs Fleisch (ufleisch) wrote :
Tanath (tanath) wrote :

This happens to me on a Pentium 4 without even passing any parameters:

  % mplayer
  zsh: illegal hardware instruction (core dumped) mplayer

Running through gdb as above shows:

  (gdb) r
  Starting program: /usr/bin/mplayer
  [Thread debugging using libthread_db enabled]
  Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".

  Program received signal SIGILL, Illegal instruction.
  0x080dd52e in ?? ()
  (gdb) bt
  #0 0x080dd52e in ?? ()
  #1 0x080d95c4 in ?? ()
  #2 0x080e1404 in m_config_parse_config_file ()
  #3 0x08086cfd in main ()
  (gdb) disas
  No function contains program counter for selected frame.
  (gdb)

I reported this as bug #974774 before looking more carefully at this one.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mplayer2 (Ubuntu):
status: New → Confirmed
sudodus (nio-wiklund) wrote :

I am testing Lubuntu 12.04 i386 daily build. I found a bug that crashes mplayer in IBM Thinkpad T41 and Dell Dimension 4600 both without sse3.

But it works in my machines with multiple and 64-bit cpus. One of them also lacks sse3: AMD Athlon(tm) 64 X2 Dual Core Processor 4400+

capabilities: boot fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp x86-64 3dnowext 3dnow extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch

So maybe there is some other bug too ...

This is the output of mplayer:
--
MPlayer interrupted by signal 4 in module: read_subtitles_file
 - MPlayer crashed by an 'Illegal Instruction'.
 It usually happens when you run it on a CPU different than the one it was
 compiled/optimized for.
 Verify this!
 - MPlayer crashed by bad usage of CPU/FPU/RAM.
 Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and
 disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash.
 - MPlayer crashed. This shouldn't happen.
 It can be a bug in the MPlayer code _or_ in your drivers _or_ in your
 gcc version. If you think it's MPlayer's fault, please read
 DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and
 won't help unless you provide this information when reporting a possible bug.
--
Unfortunately I am not very good at compiling programs.

sudodus (nio-wiklund) wrote :

I still have this problem with Lubuntu running on my 32-bit machines, and it is getting close to the release date of 12.04. If it is this problem?!

Anyway, mplayer2 is the only installed video player in Lubuntu, so it should be working. It is possible to install vlc or to uninstall mplayer2 and install mplayer (svn), but I think that mplayer2 can perform better, so please re-compile it so that it can recognize lower-end CPUs, e.g. Intel(R) Pentium(R) M processor 1600MHz, with the following capabilities:

fpu fpu_exception wp vme de pse tsc msr mce cx8 mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 tm pbe up bts est tm2 cpufreq

Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/974125

tags: added: iso-testing
sudodus (nio-wiklund) wrote :

This bug or something similar is still preventing me from using mplayer2 in lubuntu 12.04
--
The output of the computer has changed since yesterday (when it was a one-liner in my local language, Swedish), now it is (when called from a terminal window)

lubuntu@lubuntu:/media/data/Video/test/sjuan/ffx264$ mplayer 00007_540-50p.mp4
MPlayer2 UNKNOWN (C) 2000-2011 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing 00007_540-50p.mp4.
Detected file format: QuickTime/MPEG-4/Motion JPEG 2000 format (libavformat)
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
VIDEO: [H264] 960x540 24bpp 50.000 fps 2038.9 kbps (248.9 kbyte/s)
Clip info:
 major_brand: isom
 minor_version: 512
 compatible_brands: isomiso2avc1mp41
 creation_time: 1970-01-01 00:00:00
 encoder: Lavf52.64.2
Load subtitles in .

MPlayer interrupted by signal 4 in module: read_subtitles_file
- MPlayer crashed by an 'Illegal Instruction'.
  It usually happens when you run it on a CPU different than the one it was
  compiled/optimized for.
  Verify this!
- MPlayer crashed by bad usage of CPU/FPU/RAM.
  Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and
  disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash.
- MPlayer crashed. This shouldn't happen.
  It can be a bug in the MPlayer code _or_ in your drivers _or_ in your
  gcc version. If you think it's MPlayer's fault, please read
  DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and
  won't help unless you provide this information when reporting a possible bug.
lubuntu@lubuntu:/media/data/Video/test/sjuan/ffx264$

sense (opaperjam) wrote :

CPU: Intel(R) Pentium(R) M processor 1300MHz
System: ubuntu 12.04 lts
Mplayer2 version: 2.0-426-gc32b3ed-2

When run mplayer2 it show "Illegal instruction"

sense (opaperjam) wrote :

Another machine
CPU: Intel(R) Pentium(R) 4 Mobile CPU 1.40GHZ
System: ubuntu 12.04 LTS i386
Mplayer2 version: 2.0-426-gc32b3ed-2
When run mplayer2 it show "Illegal instruction"

But it's not allow fail. In my other machine, mplayer2 runs just fine
CPU: Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz
System: ubuntu 12.04 LTS amd64
Mplayer2 version: 2.0-426-gc32b3ed-2
It runs without error on this machine.

krogulec66 (j-urbanowicz) wrote :

SIMPLE WORKAROUND
just switch to mplayer instead of mplayer2
seems to be working on 12.10 / 32 bit / old AMD CPU

Julien Lavergne (gilir) wrote :

I made an update to mplayer2 package, trying to address the issue. It's available in my PPA https://launchpad.net/~gilir/+archive/updates, only for Quantal (12.10). Can someone test this package to see if the issue is still here ? Thanks.

Giovanni Panozzo (giovanni-ub) wrote :

Same problem here on my Pentium 4 machine (HP Compaq dx2000 MT), with lubuntu 12.10 i686 installed today.

The error reported when running mplayer is:
MPlayer interrupted by signal 4 in module: read_subtitles_file

Interesting parts of my /proc/cpuinfo are:
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 2.40GHz
stepping : 9
microcode : 0x21
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pebs bts cid xtpr

I installed the patch as suggested by Julien on post #11 and now mplayer works fine. Thank you Julien.

gnaishes (gnaishes) wrote :

Had the same problem for my lubuntu quantal i386 architecture when using the original mplayer2. Downgraded to mplayer and movie playing was fine.

Downloaded the package from Julien PPA, the mplayer2 is working fine now.

My CPU info as below:

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : Intel(R) Pentium(R) M processor 1.73GHz
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx up bts est tm2
bogomips : 1596.33
clflush size : 64
cache_alignment : 64
address sizes : 32 bits physical, 32 bits virtual

Thanks!

Julien Lavergne (gilir) on 2012-12-11
description: updated
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mplayer2 (Ubuntu Oneiric):
status: New → Confirmed
Changed in mplayer2 (Ubuntu Precise):
status: New → Confirmed
Changed in mplayer2 (Ubuntu Quantal):
status: New → Confirmed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mplayer2 - 2.0-554-gf63dbad-1ubuntu1

---------------
mplayer2 (2.0-554-gf63dbad-1ubuntu1) raring; urgency=low

  * Enable CPU autodetection on architectures that support it,
    Closes: #627197,
    LP: #934774, #928793, #858226, #974125, #974774, #987734, #1014279
 -- Julien Lavergne <email address hidden> Mon, 10 Dec 2012 20:35:19 +0100

Changed in mplayer2 (Ubuntu):
status: Confirmed → Fix Released
Julien Lavergne (gilir) on 2012-12-13
Changed in mplayer2 (Ubuntu Oneiric):
status: Confirmed → New
Changed in mplayer2 (Ubuntu Precise):
status: Confirmed → New
Changed in mplayer2 (Ubuntu Quantal):
status: Confirmed → New
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mplayer2 (Ubuntu Oneiric):
status: New → Confirmed
Changed in mplayer2 (Ubuntu Precise):
status: New → Confirmed
Changed in mplayer2 (Ubuntu Quantal):
status: New → Confirmed

Hello Urs, or anyone else affected,

Accepted mplayer2 into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/mplayer2/2.0-554-gf63dbad-1ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in mplayer2 (Ubuntu Quantal):
status: Confirmed → Fix Committed
tags: added: verification-needed
Brian Murray (brian-murray) wrote :

Hello Urs, or anyone else affected,

Accepted mplayer2 into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/mplayer2/2.0-426-gc32b3ed-2ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in mplayer2 (Ubuntu Precise):
status: Confirmed → Fix Committed
Changed in mplayer2 (Ubuntu Oneiric):
status: Confirmed → Fix Committed
Brian Murray (brian-murray) wrote :

Hello Urs, or anyone else affected,

Accepted mplayer2 into oneiric-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/mplayer2/2.0-134-g84d8671-2ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Urs Fleisch (ufleisch) wrote :

Hello Brian,

Thanks for fixing this and providing the package. I have installed mplayer2_2.0-134-g84d8671-2build1_i386.deb on the same system where I had the problem (Lubuntu 12.04 on a HP Compaq Evo N610c) and it works OK.

sudodus (nio-wiklund) wrote :

Yes, the version of mplayer2 works for me

I tested it earlier in a Dell with P4 running Lubuntu quantal, and it worked (gilir asked me to do it)

Today I tested it in an IBM Thinkpad T41 without PAE. I run Lubuntu 12.04 in that computer (can't run quantal because of the pae issue). I was happy to find that mplayer2 was also added to precise-proposed, and now it works also in my T41.

Finally I tested it in a workstation with 64-bit xeon cpus. And it continues to work there.

Thank you very much! Mplayer2 works well with low end hardware, and I am quite happy, that I can use it now.

Miklos Juhasz (mjuhasz) on 2013-01-13
tags: added: verification-done
removed: verification-needed

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mplayer2 - 2.0-134-g84d8671-2ubuntu0.1

---------------
mplayer2 (2.0-134-g84d8671-2ubuntu0.1) oneiric-proposed; urgency=low

  * Enable CPU autodetection on architectures that support it.
    LP: #974125
 -- Julien Lavergne <email address hidden> Wed, 12 Dec 2012 13:57:36 +0100

Changed in mplayer2 (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mplayer2 - 2.0-426-gc32b3ed-2ubuntu0.1

---------------
mplayer2 (2.0-426-gc32b3ed-2ubuntu0.1) precise-proposed; urgency=low

  * Enable CPU autodetection on architectures that support it.
    LP: #974125
 -- Julien Lavergne <email address hidden> Wed, 12 Dec 2012 14:13:19 +0100

Changed in mplayer2 (Ubuntu Precise):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mplayer2 - 2.0-554-gf63dbad-1ubuntu0.1

---------------
mplayer2 (2.0-554-gf63dbad-1ubuntu0.1) quantal-proposed; urgency=low

  * Enable CPU autodetection on architectures that support it.
    LP: #974125
 -- Julien Lavergne <email address hidden> Tue, 11 Dec 2012 17:18:23 +0100

Changed in mplayer2 (Ubuntu Quantal):
status: Fix Committed → Fix Released

bugreport can be closed since the fix was commited too.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers