Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 837872 - dev-util/intel-graphics-compiler-1.0.10840-r1 Segfault
Summary: dev-util/intel-graphics-compiler-1.0.10840-r1 Segfault
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jan Henke
URL: https://github.com/intel/intel-graphi...
Whiteboard:
Keywords: PullRequest
: 840939 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-04-11 18:59 UTC by Freddie Witherden
Modified: 2022-05-01 20:28 UTC (History)
5 users (show)

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 Freddie Witherden 2022-04-11 18:59:56 UTC
On an ~AMD64 system with an Intel Tiger Lake Xe GPU when I attempt to run clinfo (from https://github.com/Oblomov/clinfo) I get a segfault as per:

Thread 1 "clinfo" received signal SIGSEGV, Segmentation fault.
0x00007fffe2b1d461 in llvm::PointerType::get(llvm::Type*, unsigned int) () from /usr/lib/llvm/13/lib64/libLLVM-13.so
(gdb) bt
#0  0x00007fffe2b1d461 in llvm::PointerType::get(llvm::Type*, unsigned int) () from /usr/lib/llvm/13/lib64/libLLVM-13.so
#1  0x00007fffc8db1535 in ?? () from /usr/lib64/libigc.so.1
#2  0x00007fffc8dcfc95 in ?? () from /usr/lib64/libigc.so.1
#3  0x00007fffc8dd4309 in ?? () from /usr/lib64/libigc.so.1
#4  0x00007fffc8dda5a8 in ?? () from /usr/lib64/libigc.so.1
#5  0x00007fffc8ddfd8d in ?? () from /usr/lib64/libigc.so.1
#6  0x00007fffc8de06f8 in ?? () from /usr/lib64/libigc.so.1
#7  0x00007fffc8d0c588 in ?? () from /usr/lib64/libigc.so.1
#8  0x00007fffc8d0dc4a in ?? () from /usr/lib64/libigc.so.1
#9  0x00007fffc8d0f1e9 in ?? () from /usr/lib64/libigc.so.1
#10 0x00007fffc8e0090b in ?? () from /usr/lib64/libigc.so.1
#11 0x00007fffc8d123e3 in ?? () from /usr/lib64/libigc.so.1
#12 0x00007fffc8dee2bf in ?? () from /usr/lib64/libigc.so.1
#13 0x00007ffff6538305 in ?? () from /usr/lib64/intel-opencl/libigdrcl.so
#14 0x00007ffff6126e63 in ?? () from /usr/lib64/intel-opencl/libigdrcl.so
#15 0x00007ffff60d7b3e in ?? () from /usr/lib64/intel-opencl/libigdrcl.so
#16 0x00007ffff7f6ad6e in clBuildProgram () from /usr/lib64/libOpenCL.so.1
#17 0x000055555555e3a3 in getWGsizes (ret=0x7fffffffd0c0, loc=0x7fffffffd080, wgm=0x7fffffffd000, wgm_sz=1,
output=0x7fffffffd510) at src/clinfo.c:1212
#18 0x000055555555e72b in device_info_wg (ret=0x7fffffffd0c0, loc=0x7fffffffd080, chk=0x7fffffffd120, output=0x7fffffffd510)
at src/clinfo.c:1268
#19 0x0000555555562378 in printDeviceInfo (dev=0x5555556d60d0, plist=0x7fffffffd530, p=1, param_whitelist=0x0,
output=0x7fffffffd510) at src/clinfo.c:2408
#20 0x0000555555562d32 in printPlatformDevices (plist=0x7fffffffd530, p=1, device=0x5555556d6058, ndevs=1, str=0x7fffffffd450,
output=0x7fffffffd510, these_are_offline=0) at src/clinfo.c:2617
#21 0x0000555555563059 in showDevices (plist=0x7fffffffd530, output=0x7fffffffd510) at src/clinfo.c:2663
#22 0x00005555555653f6 in main (argc=1, argv=0x7fffffffd698) at src/clinfo.c:3294

with libigc.so belonging to Intel Graphics Compiler.  Unfortunately, even with USE="debug" the library is stripped so I can not get symbols.

This GPU has worked fine in the past with previous releases (although I am unsure how far back).  Is it certainly the case that intel-graphics-compiler supports LLVM 13?

$ emerge --info
Portage 3.0.30 (python 3.9.12-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-11.2.1, glibc-2.35-r2, 5.13.0-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-5.13.0-gentoo-x86_64-x86_64-11th_Gen_Intel-R-_Core-TM-_i7-1165G7_@_2.80GHz-with-glibc2.35
KiB Mem:    65524028 total,  36039192 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 11 Apr 2022 11:00:01 +0000
Head commit of repository gentoo: 3bc501d23f41582a1f9dc929f976ab598d62393c
sh bash 5.1_p16
ld GNU ld (Gentoo 2.36.1 p4) 2.36.1
app-misc/pax-utils:        1.3.3::gentoo
app-shells/bash:           5.1_p16::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.34.1::gentoo
dev-lang/python:           2.7.18_p15::gentoo, 3.9.12::gentoo, 3.10.4::gentoo
dev-lang/rust:             1.60.0::gentoo
dev-util/cmake:            3.23.0::gentoo
dev-util/meson:            0.61.4-r2::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/openrc:           0.44.10::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.13-r1::gentoo, 2.69-r5::gentoo, 2.71-r1::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.36.1-r2::gentoo, 2.37_p1-r2::gentoo, 2.38-r1::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           11.1.0::gentoo, 12.0.1::gentoo, 13.0.1::gentoo, 14.0.0-r1::gentoo
sys-devel/gcc:             11.2.1_p20220115::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             13.0.1::gentoo
sys-devel/llvm:            11.1.0::gentoo, 12.0.1::gentoo, 13.0.1::gentoo, 14.0.0::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.17::gentoo (virtual/os-headers)
sys-libs/glibc:            2.35-r2::gentoo
Repositories:

gentoo
location: /usr/portage
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
sync-rsync-extra-opts: 
sync-rsync-verify-max-age: 24
sync-rsync-verify-jobs: 1
sync-rsync-verify-metamanifest: yes

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA NVIDIA-CUDA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPTXAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-w -fallow-argument-mismatch"
GENTOO_MIRRORS="http://mirror.leaseweb.com/gentoo/"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl acpi activities alsa amd64 bluetooth branding bzip2 cairo cdda cdr cli color-management crypt cups dbus declarative djvu dri dri3 dts dvd dvdr elogind encode exif fftw flac fortran gdbm gif glamor glib gtk3 gui hdf5 iconv icu ipv6 java jpeg jpeg2k kde kwallet lcms libglvnd libnotify libtirpc logrotate mad mng mp3 mp4 mpeg mpi multilib ncurses networkmanager nls nptl nvme ogg opengl openmp pam pango pcre pdf plasma png policykit ppds pulseaudio qml qt5 raw readline s3tc sdl seccomp semantic-desktop spell split-usr ssl startup-notification svg thunderbolt tiff truetype udev udisks unicode upower usb vaapi vdpau vorbis vulkan widgets wxwidgets x264 xattr xcb xml xv xvid zeroconf zlib" ABI_X86="64" ADA_TARGET="gnat_2020" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 f16c avx512f fma3 popcnt" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcomoceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="wacom libinput keyboard mouse" KERNEL="linux" L10N="en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncursestext" LIBREOFFICE_EXTENSIONS="nlpsolver" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="nvidia intel iris" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4optionsipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB,READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Conrad Kostecki gentoo-dev 2022-04-11 19:51:07 UTC
Did you tried back older dev-util/intel-graphics-compiler-1.0.10778-r1 and dev-util/intel-graphics-compiler-1.0.10713-r1? Does it also segfault here?

My GPU is older, as I have only Skylake, but I don't have segfaults here.
Comment 2 Freddie Witherden 2022-04-11 20:03:46 UTC
I can confirm these issues on the older releases.  Same place.  Has anyone with a recent Intel GPU had success?  Last time I can confirm it was working was back in December.
Comment 3 Conrad Kostecki gentoo-dev 2022-04-28 20:34:00 UTC
*** Bug 840939 has been marked as a duplicate of this bug. ***
Comment 4 Conrad Kostecki gentoo-dev 2022-04-29 09:27:30 UTC
@Jan: I did run a local test with LLVM-12 and indeed the segfaults with clinfo are gone.

@mgorny: How long do we will have LLVM-12 in tree until removal?
Comment 5 Larry the Git Cow gentoo-dev 2022-04-29 21:08:56 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be1392dc58f069dd90e9500c8c0406ae9b5ccb1a

commit be1392dc58f069dd90e9500c8c0406ae9b5ccb1a
Author:     Conrad Kostecki <conikost@gentoo.org>
AuthorDate: 2022-04-29 20:26:58 +0000
Commit:     Conrad Kostecki <conikost@gentoo.org>
CommitDate: 2022-04-29 20:59:16 +0000

    dev-util/intel-graphics-compiler: force llvm12 instead llvm13 for 1.0.11061-r1
    
    Bug: https://bugs.gentoo.org/837872
    Signed-off-by: Conrad Kostecki <conikost@gentoo.org>

 .../intel-graphics-compiler-1.0.11061-r1.ebuild    | 83 ++++++++++++++++++++++
 1 file changed, 83 insertions(+)
Comment 6 Conrad Kostecki gentoo-dev 2022-04-29 21:10:39 UTC
I just bumped to newest compute-runtime and added a test for LLVM-12. I tested on multiple systems and clinfo didn't segfault anymore. Could anyone also test and report?
Comment 7 Larry the Git Cow gentoo-dev 2022-05-01 19:53:46 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d52666486cf6c2fa7ffaa9ee3ad8f3f449275213

commit d52666486cf6c2fa7ffaa9ee3ad8f3f449275213
Author:     Conrad Kostecki <conikost@gentoo.org>
AuthorDate: 2022-04-29 10:35:19 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-05-01 19:53:36 +0000

    dev-util/intel-graphics-compiler: force LLVM12 instead LLVM13
    
    Compiling with LLVM13 causes currently segfaults.
    See https://github.com/intel/intel-graphics-compiler/issues/204
    
    Closes: https://bugs.gentoo.org/837872
    Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
    Signed-off-by: Sam James <sam@gentoo.org>

 ...=> intel-graphics-compiler-1.0.10778-r2.ebuild} |  7 +-
 ...=> intel-graphics-compiler-1.0.10988-r1.ebuild} |  7 +-
 .../intel-graphics-compiler-1.0.11061.ebuild       | 86 ----------------------
 3 files changed, 4 insertions(+), 96 deletions(-)