Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 359293 - sys-apps/v86d - v86d crashes ungracefully when called in X by mplayer
Summary: sys-apps/v86d - v86d crashes ungracefully when called in X by mplayer
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal minor (vote)
Assignee: Michal Januszewski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-17 20:12 UTC by Phill
Modified: 2011-03-26 22:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
fbset crashing out (fbseterror_strace.log,1.85 KB, text/plain)
2011-03-26 14:37 UTC, Phill
Details
fbset running normally (fbsetnoerror_strace.log,1.81 KB, text/plain)
2011-03-26 14:38 UTC, Phill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Phill 2011-03-17 20:12:24 UTC
I apologise for the rather convoluted nature of this bug, it is more the catastrophic nature of the end result which could faesibly be of concern.

Mplayer trying to access a framebuffer device kills v86d and gets X to flash.

When there is an active X session ($DISPLAY=:0) and I ssh in (with X forwarding) and set the DISPLAY variable 

[code]
$export DISPLAY=:1
[/code]

I can run mplayer fine, if I set the variable incorrectly, then mplayer tries to invoke the framebuffer device for playback, this makes mplayer grind almost to a halt, X blacks out for a short period (and repeats every minute or so), the v86d daemon dies (pgrep v86d returns no running process), all VTs (1-6) cease working and appear as a flashing cursor and the internal speaker beeps (also every minute).

I'm guessing any other program that tries to use the framebuffer would create the same problem, but wouldn't know what to try to check that out.

Reproducible: Always

Steps to Reproduce:
1. start X
2. export an incorrect $DISPLAY version to a terminal prompt
3. try to play a movie file on mplayer (compiled with framebuffer support)
Actual Results:  
X becomes unusable and all VTs become flashing cursors

Expected Results:  
i would mplayer to crash, X not to crash and/or my VTs to possibly respawn


dmesg output:

[code]

[60986.199028] uvesafb: mode switch failed (eax=0x4f02, err=1). Trying again with default timings.
[60991.199018] uvesafb: mode switch failed (eax=0x4f02, err=1)
[60991.199021] detected fb_set_par error, error code: -22
[60996.199019] uvesafb: mode switch failed (eax=0x4f02, err=1). Trying again with default timings.
[61001.199015] uvesafb: mode switch failed (eax=0x4f02, err=1)
[61001.199018] detected fb_set_par error, error code: -22 
[/code]

emerge --info: 

[code]
Portage 2.1.9.42 (default/linux/amd64/10.0, gcc-4.4.5, glibc-2.11.3-r0, 2.6.36-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.36-gentoo-r5-x86_64-AMD_Phenom-tm-_9650_Quad-Core_Processor-with-gentoo-1.12.14
Timestamp of tree: Mon, 14 Mar 2011 13:45:01 +0000
app-shells/bash:     4.1_p9
dev-lang/python:     2.6.6-r1, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.5
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=amdfam10 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=amdfam10 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://mirror.bytemark.co.uk/gentoo/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://mirror.qubenet.net/mirror/gentoo/ http://gentoo.virginmedia.com/ "
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X acl aim all-options alsa amd64 apache2 aspell auth auto-completion autoipd automount avahi bash-completion berkdb binary-drivers bittorrent bonjour bzip2 case cdda cddb cdparanoia cdrkit cdrom cdrtools cg cgi chm cli clipboard colors config-log consolekit context cracklib crypt css cups curl curlwrappers cxx dbus desktopglobe dga dhcp dhcpcd dirac directfb divx djvu dovecot-sasl dri dvd dvdarchive dvdchapjump dvdnav dvi emerald epiphany fat fbcon fbcondecor fbdev fbsplash firefox3 fortran fortune ftp fuse games gdbm gif gpm grub gstreamer gtk html http httpd iconv id3 id3tag imagemagick injection ipv6 jadetex john jpeg lame laptop largefile latex libsexy libssh2 libwww lm_sensors logrotate md5sum mdnsresponder-compat mixer mmx mode-force mode-owner mode-paranoid modperl modules mono mozilla mp3 mpe mpe-sdk mpeg mpu401 msn mudflap multilib mysql mysqli nat ncurses net network networking nfs nls nmap nntp normalize nptl nptlonly nvidia offensive ogg opengl openmp openssl opensslcrypt oscar pam passwd passwdqc pcre perl php pidgin pm-utils png pop3d pppd procmail ps python quarantine quota quotas radius rar raytracerx rdesktop readline regex resolvconf rss rsync rtf samba sametime screen sendmail session sftp sms sound spam-auth-user sse sse2 ssl ssse3 stream symlink sysfs syslog tcpd transparency tremor ui underscores unicode unzip video vim vorbis wad wav wavpack weather webinterface webmail winbind winetools wmf wps x264 xcb xfce xfs xhtml xorg xterm xterm-color xvmc zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
[/code]
Comment 1 Michal Januszewski (RETIRED) gentoo-dev 2011-03-26 12:49:48 UTC
Could you please try the following test which uses `fbset` (available in Portage), a much simpler program than Mplayer?  To do the test, ssh into your machine and instead of starting mplayer, try running fbset -xres X -yres Y, where XxY is a resolution your video card can support, other than the one your are using for your framebuffer.

If this causes the same symptoms, could you please also check if can reproduce it without X running in the background? (boot with 'nox' on your kernel command line)
Comment 2 Phill 2011-03-26 14:37:30 UTC
Created attachment 267277 [details]
fbset crashing out
Comment 3 Phill 2011-03-26 14:38:04 UTC
Created attachment 267279 [details]
fbset running normally

strace log for fbset
Comment 4 Phill 2011-03-26 14:41:03 UTC
same with fbset ran over ssh.

fbset error: ioctl FBIOPUT_VSCREENINFO: Invalid argument
(attached strace logs for fbset ran with no error and the X error)

Problem only exists with an X session in progress, and with respect to mplayer only when the $DISPLAY variable is not properly set.

also, if the present VT is tty1 and X is running on tty7, the fbset adjustment works (also mplayer IS able to play video) AND the v86d remains running.

finally, when the error is created using fbset, the X session freezes rather than repeatedly flashing and beeping, and, according to "ps aux" the v86d is still running, but I am unable to change VT with either chvt or ctrl-alt-Fn

Summarising so far:

you can kill X and the v86d by invoking a framebuffer app after changing the $DISPLAY variable, if X is running on the current VT.
Comment 5 Michal Januszewski (RETIRED) gentoo-dev 2011-03-26 22:09:42 UTC
(In reply to comment #4)

> also, if the present VT is tty1 and X is running on tty7, the fbset adjustment
> works (also mplayer IS able to play video) AND the v86d remains running.
> [..]
> 
> you can kill X and the v86d by invoking a framebuffer app after changing the
> $DISPLAY variable, if X is running on the current VT.

Ah, now I realize what's going on.  Unfortunately, there is no way to fix it.  

The problem is that both X and the framebuffer are using the same device (the video card) via two different interfaces (video BIOS for uvesafb/v86d and direct hardware access for X drivers), without really cooperating in any way.  If you change the video mode using the framebuffer interface while X is active, things get out of sync and break.