Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 919470 - =sys-kernel/gentoo-kernel-bin-6.6.4 kernel NULL pointer dereference after amdgpu: Failed to map bo to gpuvm
Summary: =sys-kernel/gentoo-kernel-bin-6.6.4 kernel NULL pointer dereference after amd...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Distribution Kernel Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-08 14:51 UTC by Olivier Huber
Modified: 2024-02-09 16:00 UTC (History)
3 users (show)

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


Attachments
dmesg content (dmesg-extract.txt,11.00 KB, text/plain)
2023-12-08 14:51 UTC, Olivier Huber
Details
dmesg with DRM debug 0x19F (dmesg-short.log.xz,913.74 KB, application/x-xz)
2023-12-13 15:10 UTC, Olivier Huber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Huber 2023-12-08 14:51:59 UTC
Created attachment 878397 [details]
dmesg content

Context: I launched libreoffice and got this kernel NULL pointer dereference. This was brought to my attention by a "soft lock up" message. Sadly, I didn't save it. 

Let me know if I need to report this elsewhere. Quick googling wasn't success in finding this bug already reported. The attached file has more dmesg content

[181771.785131] amdgpu 0000:04:00.0: amdgpu: bo 0000000061596dee va 0x0800000000-0x0800000001 conflict with 0x0800000000-0x0800000200
[181771.785137] amdgpu: Failed to map VA 0x800000000000 in vm. ret -22
[181771.785139] amdgpu: Failed to map bo to gpuvm
[181771.787881] BUG: kernel NULL pointer dereference, address: 0000000000000002
[181771.787884] #PF: supervisor write access in kernel mode
[181771.787886] #PF: error_code(0x0002) - not-present page
[181771.787888] PGD 0 P4D 0 
[181771.787891] Oops: 0002 [#1] PREEMPT SMP NOPTI
[181771.787893] CPU: 8 PID: 28930 Comm: soffice.bin Not tainted 6.6.4-gentoo-dist #1
[181771.787896] Hardware name: LENOVO 21EBCTO1WW/21EBCTO1WW, BIOS R20ET35W (1.15 ) 01/21/2023
[181771.787897] RIP: 0010:__mutex_lock.constprop.0+0x2b4/0x740
[181771.787903] Code: 48 89 44 24 20 49 8d 44 24 10 4c 8d 6c 24 10 48 89 c3 48 89 04 24 49 8b 44 24 18 48 89 5c 24 10 4d 89 6c 24 18 48 89 44 24 18 <4c> 89 28 4d 39 6c 24 10 0f 84 bf 03 00 00 65 48 8b 14 25 00 36 03
[181771.787905] RSP: 0018:ffffc9001103bb90 EFLAGS: 00010246
[181771.787907] RAX: 0000000000000002 RBX: ffff88832fe95850 RCX: ffff8881d79bd200
[181771.787909] RDX: ffff88832fe95838 RSI: 0000000000000002 RDI: ffff88832fe95848
[181771.787910] RBP: ffffc9001103bbf8 R08: 0000000000000040 R09: 0000000000000000
[181771.787912] R10: 00000000000390a0 R11: ffff888116a0a5a0 R12: ffff88832fe95840
[181771.787913] R13: ffffc9001103bba0 R14: ffff88832fe95848 R15: 0000000000000000
[181771.787915] FS:  00007f3669318dc0(0000) GS:ffff8889ee000000(0000) knlGS:0000000000000000
[181771.787916] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[181771.787918] CR2: 0000000000000002 CR3: 0000000858142000 CR4: 0000000000f50ee0
[181771.787919] PKRU: 55555554
[181771.787921] Call Trace:
[181771.787923]  <TASK>
[181771.787926]  ? __die+0x23/0x70
[181771.787931]  ? page_fault_oops+0x171/0x4e0
[181771.787937]  ? exc_page_fault+0x7f/0x180
[181771.787940]  ? asm_exc_page_fault+0x26/0x30
[181771.787945]  ? __mutex_lock.constprop.0+0x2b4/0x740
[181771.787952]  amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu+0x6a2/0xaa0 [amdgpu]
[181771.788029]  kfd_init_apertures+0x862/0x1990 [amdgpu]
[181771.788091]  kfd_process_device_init_vm+0x267/0x320 [amdgpu]
[181771.788149]  kfd_debugfs_hang_hws+0xd09/0x5630 [amdgpu]
[181771.788206]  kfd_debugfs_hang_hws+0x2d7c/0x5630 [amdgpu]
[181771.788261]  ? kfd_debugfs_hang_hws+0xc80/0x5630 [amdgpu]
[181771.788315]  ? srso_alias_return_thunk+0x5/0x7f
[181771.788321]  __x64_sys_ioctl+0x97/0xd0
[181771.788326]  do_syscall_64+0x60/0xc0
[181771.788329]  ? srso_alias_return_thunk+0x5/0x7f
[181771.788331]  ? syscall_exit_to_user_mode+0x2b/0x40
[181771.788333]  ? srso_alias_return_thunk+0x5/0x7f
[181771.788335]  ? do_syscall_64+0x6c/0xc0
[181771.788337]  ? srso_alias_return_thunk+0x5/0x7f
[181771.788339]  ? syscall_exit_to_user_mode+0x2b/0x40
[181771.788341]  ? srso_alias_return_thunk+0x5/0x7f
[181771.788343]  ? do_syscall_64+0x6c/0xc0
[181771.788344]  ? srso_alias_return_thunk+0x5/0x7f
[181771.788347]  ? srso_alias_return_thunk+0x5/0x7f
[181771.788349]  ? syscall_exit_to_user_mode+0x2b/0x40
[181771.788351]  ? srso_alias_return_thunk+0x5/0x7f
[181771.788353]  ? do_syscall_64+0x6c/0xc0
[181771.788354]  ? do_syscall_64+0x6c/0xc0
[181771.788356]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[181771.788359] RIP: 0033:0x7f366ed3327b
[181771.788361] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00
[181771.788363] RSP: 002b:00007fff8505b730 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[181771.788365] RAX: ffffffffffffffda RBX: 00007fff8505b820 RCX: 00007f366ed3327b
[181771.788366] RDX: 00007fff8505b8a0 RSI: 0000000040084b15 RDI: 0000000000000019
[181771.788368] RBP: 00007fff8505b8a0 R08: 000000000000000d R09: 0000000000000001
[181771.788369] R10: 0000000000000001 R11: 0000000000000246 R12: 0000000040084b15
[181771.788370] R13: 0000000000000019 R14: 00007f362a1ff440 R15: 0000000000000002
[181771.788374]  </TASK>
[181771.788375] Modules linked in: snd_seq_dummy snd_hrtimer snd_seq rfcomm fuse 8021q garp mrp stp llc bnep snd_usb_audio snd_usbmidi_lib snd_ump snd_rawmidi snd_seq_device cdc_mbim cdc_wdm uas cdc_ncm cdc_ether usbnet mii usb_storage uvcvideo uvc videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 btusb videobuf2_common btrtl btintel videodev btbcm btmtk bluetooth mc intel_rapl_msr intel_rapl_common edac_mce_amd mt7921e mt7921_common mt792x_lib kvm_amd snd_ctl_led mt76_connac_lib snd_hda_codec_realtek mt76 amdgpu snd_sof_amd_vangogh snd_sof_amd_rembrandt snd_hda_codec_generic snd_sof_amd_renoir snd_sof_amd_acp snd_sof_pci snd_sof_xtensa_dsp mac80211 kvm snd_hda_codec_hdmi snd_sof snd_sof_utils snd_hda_intel irqbypass libarc4 snd_intel_dspcfg amdxcp crct10dif_pclmul snd_intel_sdw_acpi snd_soc_core crc32_pclmul gpu_sched crc32c_intel snd_hda_codec snd_compress i2c_algo_bit polyval_clmulni ac97_bus polyval_generic drm_suballoc_helper snd_pcm_dmaengine drm_ttm_helper ghash_clmulni_intel snd_hda_core snd_pci_ps sha512_ssse3
[181771.788438]  snd_rpl_pci_acp6x ttm sha256_ssse3 snd_hwdep snd_pci_acp6x drm_exec sha1_ssse3 pkcs8_key_parser snd_pcm thinkpad_acpi think_lmi snd_pci_acp5x wmi_bmof firmware_attributes_class cfg80211 rapl joydev drm_display_helper ledtrig_audio snd_timer snd_rn_pci_acp3x platform_profile snd_acp_config cec sp5100_tco snd_soc_acpi serio_raw pcspkr snd_pci_acp3x snd drm_buddy ccp k10temp rfkill soundcore r8169 i2c_piix4 ucsi_acpi video typec_ucsi i2c_scmi typec wmi binfmt_misc dm_crypt nvme nvme_core nvme_common
[181771.788475] CR2: 0000000000000002
[181771.788477] ---[ end trace 0000000000000000 ]---


$ emerge --info sys-kernel/gentoo-kernel-bin
Portage 3.0.56 (python 3.11.7-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-13, glibc-2.38-r7, 6.6.4-gentoo-dist x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.6.4-gentoo-dist-x86_64-AMD_Ryzen_7_5825U_with_Radeon_Graphics-with-glibc2.38
KiB Mem:    39859584 total,  20453156 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Fri, 08 Dec 2023 14:00:01 +0000
Head commit of repository gentoo: f6e02581eebb99461639d08b644af09430517e5c
Timestamp of repository guru: Thu, 07 Dec 2023 13:16:53 +0000
Head commit of repository guru: 6f8d1c6c9fac544df55846436ff7c84750189d22

Timestamp of repository steam-overlay: Tue, 05 Dec 2023 23:16:51 +0000
Head commit of repository steam-overlay: 166c4445427fe621fdd15ade0e6a25c90f688f7b

sh bash 5.2_p21-r1
ld GNU ld (Gentoo 2.41 p2) 2.41.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p21-r1::gentoo
dev-java/java-config:      2.3.3-r1::gentoo
dev-lang/perl:             5.38.2::gentoo
dev-lang/python:           3.11.7::gentoo, 3.12.0_p1::gentoo
dev-lang/rust-bin:         1.73.0::gentoo
dev-util/cmake:            3.28.0::gentoo
dev-util/meson:            1.3.0-r2::gentoo
sys-apps/baselayout:       2.14-r1::gentoo
sys-apps/openrc:           0.52.1::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.41-r2::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           17.0.6::gentoo
sys-devel/gcc:             13.2.1_p20231014::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             17.0.6::gentoo
sys-devel/llvm:            16.0.6::gentoo, 17.0.6::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.6::gentoo (virtual/os-headers)
sys-libs/glibc:            2.38-r7::gentoo
Repositories:

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

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo
    volatile: False

xhub-repo
    location: /var/db/repos/xhub-repo
    masters: gentoo
    volatile: True

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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 -march=native -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE 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 XDG_STATE_HOME"
FCFLAGS="-O2 -march=native -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 pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync warn-on-large-env xattr"
FFLAGS="-O2 -march=native -pipe"
GENTOO_MIRRORS="https://gentoo.osuosl.org/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j8"
PKGDIR="/var/cache/binpkgs"
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="/dev/shm"
SHELL="/bin/bash"
USE="X a52 aac acl acpi activities adns alsa amd64 audit avif bcrypt berkdb blake2 bluetooth bluray boost branding brightness-control brotli bzip2 cacert cairo caps cdda cdr chm cli colord cplugins crypt cscope cups curl dbus declarative dia djvu dri dts dvd dvdr ed25519 egl eglfs elf elogind encode eps epub eselect-ldso evdev exif ffmpeg fftw fits flac fontconfig fontforge fortran gcrypt gdbm gif gles gles2 gmp gold gpm graphviz gsl gtk gui heif highlight http2 iconv icu idn imagemagick ipv6 jack jpeg jpeg2k json kde kms kwallet ladspa lapack lapacke latex lcms libbsd libnotify libsamplerate libtirpc lm-sensors lua lv2 lz4 lzma mad markdown metis mms mng mobi mp3 mp4 mpeg mtp multilib ncurses networkmanager nls nptl octave ogg openexr opengl openmp pam pango pcre pdf perl pipewire plasma plugins pm-utils png policykit postscript ppds pthread pulseaudio python qml qt5 quiche raw readline rtmp sasl screencast sctp sdl seccomp semantic-desktop sound sparse speex spell split-usr sqlite ssh ssl startup-notification svg svt-av1 szip terminal test-rust theora threads thunderbolt tiff tools touchpad truetype udev udisks unicode upower usb utils v4l vaapi vdpau vim-syntax vorbis vulkan wayland webp widgets x264 xar xattr xcb xft xml xpm xv xvid xxhash yaml z3 zimg zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" 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 aes avx avx2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3" 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="de en fr" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="BPF X86 WebAssembly" LUA_SINGLE_TARGET="luajit" LUA_TARGETS="lua5-1 luajit" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11 python3_12" RUBY_TARGETS="ruby31" VIDEO_CARDS="amdgpu radeonsi radeon" 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, LD, 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

=================================================================
                        Package Settings
=================================================================

sys-kernel/gentoo-kernel-bin-6.6.1::gentoo was built with the following:
USE="initramfs -secureboot -test" ABI_X86="(64)"
FEATURES="news buildpkg-live ebuild-locks protect-owned unmerge-orphans parallel-fetch fixlafiles binpkg-dostrip sfperms qa-unresolved-soname-deps warn-on-large-env config-protect-if-modified unknown-features-warn preserve-libs distlocks binpkg-multi-instance userpriv binpkg-docompress binpkg-logs unmerge-logs usersync ipc-sandbox multilib-strict strict-keepdir merge-sync sandbox strict pkgdir-index-trusted xattr userfetch pid-sandbox assume-digests network-sandbox usersandbox"


sys-kernel/gentoo-kernel-bin-6.6.3::gentoo was built with the following:
USE="initramfs -secureboot -test" ABI_X86="(64)"
FEATURES="buildpkg-live parallel-fetch sandbox fixlafiles pkgdir-index-trusted distlocks protect-owned binpkg-multi-instance strict-keepdir ipc-sandbox unknown-features-warn merge-sync ebuild-locks unmerge-logs preserve-libs warn-on-large-env pid-sandbox qa-unresolved-soname-deps multilib-strict userfetch usersandbox usersync sfperms userpriv news network-sandbox unmerge-orphans assume-digests binpkg-dostrip binpkg-logs xattr strict binpkg-docompress config-protect-if-modified"


sys-kernel/gentoo-kernel-bin-6.6.4::gentoo was built with the following:
USE="initramfs -secureboot -test" ABI_X86="(64)"
FEATURES="news sandbox config-protect-if-modified parallel-fetch sfperms protect-owned fixlafiles usersandbox buildpkg-live qa-unresolved-soname-deps binpkg-logs usersync unknown-features-warn strict warn-on-large-env unmerge-logs distlocks xattr binpkg-docompress assume-digests binpkg-dostrip userfetch pkgdir-index-trusted userpriv binpkg-multi-instance ebuild-locks preserve-libs unmerge-orphans network-sandbox ipc-sandbox strict-keepdir merge-sync pid-sandbox multilib-strict"
Comment 1 Mike Pagano gentoo-dev 2023-12-09 14:37:42 UTC
Similar reports indicate that bad memory might be a cause.  Can you run memtest?
Comment 2 Olivier Huber 2023-12-13 15:07:02 UTC
Memtest86+ ran overnight. No errors in almost 10h of testing. Yesterday I opened libreoffice and the same bug was triggered.

I am now on 6.6.6. Today, I did a trace with drm debug at a high debug level, using the instructions at https://gitlab.freedesktop.org/wlroots/wlroots/-/wikis/DRM-Debugging
Comment 3 Olivier Huber 2023-12-13 15:10:04 UTC
Created attachment 879006 [details]
dmesg with DRM debug 0x19F
Comment 4 Olivier Huber 2024-02-09 16:00:11 UTC
For the past month, using the latest kernels I can no longer trigger this bug. It has most likely been fixed upstream.