When enabling the OpenCL use flag for Mesa, programs which use OpenCL, including clinfo and Blender, crash, with Valgrind and gdb showing a stacktrace with errors in libLLVM-13.so. I have also posted about this in the forums: https://forums.gentoo.org/viewtopic-t-1146321.html?sid=35bf01b96752e6b28ee3e13b0e0f0227. However, nobody has responded. Since even after updating to the latest Mesa 21.3.2 the issue persists, I have decided to file a bug. Reproducible: Always Steps to Reproduce: 1. Have mesa installed with the OpenCL use flag enabled. 2. Run any OpenCL program; my example is Clinfo as it is fast and easy to debug. Actual Results: % clinfo Number of platforms 1 Platform Name Clover Platform Vendor Mesa Platform Version OpenCL 1.1 Mesa 21.3.2 Platform Profile FULL_PROFILE Platform Extensions cl_khr_icd Platform Extensions function suffix MESA Platform Name Clover Number of devices 1 Device Name AMD Radeon (TM) RX 480 Graphics (POLARIS10, DRM 3.42.0, 5.15.7-gentoo, LLVM 13.0.0) Device Vendor AMD Device Vendor ID 0x1002 Device Version OpenCL 1.1 Mesa 21.3.2 Device Numeric Version 0x401000 (1.1.0) Driver Version 21.3.2 Device OpenCL C Version OpenCL C 1.1 Device Type GPU Device Profile FULL_PROFILE Device Available Yes Compiler Available Yes Max compute units 36 Max clock frequency 1266MHz Max work item dimensions 3 Max work item sizes 256x256x256 Max work group size 256 '+fp64-denormals' is not a recognized feature for this target (ignoring feature) '-fp32-denormals' is not a recognized feature for this target (ignoring feature) '+fp64-denormals' is not a recognized feature for this target (ignoring feature) '-fp32-denormals' is not a recognized feature for this target (ignoring feature) LLVM ERROR: Cannot select: 0x55883449c8e8: i32,ch = load<(dereferenceable invariant load (s32) from %ir.2, addrspace 2)> 0x558834700690, 0x55883449c678, undef:i32, 0x558834700690:1 0x55883449c678: i32 = add nuw 0x55883449c5a8, Constant:i32<4> 0x55883449c5a8: i32 = AssertAlign 0x55883449c338 0x55883449c338: i32,ch = CopyFromReg 0x5588341ad948, Register:i32 %2 0x55883449ca20: i32 = Register %2 0x55883449c610: i32 = Constant<4> 0x55883449c748: i32 = undef 0x558834700690: ch,glue = SI_INIT_M0 TargetConstant:i32<0>, 0x5588341ad948 0x55883449bff8: i32 = TargetConstant<0> In function: sum zsh: abort clinfo Expected Results: OpenCL works without any crashes (Mesa), kernel panics, freezes, etc. LLVM and Clang 10.0.0, 12.0.1, and 13.0.0 are installed. % emerge --info Portage 3.0.30 (python 3.9.0-beta-4, default/linux/amd64/17.1/desktop/plasma, gcc-11.1.0, glibc-2.33-r1, 5.15.7-gentoo x86_64) ================================================================= System uname: Linux-5.15.7-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_X5560_@_2.80GHz-with-glibc2.33 KiB Mem: 82446028 total, 18166380 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Sat, 18 Dec 2021 04:45:01 +0000 Head commit of repository gentoo: ca8991f2431c69d67e714fa43d27f618fefa70a6 Head commit of repository brother-overlay: b216154a0197486ec867d92bedf48aec7f958c9d Timestamp of repository dotnet: Thu, 16 Dec 2021 15:06:31 +0000 Head commit of repository dotnet: c1212932378a2e15ed9dcbfc49d4919334e280c3 Head commit of repository steam-overlay: bcdf7b7b1ffb3058a0d924e849a5abf18f364d9c sh bash 5.0_p18 ld GNU ld (Gentoo 2.37_p1 p1) 2.37 distcc 3.4 x86_64-pc-linux-gnu [disabled] ccache version 4.0 [disabled] app-misc/pax-utils: 1.3.3::gentoo app-shells/bash: 5.0_p18::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.34.0-r5::gentoo dev-lang/python: 2.7.18::gentoo, 3.6.11-r1::gentoo, 3.7.9::gentoo, 3.8.4::gentoo, 3.9.0_beta4::gentoo, 3.10.0::gentoo dev-lang/rust: 1.56.1::gentoo dev-util/ccache: 4.0::gentoo dev-util/cmake: 3.22.1::gentoo dev-util/meson: 0.59.1-r1::gentoo sec-policy/selinux-base: 2.20190609-r1::gentoo sys-apps/baselayout: 2.7::gentoo sys-apps/openrc: 0.44.9::gentoo sys-apps/sandbox: 2.24::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo sys-devel/automake: 1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.3-r1::gentoo sys-devel/binutils: 2.37_p1-r1::gentoo sys-devel/binutils-config: 5.3.2::gentoo sys-devel/clang: 10.0.0::gentoo, 12.0.1::gentoo, 13.0.0::gentoo sys-devel/gcc: 4.9.4-r1::gentoo, 5.5.0::gentoo, 7.5.0-r1::gentoo, 8.4.0-r1::gentoo, 9.3.0::gentoo, 10.2.0-r3::gentoo, 11.1.0::gentoo sys-devel/gcc-config: 2.3.1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/lld: 12.0.1::gentoo sys-devel/llvm: 10.0.0::gentoo, 12.0.1::gentoo, 13.0.0::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.14::gentoo (virtual/os-headers) sys-libs/glibc: 2.33-r1::gentoo sys-libs/libselinux: 3.0::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.us.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-jobs: 1 sync-rsync-verify-max-age: 24 sync-rsync-verify-metamanifest: yes sync-rsync-extra-opts: brother-overlay location: /usr/local/overlay/brother-overlay sync-type: git sync-uri: https://github.com/stefan-langenmaier/brother-overlay.git masters: gentoo crossdev location: /var/db/repos/crossdev masters: gentoo qt lisp dotnet dotnet location: /var/db/repos/dotnet sync-type: git sync-uri: https://github.com/gentoo-mirror/dotnet.git masters: gentoo localrepo location: /usr/local/portage masters: gentoo qt eclipse location: /var/lib/layman/eclipse masters: gentoo priority: 50 lisp location: /var/lib/layman/lisp masters: gentoo priority: 50 qt location: /var/lib/layman/qt masters: gentoo priority: 50 steam-overlay location: /usr/local/portage/steam-overlay sync-type: git sync-uri: https://github.com/anyc/steam-overlay.git masters: gentoo priority: 50 Installed sets: @steam ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /etc/teamspeak3-server/ts3server.ini /etc/teamspeak3-server/ts3server_mariadb.ini /etc/teamspeak3-server/tsdns_settings.ini /opt/brother/scanner/brscan4/brsanenetdevice4.cfg /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/php/apache2-php7.4/ext-active/ /etc/php/apache2-php8.0/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/php/cli-php8.0/ext-active/ /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="-march=native -O2 -pipe" 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_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nostrip 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="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="eo.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" 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/zsh" USE="X a52 aac accessibility acl acpi activities aimodules alsa amd64 ao apache2 aplaymidi auth-dns authdaemond bluetooth branding bullet bzip2 cairo cdb cdda cdr clamdtop cli colorio consolekit crypt cups curl cxx cycles d3d9 dbus declarative device-mapper display-manager doc dot dri drm dssi dts dvd dvdr ecdh editor egl elogind emboss encode examples exif experimental faac fbcon fbcon_frontend_sdl fbcon_frontend_vnc fbcon_frontend_x fbdev fdk ffmpeg flac fluidsynth fonts fortran ftp gcrypt gd gdbm gegl geolocation gif gles2 gnutls gpm graphite grub gtk gtk3 gui haptic iconv icu imagemagick imap imlib inspector intl ipv6 jack java jpeg jpeg2k kde kdrive kernel kipi kwallet ladspa latex launch lcms ldap libcaca libglvnd libglvndwayland-compositor libkms libmpv libnotify libsamplerate libtirpc luks1_default lvm2create_initrd mad mapimg math matroska mesa midi mikmod mmx mng mod modpack modplug mp3 mp4 mpeg mtp multilib multitarget mysql mysqli ncurses network networkmanager nls nptl nsplugin ogg ogm ois opencl openexr opengl openimageio openmp openssl opensubdiv opus pam pango pcre pdf pdfimport pdo php plasma player plymouth png policykit ppds pulseaudio python qml qt5 radio readline rendering sasl scanner screencast sdl seccomp semantic-desktop server sndfile sockets sound spamassassin spell split-usr sqlite srt sse sse2 ssh ssl staging startup-notification subversion svc svg tcl themes theora threads tiff timidity tk tools truetype udev udisks unicode upower urandom usb user-session utils v4l v4l2 vdpau vhosts vnc vorbis vulkan wallpapers wayland webgl widgets wxwidgets x264 xattr xcb xephyr xml xmlreader xmlwriter xnest xorg xv xvfb xvid xwayland zeroconf zlib" ABI_X86="64 32" 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" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python2_7 python3_6 python3_7 python3_8 python3_9 pypy3" QEMU_SOFTMMU_TARGETS="aarch64 alpha arm cris hppa i386 lm32 m68k microblaze microblazeel mips mips64 mips64el mipsel moxie nios2 or1k or32 ppc ppc64 ppcemb riscv32 riscv64 s390x sh4 sh4eb sparc sparc64 tricore unicore32 x86_64 xtensa xtensaeb" QEMU_USER_TARGETS="aarch64 aarch64_be alpha arm armeb cris hppa i386 m68k microblaze microblazeel mips mips64 mips64el mipsel mipsn32 mipsn32el nios2 or1k or32 ppc ppc64 ppc64abi32 ppc64le riscv32 riscv64 s390x sh4 sh4eb sparc sparc32plus sparc64 tilegx unicore32 x86_64 xtensa xtensaeb accessibility" RUBY_TARGETS="ruby26 ruby27 ruby30" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi radeon intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset 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, MAKEOPTS, 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 When I initially found this bug, Nvidia's OpenCL and ROCm were also installed and polluting the logs. However, even after uninstalling these, the issue still perists. I currently have sys-devel/llvm-roc installed because temporarily uninstalling it did not seem to change the result of the issue at all.
Created attachment 759863 [details] Some stack traces
It is sad to read that you have problems with the software. The situation seems to be a bit more complicate and requires some analysis. The forum was the right place, please try it there a bit longer until you can describe what is broken. Write the category and package name and version in the summary. We can not help you efficiently via bug tracker. The bug tracker aims rather on specific problems in .ebuilds and less on individual systems. I have had very good experience on the gentoo IRC [1] with questions like this. Of course there are also forums and mailing lists [2,3]. I hope you understand, that I will close the bug here therefore and wish you good luck on one of the mentioned channels [4]. Please reopen the ticket in order to provide an indication for an specific error in an ebuild or any gentoo related product. [1] https://www.gentoo.org/get-involved/irc-channels/ [2] https://forums.gentoo.org/ [3] https://www.gentoo.org/get-involved/mailing-lists/all-lists.html [4] https://www.gentoo.org/support/