Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 461840 - media-libs/mesa - segmentation fault in r600g_dri.so
Summary: media-libs/mesa - segmentation fault in r600g_dri.so
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-15 17:48 UTC by Lars Wendler (Polynomial-C) (RETIRED)
Modified: 2013-03-18 06:12 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-03-15 17:48:08 UTC
When compiling X packkages with x86_abi_32 ebing enabled dri modules from media-libs/mesa segfault when being accessed by applications:

lars@shanghai:~> LIBGL_DEBUG=verbose glxgears
libGL: OpenDriver: trying /usr/lib64/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/r600_dri.so
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: r600
libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
zsh: segmentation fault  LIBGL_DEBUG=verbose glxgears


corresponding dmesg output:

[  309.063866] glxgears[3118]: segfault at 0 ip 00007f6873d97411 sp 00007fff68f500c0 error 4 in r600g_dri.so[7f687387c000+1127000]


# emerge --info
Portage 2.2.0_alpha166 (default/linux/amd64/13.0/desktop/kde, gcc-4.7.2-asneeded, glibc-2.15-r3, 3.8.3 x86_64)
=================================================================
System uname: Linux-3.8.3-x86_64-Quad-Core_AMD_Opteron-tm-_Processor_2389-with-gentoo-2.2
KiB Mem:     8242984 total,   4615188 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Fri, 15 Mar 2013 07:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.10.2-r1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.6, 1.13.1
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.5.4, 4.6.3, 4.7.2-r1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo kde-sunset poly-c
Installed sets: @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=barcelona -mtune=barcelona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-3.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/X11/Sessions /etc/X11/app-defaults /etc/X11/xinit /etc/adobe /etc/bonobo-activation /etc/ca-certificates /etc/ca-certificates.conf /etc/dbus-1 /etc/env.d /etc/fonts /etc/fonts/fonts.conf /etc/foomatic /etc/games /etc/gconf /etc/gentoo-release /etc/gimp /etc/gnome-vfs-2.0 /etc/gre.d /etc/gtk-2.0 /etc/hp /etc/hsqldb /etc/htdig /etc/init.d /etc/iproute2 /etc/java-config-2 /etc/lftp /etc/logrotate.d /etc/ntop /etc/opt /etc/pango /etc/profile.d /etc/qt4 /etc/revdep-rebuild /etc/sandbox.d /etc/sasl2 /etc/sensors.d /etc/sgml /etc/sound /etc/ssl /etc/ssmtp /etc/t1lib /etc/terminfo /etc/vbox /etc/xdg /etc/xinetd.d /etc/xml"
CXXFLAGS="-march=barcelona -mtune=barcelona -O2 -pipe"
DISTDIR="/var/tmp/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical --with-bdeps=y --misspell-suggestions=n --autounmask=n --quiet-build=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
INSTALL_MASK="/lib/systemd /lib32/systemd /lib64/systemd /usr/lib/systemd /usr/lib32/systemd /usr/lib64/systemd"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/opt/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/portage"
PORTDIR_OVERLAY="/var/lib/layman/kde-sunset /usr/local/portage"
SYNC="rsync://192.168.0.254/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acpi alsa amd64 berkdb branding bzip2 cairo caps cdda cdr cli cracklib crypt css cups cxx dbus declarative dri dts dvd dvdr emboss encode exif faac fam ffmpeg firefox flac gdbm gif gmp gnutls gtk iconv idn inotify jpeg jpeg2k kde kipi lame lcms libnotify lzma mac mad matroska midi mmap mmx mmxext mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nsplugin ogg opengl openmp opus pam pango pcre pdf phonon plasma png ppds qt3support qt4 quicktime readline rtmp schroedinger sdl session slang spell sse sse2 ssl startup-notification svg theora threads tiff truetype twolame udev unicode upower usb vaapi vcd vorbis vpx wxwidgets x264 xcb xcomposite xinerama xml xscreensaver xv xvid xvmc zlib zsh-completion" ABI_X86="64" ALSA_CARDS="emu10k1 hda-intel usb-audio" 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" ELIBC="glibc" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev joystick" KERNEL="linux" LIBREOFFICE_EXTENSIONS="pdfimport presenter-console presenter-minimizer" LINGUAS="de en" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CPPFLAGS, CTARGET, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-03-16 16:20:05 UTC
Please post your `emerge -vpq media-libs/mesa output in a comment.
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-03-16 20:05:49 UTC
# emerge -qpv mesa
[ebuild   R   ] media-libs/mesa-9.1  USE="-bindist classic -debug egl gallium -gbm -gles1 -gles2 llvm nptl openvg osmesa -pax_kernel -pic -r600-llvm-compiler (-selinux) shared-glapi -vdpau -wayland -xa xorg xvmc" PYTHON_SINGLE_TARGET="-python2_6 python2_7" PYTHON_TARGETS="-python2_6 python2_7" VIDEO_CARDS="-i915 -i965 -intel -nouveau -r100 -r200 -r300 -r600 radeon -radeonsi -vmware"
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-03-16 21:47:18 UTC
Okay I now reverted back all ebuilds who make use of this X86_ABI="32" feature to not use it and the segfaults persist.
So I'm now seeking for help how to fix this. Up to now I've tried the following to no avail:

- recompiled mesa, libdrm, xorg-server, xf86-video-ati
- changed USE flags for mesa to its default values
- compiled mesa and mesa-progs with debug symbols. See the backtrace below:


lars@shanghai:~> gdb glxgears
GNU gdb (Gentoo 7.5.1 p1) 7.5.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/bin/glxgears...done.
(gdb) run
Starting program: /usr/bin/glxgears 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
libGL error: failed to load driver: r600
libGL error: Try again with LIBGL_DEBUG=verbose for more details.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff416618a in do_winsys_init (ws=0x63de60) at radeon_drm_winsys.c:204
204     radeon_drm_winsys.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0  0x00007ffff416618a in do_winsys_init (ws=0x63de60)
    at radeon_drm_winsys.c:204
#1  0x00007ffff416d488 in radeon_drm_winsys_create (fd=-1)
    at radeon_drm_winsys.c:582
#2  0x00007ffff3d28c87 in create_screen (fd=-1) at target.c:11
#3  0x00007ffff4161bed in dri2_init_screen (sPriv=0x63dcf0) at dri2.c:807
#4  0x00007ffff1af0feb in driCreateNewScreen (scrn=0,
    extensions=0x7ffff7a9c6f0 <loader_extensions>,
    driver_configs=0x7fffffffd508, data=0x617db0)
    at ../../../../src/mesa/drivers/dri/common/drisw_util.c:69
#5  0x00007ffff787b5d6 in driswCreateScreen (screen=0, priv=0x614790)
    at drisw_glx.c:672
#6  0x00007ffff7847761 in AllocAndFetchScreenConfigs (dpy=0x605010,
    priv=0x614790) at glxext.c:758
#7  0x00007ffff7847b13 in __glXInitialize (dpy=0x605010) at glxext.c:859
#8  0x00007ffff78419db in GetGLXPrivScreenConfig (dpy=0x605010, scrn=0,
    ppriv=0x7fffffffd758, ppsc=0x7fffffffd750) at glxcmds.c:174
#9  0x00007ffff7843b44 in glXChooseVisual (dpy=0x605010, screen=0,
    attribList=0x7fffffffd7d0) at glxcmds.c:1195
#10 0x0000000000402d04 in make_window (ctxRet=<synthetic pointer>,
    winRet=<synthetic pointer>, height=300, width=300, y=0, x=0,
    name=0x403740 "glxgears", dpy=0x605010) at src/xdemos/glxgears.c:515
#11 main (argc=1, argv=<optimized out>) at src/xdemos/glxgears.c:756
(gdb)
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-03-18 06:12:19 UTC
Okay, found out it's a permission problem. Seems like recent attempts to fix udev's rc_coldplug="NO" feature screwed up the /dev tree wuite a bit (see bug #461838). Sorry for all the useless noise with this bug :-(