From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon@freedesktop.org
Subject: [Bug 101055] All GL programs segfault:
i915_state_derived.c:calculate_vertex_layout: i915->fs == 0
Date: Mon, 15 May 2017 22:21:36 +0000
Message-ID:
Bug ID
101055
Summary
All GL programs segfault: i915_state_derived.c:calculate_vert=
ex_layout: i915->fs =3D=3D 0
Product
Mesa
Version
17.1
Hardware
x86-64 (AMD64)
OS
Linux (All)
Status
NEW
Severity
major
Priority
medium
Component
Drivers/DRI/i915
Assignee
dri-devel@lists.freedesktop.org
Reporter
creideiki+freedesktop-bugzilla@ferretporn.se
QA Contact
dri-devel@lists.freedesktop.org
I'm trying to reinstall an old laptop (Lenovo Thinkpad X60, wi=
th a Core 2 Duo
CPU) with a modern Gentoo Linux, but have run into a problem where every
program trying to use OpenGL segfaults immediately. This makes running e.g.=
KDE
5 a bit difficult. TWM works, though, so I can get X, just not OpenGL.
Here's what GDB thinks of glxgears, but every other program I've managed to
debug crashes in the same way:
(gdb) run
Starting program: /usr/bin/glxgears=20
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
Program received signal SIGSEGV, Segmentation fault.
calculate_vertex_layout (i915=3D0x616310) at
/var/tmp/portage/media-libs/mesa-17.1.0/work/mesa-17.1.0/src/gallium/driver=
s/i915/i915_state_derived.c:72
72 for (i =3D 0; i < fs->info.num_inputs; i++) {
(gdb) bt
#0 calculate_vertex_layout (i915=3D0x616310) at
/var/tmp/portage/media-libs/mesa-17.1.0/work/mesa-17.1.0/src/gallium/driver=
s/i915/i915_state_derived.c:72
#1 0x00007ffff41fd016 in i915_update_derived (i915=3Di915@entry=3D0x61=
6310)
at
/var/tmp/portage/media-libs/mesa-17.1.0/work/mesa-17.1.0/src/gallium/driver=
s/i915/i915_state_derived.c:221
#2 0x00007ffff41ef31a in i915_clear_render (pipe=3D0x616310, buffers=3D5,
color=3D0x7ffff7fd0b4c, depth=3D1, stencil=3D0)
at
/var/tmp/portage/media-libs/mesa-17.1.0/work/mesa-17.1.0/src/gallium/driver=
s/i915/i915_clear.c:254
#3 0x00007ffff3f56d71 in st_Clear (ctx=3D0x7ffff7fcf010, mask=3D18) at
/var/tmp/portage/media-libs/mesa-17.1.0/work/mesa-17.1.0/src/mesa/state_tra=
cker/st_cb_clear.c:481
#4 0x000000000040251e in draw () at glxgears.c:254
#5 0x0000000000401ce8 in draw_gears () at glxgears.c:316
#6 draw_frame (win=3D18874370, dpy=3D0x606010) at glxgears.c:341
#7 event_loop (win=3D18874370, dpy=3D0x606010) at glxgears.c:703
#8 main (argc=3D<optimized out>, argv=3D<optimized out>) at gl=
xgears.c:798
(gdb) print fs
$1 =3D (const struct i915_fragment_shader *) 0x0
"fs" comes almost directly from the function argument:
static void calculate_vertex_layout(struct i915_context *i915)
{
const struct i915_fragment_shader *fs =3D i915->fs;
[...]
Then, in the for() loop, trying to dereference "fs" when it is a =
null pointer
is obviously a bad thing.
Hardware:
~ # lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS,
943/940GML Express Integrated Graphics Controller (rev 03)
~ # grep Chipset: /var/log/Xorg.0.log
[ 4671.977] (--) intel(0): Integrated Graphics Chipset: Intel(R) 945GM
~ # grep name /proc/cpuinfo
model name : Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz
model name : Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz
Software:
~ # emerge --info media-libs/mesa=20
Portage 2.3.5 (python 3.4.6-final-0, default/linux/amd64/13.0, gcc-6.3.0,
glibc-2.24-r1, 4.11.0-gentoo x86_64)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
System Settings
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
System uname:
Linux-4.11.0-gentoo-x86_64-Intel-R-_Core-TM-2=
_CPU_T7200_@_2.00GHz-with-gentoo-2.3
KiB Mem: 3068136 total, 1191300 free
KiB Swap: 8388604 total, 8388604 free
Timestamp of repository gentoo: Mon, 15 May 2017 21:15:01 +0000
sh bash 4.4_p12
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
app-shells/bash: 4.4_p12::gentoo
dev-lang/perl: 5.24.1-r1::gentoo
dev-lang/python: 2.7.13::gentoo, 3.4.6::gentoo
dev-util/cmake: 3.8.1::gentoo
dev-util/pkgconfig: 0.29.2::gentoo
sys-apps/baselayout: 2.3::gentoo
sys-apps/openrc: 0.26.1::gentoo
sys-apps/sandbox: 2.10-r4::gentoo
sys-devel/autoconf: 2.13::gentoo, 2.69-r3::gentoo
sys-devel/automake: 1.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.15-r2::ge=
ntoo
sys-devel/binutils: 2.26.1::gentoo, 2.27::gentoo
sys-devel/gcc: 6.3.0::gentoo
sys-devel/gcc-config: 1.8-r1::gentoo
sys-devel/libtool: 2.4.6-r4::gentoo
sys-devel/make: 4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc: 2.24-r1::gentoo
Repositories:
gentoo
location: /usr/portage
sync-type: rsync
sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
priority: -1000
creideiki
location: /usr/local/portage
masters: gentoo
priority: 0
torbrowser
location: /var/lib/layman/torbrowser
masters: gentoo
priority: 50
ACCEPT_KEYWORDS=3D"amd64 ~amd64"
ACCEPT_LICENSE=3D"* -@EULA"
CBUILD=3D"x86_64-pc-linux-gnu"
CFLAGS=3D"-march=3Dnative -O2 -pipe -ggdb"
CHOST=3D"x86_64-pc-linux-gnu"
CONFIG_PROTECT=3D"/etc /usr/share/config /usr/share/gnupg/qualified.tx=
t"
CONFIG_PROTECT_MASK=3D"/etc/ca-certificates.conf /etc/dconf /etc/env.d
/etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild
/etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d
/etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS=3D"-march=3Dnative -O2 -pipe -ggdb"
DISTDIR=3D"/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS=3D"--alphabetical --keep-going --quiet-build=3Dn
--verbose-conflicts"
FCFLAGS=3D"-O2 -pipe"
FEATURES=3D"assume-digests binpkg-logs buildpkg config-protect-if-modi=
fied
distlocks ebuild-locks fixlafiles merge-sync news nostrip parallel-fetch
parallel-install preserve-libs protect-owned sandbox sfperms strict
unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv
usersandbox usersync xattr"
FFLAGS=3D"-O2 -pipe"
GENTOO_MIRRORS=3D"http://distf=
iles.gentoo.org http://gentoo=
.oregonstate.edu
http://ww=
w.ibiblio.org/pub/Linux/distributions/gentoo"
LANG=3D"en_US.utf8"
LDFLAGS=3D"-Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--hash-style=3Dgnu
-Wl,--enable-new-dtags"
MAKEOPTS=3D"-j2"
PKGDIR=3D"/usr/portage/packages"
PORTAGE_CONFIGROOT=3D"/"
PORTAGE_RSYNC_OPTS=3D"--recursive --links --safe-links --perms --times
--omit-dir-times --compress --force --whole-file --delete --stats
--human-readable --timeout=3D180 --exclude=3D/distfiles --exclude=3D/local
--exclude=3D/packages --exclude=3D/.git"
PORTAGE_TMPDIR=3D"/var/tmp"
USE=3D"X acl alsa amd64 berkdb bzip2 cli cracklib crypt cups cxx dbus =
dri egl
emacs flac fortran gdbm gif iconv ipv6 jpeg kde lm_sensors modules mp3 mult=
ilib
ncurses nls nptl ogg opengl openmp pam pcre png qt5 readline seccomp session
ssl tcpd tiff truetype unicode vorbis x264 xattr zlib" ABI_X86=3D"=
;64"
ALSA_CARDS=3D"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" APACHE2_MODULES=3D&quo=
t;authn_core
authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_a=
non
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_l=
ock
deflate dir disk_cache env expires ext_filter file_cache filter headers inc=
lude
info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif
speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATU=
RES=3D"kexi
words flow plan sheets stage tables krita karbon braindump author"
COLLECTD_PLUGINS=3D"df interface irq load memory rrdtool swap syslog&q=
uot;
CPU_FLAGS_X86=3D"mmx mmxext sse sse2 sse3 ssse3" ELIBC=3D"gl=
ibc"
GPSD_PROTOCOLS=3D"ashtech aivdm earthmate evermore fv18 garmin garmint=
xt gpsclock
isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2
rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx"
GRUB_PLATFORMS=3D"pc" INPUT_DEVICES=3D"evdev keyboard libinp=
ut mouse wacom"
KERNEL=3D"linux" LCD_DEVICES=3D"bayrad cfontz cfontz633 glk =
hd44780 lb216 lcdm001
mtxorb ncurses text" LIBREOFFICE_EXTENSIONS=3D"presenter-console
presenter-minimizer" OFFICE_IMPLEMENTATION=3D"libreoffice" P=
HP_TARGETS=3D"php5-6"
PYTHON_SINGLE_TARGET=3D"python3_4" PYTHON_TARGETS=3D"python2=
_7 python3_4"
RUBY_TARGETS=3D"ruby23 ruby24" USERLAND=3D"GNU" VIDEO_C=
ARDS=3D"intel i915"
XTABLES_ADDONS=3D"quota2 psd pknock lscan length2 ipv4options ipset ip=
p2p iface
geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac
delude chaos account"
Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL,
PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS,
PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Package Settings
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
media-libs/mesa-17.1.0::gentoo was built with the following:
USE=3D"-bindist classic -d3d9 -debug dri3 egl gallium gbm -gles1 -gles=
2 llvm nptl
-opencl -openmax -osmesa -pax_kernel -pic (-selinux) -unwind -vaapi -valgri=
nd
-vdpau -vulkan wayland -xa -xvmc" ABI_X86=3D"-32 64 -x32" VI=
DEO_CARDS=3D"-freedreno
i915 -i965 -imx intel -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi -v=
c4
-vivante -vmware"