Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 56189

Summary: DirectFB <= 0.9.20 incompatible (locks up) with kernel 2.6.7
Product: Gentoo Linux Reporter: hollywoodb <hollywoodb>
Component: [OLD] ServerAssignee: Gentoo Games <games>
Status: RESOLVED UPSTREAM    
Severity: normal CC: s4t4n, spock, x11, xlyz
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 59340    

Description hollywoodb 2004-07-05 16:39:58 UTC
Basically I'm hitting the problem described at the URLs below... using kernel 2.6.7 (development-sources, and possibly affects 2.6.6 as well) starting any DirectFB app results in a hard lockup... works like a charm on 2.6.5-mm6 however.

Using DirectFB-0.9.20 but it seems to affect most if not all versions.
Did some browsing and I didn't see any upstream attempts to fix this when I gave a quick look.

http://www.directfb.org/mailinglists/directfb-users/2004/06-2004/msg00072.html

http://sourceforge.net/tracker/index.php?func=detail&aid=939268&group_id=82854&atid=567417

http://sourceforge.net/tracker/index.php?func=detail&aid=946032&group_id=82854&atid=567417



Reproducible: Always
Steps to Reproduce:
1. 2.6.7 kernel
2. emerge DirectFB & configure it up
3. run a DFB app like qingy

not sure if glibc/gcc/nptl/etc is important here

Actual Results:  
locks up system

Expected Results:  
doesn't lock up system

Portage 2.0.51_pre12 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.4.20040605-r1,
2.6.7-hb2)
=================================================================
System uname: 2.6.7-hb2 i686 AMD Athlon(tm) 
Gentoo Base System version 1.5.1
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.14.90.0.8-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O2 -pipe -mcpu=athlon-xp -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -mcpu=athlon-xp -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://128.213.5.34/gentoo/
ftp://cudlug.cudenver.edu/pub/mirrors/distributions/gentoo/
http://mirror.datapipe.net/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/bmg-main"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X aalib aim alsa avi berkdb cddb cdr chroot clamav cups dillo dvd
encode fbcon flac foomaticdb gif gphoto2 gtk gtk2 icq imagemagick imap imlib
imlib2 ipv6 java jpeg libwww mad mmx motif mozdomi mozilla moznocompose moznoirc
moznomail mozp3p mozsvg mozxmlterm mpeg msn ncurses nls nopsyco nptl oav
offensive oggvorbis opengl operanom2 oscar pdflib perl pic png ppds quicktime
readline samba sdl sse ssl tcltk tiff transcode truetype usb x86 xface xinerama
xml xml2 xmms xv xvid yahoo zlib"
Comment 1 Donnie Berkholz (RETIRED) gentoo-dev 2004-07-05 16:48:36 UTC
I don't know much about directfb and I'm not particularly interested in learning. Anyone want to take this on?
Comment 2 Donnie Berkholz (RETIRED) gentoo-dev 2004-07-07 16:45:48 UTC
games listed in DirectFB metadata.xml, so moving to them.
Comment 3 Michal Januszewski (RETIRED) gentoo-dev 2004-07-12 02:58:41 UTC
I'm running development-sources-2.6.7 and dfbsee works without any problems. Sometimes it uses libc memcpy(), and sometimes kernel memcpy(), but it never hangs.
I have glibc-2.3.3.20040420-r0, maybe it's glibc-2.3.4 that causes the problem here?
Comment 4 Michele Noberasco (RETIRED) gentoo-dev 2004-07-21 16:01:16 UTC
Hello, if you want I can take care of this, altough I don't know exactly what to do. I'm the author of qingy (http://qingy.sourceforge.net), which is DirectFB based, thus I'm quite interested in this one ;-)

What I made out this far is that this is a complex issue, because it depends on a number of different factors...

nptl: if you built your glibc with the nptl enabled, your only hope is to revert to 2.6.5, otherwise DirectFB will always lock your machine.

no nptl: you should teoretically be able to run DirectFB apps, but some bootsplash pacthes, like those included in gentoo-dev-sources (2.6.7-r11), make DFB lock, again... I am told that the latest love-sources (2.6.7 based) and 2.6.8-pre vanilla kernels work, but I have not tested these myself.

Personally, I'm sticking with gentoo-dev-sources-2.6.5-r1 until I can find a more recent kernel that will work with dfb and nptl

I wrote to the DirectFB mailing lists, but unfortunately the folks over there, hearing that I'm a Gentoo user, dismissed the issue as CFLAGS crap. Needless to say, I tested with my own CFLAGS (march=pentium3 -Os -fomit-frame-pointer, these kept me up and running for ages), with saner defaults, and with none at all, to no avail...

For other info and a lot of feedback see the latest pages of this thread:
http://forums.gentoo.org/viewtopic.php?t=72022

imho a sensible solution would be to add a USE flag to disable the bootsplash patch in our kernels, and a big fat warning against the nptl in DirectFB ebuilds...
Comment 5 Michal Januszewski (RETIRED) gentoo-dev 2004-07-22 07:58:32 UTC
As you can see in these `emerge info` excerpts:

Portage 2.0.51_pre13 (default-x86-1.4, gcc-3.3.4, glibc-2.3.4.20040619-r0, 2.6.8-rc2 i686 AMD Athlon(tm) Processor)

USE="3dnow X aalib alsa apache2 apm avi berkdb bindist bonobo cdr crypt cups curl directfb encode esd ethereal f77 fbcon flash foomaticdb gd gdbm gdm gif gimpprint gnome gnutls gpm gstreamer gtk gtk2 gtkhtml guile imagemagick imlib ipv6 jabber java jpeg libg++ libwww mad maildir mbox mikmod mmx mng motif mozilla moznocompose moznoirc mpeg mysql ncurses nls nptl oggvorbis opengl oss pam pdflib perl plotutils png postgres python quicktime readline samba scanner sdl slang spell ssl svga tcltk tcpd tetex threads tiff tlen truetype wmf x86 xml xml2 xmms xosd xv zlib linguas_en linguas_pl linguas_us linguas_de"

I'm using a nptl-enabled glibc and directfb does work (dfbsee, dfbpoint). It works with 2.6.8-rc* and it worked with 2.6.7 (vanilla patched with bootsplash). If I test any other dfb-based apps I'll let you know whether they worked, too.
Comment 6 Michele Noberasco (RETIRED) gentoo-dev 2004-07-22 15:03:16 UTC
I'm running with gcc-3.3.3-r6 and glibc-2.3.3.20040420 (gentoo stable versions on x86), but I'm willing to try your gcc-3.3.4, glibc-2.3.4.20040619-r0 and see what happens. Are you experiencing issues, stability wise? I ask because I own a lone poor laptop and do work on it, so stability is paramount for me...
Comment 7 Michele Noberasco (RETIRED) gentoo-dev 2004-08-03 00:40:29 UTC
No feedback? Too bad...
But I'll try these updated gcc and glibc anyway next week, when I return from vacation.
Comment 8 Michele Noberasco (RETIRED) gentoo-dev 2004-08-16 00:58:11 UTC
Michal, I upgraded to gcc-3.4.1-r2 and glibc-2.3.4.20040808 (nptl enabled) to no avail, it must be your bootsplash patch that does the trick...
Comment 9 Mr. Bones. (RETIRED) gentoo-dev 2004-09-21 22:42:01 UTC
What's the status on this?  Someone testing patches or what?
Comment 10 Donnie Berkholz (RETIRED) gentoo-dev 2004-09-22 01:46:15 UTC
I was just waiting for you to post the fix.
Comment 11 Michele Noberasco (RETIRED) gentoo-dev 2004-10-05 15:50:54 UTC
In case noone noticed: kernels 2.6.8 and above apparently work nicely (or at least the flavours I tried: gentoo-dev-sources and development-sources) with DirectFB. Dunno, but maybe we can resolve this as fixed upstream?
Comment 12 Mr. Bones. (RETIRED) gentoo-dev 2004-10-05 15:56:21 UTC
Sounds good to me.