Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 563854 - sci-geosciences/grass-7.0.1[gdal,opencl]: sandbox access violation when built against sci-libs/gdal[opencl]
Summary: sci-geosciences/grass-7.0.1[gdal,opencl]: sandbox access violation when built...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Sam Jorna (wraeth)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-23 08:26 UTC by Christian Schmitt
Modified: 2015-10-28 15:12 UTC (History)
2 users (show)

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


Attachments
build log for grass-7.0.1-r1 (grass-7.0.1-r1-build.log.gz,154.76 KB, application/gzip)
2015-10-24 11:05 UTC, Christian Schmitt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Schmitt 2015-10-23 08:26:36 UTC
GRASS 7.0.1-r1 compiles, but the sandbox gives numerous access violation errors for /dev/dri/renderD128.

Reproducible: Always

Steps to Reproduce:
1.Compile grass-7.0.1-r1 with the following USE flags:
sci-geosciences/grass-7.0.1-r1:7::gentoo  USE="X cxx gdal geos opencl opengl openmp png postgres readline threads tiff truetype -blas -debug -fftw -lapack -mysql -netcdf -nls -odbc -sqlite" PYTHON_TARGETS="python2_7"




emerge --info
Portage 2.2.23 (python 2.7.10-final-0, default/linux/amd64/13.0/desktop/kde, gcc-4.9.3, glibc-2.22-r1, 4.2.3-gentoo x86_64)
=================================================================
System uname: Linux-4.2.3-gentoo-x86_64-AMD_Phenom-tm-_II_X4_905e_Processor-with-gentoo-2.2
KiB Mem:     4048852 total,    248336 free
KiB Swap:   48837628 total,  48827056 free
Timestamp of repository gentoo: Fri, 23 Oct 2015 08:00:01 +0000
sh bash 4.3_p42
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.22.0::gentoo
dev-lang/python:          2.7.10::gentoo, 3.4.3::gentoo
dev-util/cmake:           3.3.2-r1::gentoo
dev-util/pkgconfig:       0.29::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.18.3::gentoo
sys-apps/sandbox:         2.9::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.2::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

local
    location: /usr/local/overlay/local
    masters: gentoo
    priority: 0

kde
    location: /usr/local/overlay/kde
    masters: gentoo
    priority: 1

gamerlay
    location: /usr/local/overlay/gentoo-games
    masters: gentoo
    priority: 2

custom
    location: /usr/local/portage
    masters: gentoo
    priority: 3

science
    location: /usr/local/overlay/science
    masters: gentoo
    priority: 4

Installed sets: @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/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"
CXXFLAGS="-march=native -O2 -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news nodoc noinfo parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://de-mirror.org/distro/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="3dnow 3dnowext X a52 aac acpi alsa amd64 branding bzip2 cairo cdda cdr cli consolekit cracklib crypt css cups cxx dbus declarative device-mapper dri dts dvb dvd dvdr emboss encode exif ffmpeg firefox flac fontconfig gdbm geos gif glamor iconv ieee1394 inotify ipv6 jpeg jpeg2k kde kipi lcms libav lm_sensors lzma mad mjpeg mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nptl ogg opencl openexr opengl openmp opus pam pango pcre pdf phonon plasma png policykit ppds qt3support qt4 quicktime readline scanner sdl seccomp session smp sse sse2 sse3 ssl startup-notification svg theora threads tiff truetype udev udisks unicode upower usb v4l vcd vdpau vorbis vpx x264 x265 xattr xcb xcomposite xscreensaver xv xvid xvmc zlib" ABI_X86="64" 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext sse sse2 sse3" 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 ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LIRC_DEVICES="userspace" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby20 ruby21" SANE_BACKENDS="hp5590" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Michael Palimaka (kensington) gentoo-dev 2015-10-23 15:14:40 UTC
Please attach the build log.
Comment 2 Christian Schmitt 2015-10-23 20:25:00 UTC
...I wish I could. Can't upload the build.log.gz file at the moment. The site does not respond.
Comment 3 Sam Jorna (wraeth) gentoo-dev 2015-10-24 10:46:01 UTC
It may be the size of the log file that is causing an issue - uncompressed, build.log for grass is generally around 3-3.5MB. Try compressing the build.log with gzip and attaching that instead.
Comment 4 Christian Schmitt 2015-10-24 11:05:14 UTC
Created attachment 415344 [details]
build log for grass-7.0.1-r1

...here we go
Comment 5 Sam Jorna (wraeth) gentoo-dev 2015-10-24 15:49:27 UTC
I have tried rebuilding grass with a number of different configurations of USE, FEATURES and CFLAGS and have been unable to reproduce this issue.

For now I will close this bug, however can you ensure your system is up to date and try identifying a particular option or configuration that may be triggering this. If you can provide more information, please reopen this bug and let me know.
Comment 6 Christian Schmitt 2015-10-24 21:22:55 UTC
I dug deeper into this and what I figured out is the following error matrix:

All USE flags set as mentioned in #1 with the following alternations:

1.) +gdal, -postgis: access violation
2.) -gdal, -postgis: compiles fine
3.) -gdal, +postgis: compile error in v.external module (missing ogr_api.h header file). No access violation error.

The last error looks like an upstream bug to me, as it should not build v.external if no GDAL is available. It does so since v.external also works with postgis. I will report the last case upstream and would be happy if anyone could confirm the remaining two cases.
It clearly is triggered by the GDAL option. Question remains: what calls /dev/dri/renderD128 ?
It must be something within (wx)python...
Comment 7 Christian Schmitt 2015-10-25 11:36:10 UTC
Case 3 now works with the patch from the GRASS bug URL.
Comment 8 Christian Schmitt 2015-10-25 14:31:35 UTC
I'm getting closer to the root of the issue:
sci-libs/gdal-2.0.0-r1 compiled with opencl exhibits the access violation in GRASS. Without it GRASS compiles fine (even with opencl enabled in GRASS).
Could you try again to reproduce it?
Comment 9 Sam Jorna (wraeth) gentoo-dev 2015-10-26 14:53:44 UTC
I've replicated this thanks to your information and will get a fix ready soon. I have also split the build failure caused by the missing header into bug 564188 as it is a separate issue.
Comment 10 Sam Jorna (wraeth) gentoo-dev 2015-10-28 15:12:58 UTC
Author: Amy Winston <amynka@gentoo.org>
Date:   Wed Oct 28 16:03:38 2015 +0100

    sci-geosciences/grass: revbump to 7.0.1-r3

    Fixes sandbox violation when build with USE=opencl, remove USE=gdal and
    add hard dependency based on upstream requirements to resolve build
    failure, tidy patches into to PATCHES array, ebuild submitted by wraeth.

    Gentoo-bug: 563854
    Gentoo-bug: 564188