[GH-ISSUE #11651] ollama causes kernel panic #69759

Closed
opened 2026-05-04 19:07:00 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @binarynoise on GitHub (Aug 3, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11651

What is the issue?

Sometimes, ollama causes a kernel panic during generation.
After I switched to LTS kernel, ollama works without crashes.

Relevant log output

The last journalctl entry is from 5770.880373 so I can't provide more output, only what was in the systemd bluescreen

Panic Report
Arch: x86_64
Version: 6.15.7-zen1-1.1-zen

[ 5804.236961]  ? __kmalloc_noprof+0x25f/0x4e0
[ 5804.236965]  ? dcn32_validate_bandwidth+0xb3/0x320 [amdgpu 1c8ee10b17eefcbc699301d2ec79eb6f22974de5]
[ 5804.237339]  dcn32_validate_bandwidth+0x10b/0x320 [amdgpu 1c8ee10b17eefcbc699301d2ec79eb6f22974de5]
[ 5804.237705]  dc_validate_global_state+0x40f/0x5e0 [amdgpu 1c8ee10b17eefcbc699301d2ec79eb6f22974de5]
[ 5804.238026]  dc_validate_with_context+0x7e3/0x9c0 [amdgpu 1c8ee10b17eefcbc699301d2ec79eb6f22974de5]
[ 5804.238323]  dc_commit_streams+0x294/0x8a0 [amdgpu 1c8ee10b17eefcbc699301d2ec79eb6f22974de5]
[ 5804.238612]  amdgpu_dm_atomic_commit_tail+0x64d/0x3120 [amdgpu 1c8ee10b17eefcbc699301d2ec79eb6f22974de5]
[ 5804.238992]  ? dm_crtc_get_scanoutpos+0xad/0x130 [amdgpu 1c8ee10b17eefcbc699301d2ec79eb6f22974de5]
[ 5804.239358]  ? ktime_get+0x38/0xd0
[ 5804.239365]  ? amdgpu_crtc_get_scanout_position+0x9e/0x150 [amdgpu 1c8ee10b17eefcbc699301d2ec79eb6f22974de5]
[ 5804.239666]  ? __pfx_amdgpu_crtc_get_scanout_position+0x10/0x10 [amdgpu 1c8ee10b17eefcbc699301d2ec79eb6f22974de5]
[ 5804.239983]  ? drm_crtc_vblank_helper_get_vblank_timestamp_internal+0xe7/0x390
[ 5804.239989]  ? wait_for_completion_timeout+0x14e/0x1a0
[ 5804.239994]  commit_tail+0xcb/0x160
[ 5804.239996]  drm_atomic_helper_commit+0x13c/0x180
[ 5804.239998]  drm_atomic_commit+0xae/0xe0
[ 5804.240001]  ? __pfx___drm_printfn_info+0x10/0x10
[ 5804.240005]  drm_mode_obj_set_property_ioctl+0x175/0x440
[ 5804.240009]  ? __pfx_drm_mode_obj_set_property_ioctl+0x10/0x10
[ 5804.240010]  drm_ioctl_kernel+0xab/0x100
[ 5804.240013]  drm_ioctl+0x2a0/0x510
[ 5804.240015]  ? __pfx_drm_mode_obj_set_property_ioctl+0x10/0x10
[ 5804.240017]  amdgpu_drm_ioctl+0x4a/0x80 [amdgpu 1c8ee10b17eefcbc699301d2ec79eb6f22974de5]
[ 5804.240323]  __x64_sys_ioctl+0x94/0xc0
[ 5804.240326]  do_syscall_64+0x7b/0x810
[ 5804.240330]  ? __do_sys_rt_sigreturn+0xe7/0x100
[ 5804.240333]  ? syscall_exit_to_user_mode+0x10/0x210
[ 5804.240335]  ? do_syscall_64+0x87/0x810
[ 5804.240336]  ? rcu_sched_clock_irq+0x411/0xc80
[ 5804.240339]  ? update_cfs_group+0x2ab/0x360
[ 5804.240342]  ? task_tick_fair+0x2b9/0xf90
[ 5804.240344]  ? sched_balance_trigger+0x72/0x370
[ 5804.240345]  ? perf_event_task_tick+0x4f/0xb0
[ 5804.240348]  ? update_process_times+0xb6/0xe0
[ 5804.240350]  ? tick_nohz_handler+0xb1/0x1b0
[ 5804.240352]  ? timerqueue_add+0xae/0xd0
[ 5804.240354]  ? __hrtimer_run_queues+0x16c/0x2a0
[ 5804.240355]  ? note_gp_changes+0x57/0x90
[ 5804.240357]  ? rcu_core+0x1a1/0x3d0
[ 5804.240359]  ? sched_clock+0x10/0x30
[ 5804.240361]  ? sched_clock_cpu+0xb/0x30
[ 5804.240363]  ? irqtime_account_irq+0x3c/0xc0
[ 5804.240365]  ? handle_softirqs+0x193/0x2a0
[ 5804.240369]  ? irq_exit_rcu+0x55/0x100
[ 5804.240370]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 5804.240373] RIP: 0033:0x7f4004531f4d
[ 5804.240411] Code: 04 25 28 00 00 00 48 89 45 c8 31 c0 48 8d 45 10 c7 45 b0 10 00 00 00 48 89 45 b8 48 8d 45 d0 48 89 45 c0 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1a 48 8b 45 c8 64 48 2b 04 25 28 00 00 00
[ 5804.240412] RSP: 002b:00007fff487992f0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 5804.240415] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f4004531f4d
[ 5804.240416] RDX: 00007fff48799380 RSI: 00000000c01864ba RDI: 000000000000000f
[ 5804.240417] RBP: 00007fff48799340 R08: 0000000000000087 R09: 0000000000000000
[ 5804.240418] R10: 0000000000001000 R11: 0000000000000246 R12: 00007fff48799380
[ 5804.240418] R13: 00000000c01864ba R14: 000000000000000f R15: 0000000000000fff
[ 5804.240420]  </TASK>
[ 5804.240421] Modules linked in: vsock_loopback vmw_vsock_virtio_transport_common vmw_vsock_vmci_transport vsock vmw_vmci nfnetlink_queue nfnetlink_log vhost_net vhost vhost_iotlb tap rfcomm snd_seq_dummy snd_hrtimer snd_seq tun cdc_acm nft_redir nft_chain_nat nf_nat nft_ct nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 uhid cmac algif_hash algif_skcipher af_alg bnep nf_tables nct6683 vfat fat snd_sof_pci_intel_tgl snd_sof_pci_intel_cnl snd_sof_intel_hda_generic soundwire_intel snd_sof_intel_hda_sdw_bpt snd_sof_intel_hda_common snd_soc_hdac_hda snd_sof_intel_hda_mlink snd_sof_intel_hda soundwire_cadence snd_sof_pci snd_sof_xtensa_dsp snd_sof intel_rapl_msr snd_sof_utils intel_rapl_common snd_soc_acpi_intel_match snd_soc_acpi_intel_sdca_quirks soundwire_generic_allocation intel_uncore_frequency snd_soc_acpi intel_uncore_frequency_common intel_tcc_cooling soundwire_bus x86_pkg_temp_thermal snd_soc_sdca intel_powerclamp crc8 coretemp snd_soc_avs snd_soc_hda_codec snd_hda_ext_core iwlmvm snd_hda_codec_realtek kvm_intel
[ 5804.240456]  snd_soc_core snd_hda_codec_generic snd_hda_scodec_component kvm snd_compress snd_hda_codec_hdmi ac97_bus snd_pcm_dmaengine mac80211 irqbypass snd_hda_intel polyval_clmulni snd_usb_audio polyval_generic snd_intel_dspcfg ghash_clmulni_intel uvcvideo btusb snd_intel_sdw_acpi sha512_ssse3 libarc4 btrtl sha1_ssse3 snd_usbmidi_lib videobuf2_vmalloc snd_hda_codec btintel uvc snd_ump aesni_intel videobuf2_memops videobuf2_v4l2 btbcm iTCO_wdt snd_hda_core snd_rawmidi crypto_simd videobuf2_common btmtk iwlwifi cryptd snd_seq_device intel_pmc_bxt snd_hwdep iTCO_vendor_support spd5118 mei_pxp mei_hdcp videodev snd_pcm xpad bluetooth rapl mousedev joydev cfg80211 mc spi_nor igc intel_cstate ff_memless snd_timer i2c_i801 mtd intel_uncore i2c_smbus ptp snd intel_pmc_core i2c_mux pcspkr wmi_bmof mxm_wmi pps_core rfkill soundcore serial_multi_instantiate pmt_telemetry pinctrl_alderlake acpi_tad pmt_class acpi_pad mei_me mei mac_hid i2c_dev crypto_user dm_mod loop nfnetlink zram 842_decompress 842_compress lz4hc_compress
[ 5804.240502]  lz4_compress ip_tables x_tables xe nvme nvme_core sha256_ssse3 spi_intel_pci nvme_keyring spi_intel drm_gpuvm nvme_auth intel_vsec drm_gpusvm i915 intel_gtt amdgpu amdxcp i2c_algo_bit drm_ttm_helper ttm drm_exec gpu_sched drm_suballoc_helper video wmi drm_panel_backlight_quirks drm_buddy drm_display_helper cec
[ 5804.240535] ---[ end trace 0000000000000000 ]---
[ 5804.240539] RIP: 0010:__vmalloc_node_range_noprof+0x54b/0xb40
[ 5804.240543] Code: 00 00 83 7c 24 20 0c 0f 86 53 01 00 00 c7 44 24 20 0c 00 00 00 48 8b 5c 24 60 65 66 f7 05 ac b4 c0 02 ff ff 0f 84 df fb ff ff <0f> 0b 89 de 44 89 ef e8 19 9c 05 00 48 89 c1 e9 fc fd ff ff 65 48
[ 5804.240545] RSP: 0018:ffffd122c4c2f008 EFLAGS: 00010202
[ 5804.240546] RAX: 0000000000000001 RBX: 0000000000001000 RCX: fffff122bfffffff
[ 5804.240547] RDX: 0000000000f9dfcb RSI: 0000000000000001 RDI: 0000000000038b98
[ 5804.240548] RBP: ffffd122c4c2f170 R08: 0000000000000dc0 R09: 8000000000000163
[ 5804.240549] R10: 0000000000000000 R11: 0000054767394c1b R12: 0000000000038b98
[ 5804.240550] R13: ffff891911800000 R14: 0000000000000dc0 R15: 0000000000012dc0
[ 5804.240551] FS:  00007f4003c87a00(0000) GS:ffff8928a30eb000(0000) knlGS:0000000000000000
[ 5804.240552] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 5804.240553] CR2: 00005618301cd198 CR3: 0000000151b9a001 CR4: 0000000000f72ef0
[ 5804.240554] PKRU: 55555554
[ 5804.240555] Kernel panic - not syncing: Fatal exception in interrupt
[ 5804.240764] Kernel Offset: 0x18400000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)

OS

Linux

GPU

AMD

CPU

Intel

Ollama version

0.9.6

Originally created by @binarynoise on GitHub (Aug 3, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11651 ### What is the issue? Sometimes, ollama causes a kernel panic during generation. After I switched to LTS kernel, ollama works without crashes. ### Relevant log output The last journalctl entry is from 5770.880373 so I can't provide more output, only what was in the systemd bluescreen ``` Panic Report Arch: x86_64 Version: 6.15.7-zen1-1.1-zen [ 5804.236961] ? __kmalloc_noprof+0x25f/0x4e0 [ 5804.236965] ? dcn32_validate_bandwidth+0xb3/0x320 [amdgpu 1c8ee10b17eefcbc699301d2ec79eb6f22974de5] [ 5804.237339] dcn32_validate_bandwidth+0x10b/0x320 [amdgpu 1c8ee10b17eefcbc699301d2ec79eb6f22974de5] [ 5804.237705] dc_validate_global_state+0x40f/0x5e0 [amdgpu 1c8ee10b17eefcbc699301d2ec79eb6f22974de5] [ 5804.238026] dc_validate_with_context+0x7e3/0x9c0 [amdgpu 1c8ee10b17eefcbc699301d2ec79eb6f22974de5] [ 5804.238323] dc_commit_streams+0x294/0x8a0 [amdgpu 1c8ee10b17eefcbc699301d2ec79eb6f22974de5] [ 5804.238612] amdgpu_dm_atomic_commit_tail+0x64d/0x3120 [amdgpu 1c8ee10b17eefcbc699301d2ec79eb6f22974de5] [ 5804.238992] ? dm_crtc_get_scanoutpos+0xad/0x130 [amdgpu 1c8ee10b17eefcbc699301d2ec79eb6f22974de5] [ 5804.239358] ? ktime_get+0x38/0xd0 [ 5804.239365] ? amdgpu_crtc_get_scanout_position+0x9e/0x150 [amdgpu 1c8ee10b17eefcbc699301d2ec79eb6f22974de5] [ 5804.239666] ? __pfx_amdgpu_crtc_get_scanout_position+0x10/0x10 [amdgpu 1c8ee10b17eefcbc699301d2ec79eb6f22974de5] [ 5804.239983] ? drm_crtc_vblank_helper_get_vblank_timestamp_internal+0xe7/0x390 [ 5804.239989] ? wait_for_completion_timeout+0x14e/0x1a0 [ 5804.239994] commit_tail+0xcb/0x160 [ 5804.239996] drm_atomic_helper_commit+0x13c/0x180 [ 5804.239998] drm_atomic_commit+0xae/0xe0 [ 5804.240001] ? __pfx___drm_printfn_info+0x10/0x10 [ 5804.240005] drm_mode_obj_set_property_ioctl+0x175/0x440 [ 5804.240009] ? __pfx_drm_mode_obj_set_property_ioctl+0x10/0x10 [ 5804.240010] drm_ioctl_kernel+0xab/0x100 [ 5804.240013] drm_ioctl+0x2a0/0x510 [ 5804.240015] ? __pfx_drm_mode_obj_set_property_ioctl+0x10/0x10 [ 5804.240017] amdgpu_drm_ioctl+0x4a/0x80 [amdgpu 1c8ee10b17eefcbc699301d2ec79eb6f22974de5] [ 5804.240323] __x64_sys_ioctl+0x94/0xc0 [ 5804.240326] do_syscall_64+0x7b/0x810 [ 5804.240330] ? __do_sys_rt_sigreturn+0xe7/0x100 [ 5804.240333] ? syscall_exit_to_user_mode+0x10/0x210 [ 5804.240335] ? do_syscall_64+0x87/0x810 [ 5804.240336] ? rcu_sched_clock_irq+0x411/0xc80 [ 5804.240339] ? update_cfs_group+0x2ab/0x360 [ 5804.240342] ? task_tick_fair+0x2b9/0xf90 [ 5804.240344] ? sched_balance_trigger+0x72/0x370 [ 5804.240345] ? perf_event_task_tick+0x4f/0xb0 [ 5804.240348] ? update_process_times+0xb6/0xe0 [ 5804.240350] ? tick_nohz_handler+0xb1/0x1b0 [ 5804.240352] ? timerqueue_add+0xae/0xd0 [ 5804.240354] ? __hrtimer_run_queues+0x16c/0x2a0 [ 5804.240355] ? note_gp_changes+0x57/0x90 [ 5804.240357] ? rcu_core+0x1a1/0x3d0 [ 5804.240359] ? sched_clock+0x10/0x30 [ 5804.240361] ? sched_clock_cpu+0xb/0x30 [ 5804.240363] ? irqtime_account_irq+0x3c/0xc0 [ 5804.240365] ? handle_softirqs+0x193/0x2a0 [ 5804.240369] ? irq_exit_rcu+0x55/0x100 [ 5804.240370] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 5804.240373] RIP: 0033:0x7f4004531f4d [ 5804.240411] Code: 04 25 28 00 00 00 48 89 45 c8 31 c0 48 8d 45 10 c7 45 b0 10 00 00 00 48 89 45 b8 48 8d 45 d0 48 89 45 c0 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1a 48 8b 45 c8 64 48 2b 04 25 28 00 00 00 [ 5804.240412] RSP: 002b:00007fff487992f0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 5804.240415] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f4004531f4d [ 5804.240416] RDX: 00007fff48799380 RSI: 00000000c01864ba RDI: 000000000000000f [ 5804.240417] RBP: 00007fff48799340 R08: 0000000000000087 R09: 0000000000000000 [ 5804.240418] R10: 0000000000001000 R11: 0000000000000246 R12: 00007fff48799380 [ 5804.240418] R13: 00000000c01864ba R14: 000000000000000f R15: 0000000000000fff [ 5804.240420] </TASK> [ 5804.240421] Modules linked in: vsock_loopback vmw_vsock_virtio_transport_common vmw_vsock_vmci_transport vsock vmw_vmci nfnetlink_queue nfnetlink_log vhost_net vhost vhost_iotlb tap rfcomm snd_seq_dummy snd_hrtimer snd_seq tun cdc_acm nft_redir nft_chain_nat nf_nat nft_ct nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 uhid cmac algif_hash algif_skcipher af_alg bnep nf_tables nct6683 vfat fat snd_sof_pci_intel_tgl snd_sof_pci_intel_cnl snd_sof_intel_hda_generic soundwire_intel snd_sof_intel_hda_sdw_bpt snd_sof_intel_hda_common snd_soc_hdac_hda snd_sof_intel_hda_mlink snd_sof_intel_hda soundwire_cadence snd_sof_pci snd_sof_xtensa_dsp snd_sof intel_rapl_msr snd_sof_utils intel_rapl_common snd_soc_acpi_intel_match snd_soc_acpi_intel_sdca_quirks soundwire_generic_allocation intel_uncore_frequency snd_soc_acpi intel_uncore_frequency_common intel_tcc_cooling soundwire_bus x86_pkg_temp_thermal snd_soc_sdca intel_powerclamp crc8 coretemp snd_soc_avs snd_soc_hda_codec snd_hda_ext_core iwlmvm snd_hda_codec_realtek kvm_intel [ 5804.240456] snd_soc_core snd_hda_codec_generic snd_hda_scodec_component kvm snd_compress snd_hda_codec_hdmi ac97_bus snd_pcm_dmaengine mac80211 irqbypass snd_hda_intel polyval_clmulni snd_usb_audio polyval_generic snd_intel_dspcfg ghash_clmulni_intel uvcvideo btusb snd_intel_sdw_acpi sha512_ssse3 libarc4 btrtl sha1_ssse3 snd_usbmidi_lib videobuf2_vmalloc snd_hda_codec btintel uvc snd_ump aesni_intel videobuf2_memops videobuf2_v4l2 btbcm iTCO_wdt snd_hda_core snd_rawmidi crypto_simd videobuf2_common btmtk iwlwifi cryptd snd_seq_device intel_pmc_bxt snd_hwdep iTCO_vendor_support spd5118 mei_pxp mei_hdcp videodev snd_pcm xpad bluetooth rapl mousedev joydev cfg80211 mc spi_nor igc intel_cstate ff_memless snd_timer i2c_i801 mtd intel_uncore i2c_smbus ptp snd intel_pmc_core i2c_mux pcspkr wmi_bmof mxm_wmi pps_core rfkill soundcore serial_multi_instantiate pmt_telemetry pinctrl_alderlake acpi_tad pmt_class acpi_pad mei_me mei mac_hid i2c_dev crypto_user dm_mod loop nfnetlink zram 842_decompress 842_compress lz4hc_compress [ 5804.240502] lz4_compress ip_tables x_tables xe nvme nvme_core sha256_ssse3 spi_intel_pci nvme_keyring spi_intel drm_gpuvm nvme_auth intel_vsec drm_gpusvm i915 intel_gtt amdgpu amdxcp i2c_algo_bit drm_ttm_helper ttm drm_exec gpu_sched drm_suballoc_helper video wmi drm_panel_backlight_quirks drm_buddy drm_display_helper cec [ 5804.240535] ---[ end trace 0000000000000000 ]--- [ 5804.240539] RIP: 0010:__vmalloc_node_range_noprof+0x54b/0xb40 [ 5804.240543] Code: 00 00 83 7c 24 20 0c 0f 86 53 01 00 00 c7 44 24 20 0c 00 00 00 48 8b 5c 24 60 65 66 f7 05 ac b4 c0 02 ff ff 0f 84 df fb ff ff <0f> 0b 89 de 44 89 ef e8 19 9c 05 00 48 89 c1 e9 fc fd ff ff 65 48 [ 5804.240545] RSP: 0018:ffffd122c4c2f008 EFLAGS: 00010202 [ 5804.240546] RAX: 0000000000000001 RBX: 0000000000001000 RCX: fffff122bfffffff [ 5804.240547] RDX: 0000000000f9dfcb RSI: 0000000000000001 RDI: 0000000000038b98 [ 5804.240548] RBP: ffffd122c4c2f170 R08: 0000000000000dc0 R09: 8000000000000163 [ 5804.240549] R10: 0000000000000000 R11: 0000054767394c1b R12: 0000000000038b98 [ 5804.240550] R13: ffff891911800000 R14: 0000000000000dc0 R15: 0000000000012dc0 [ 5804.240551] FS: 00007f4003c87a00(0000) GS:ffff8928a30eb000(0000) knlGS:0000000000000000 [ 5804.240552] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 5804.240553] CR2: 00005618301cd198 CR3: 0000000151b9a001 CR4: 0000000000f72ef0 [ 5804.240554] PKRU: 55555554 [ 5804.240555] Kernel panic - not syncing: Fatal exception in interrupt [ 5804.240764] Kernel Offset: 0x18400000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) ``` ### OS Linux ### GPU AMD ### CPU Intel ### Ollama version 0.9.6
GiteaMirror added the bug label 2026-05-04 19:07:00 -05:00
Author
Owner

@Nyx1197 commented on GitHub (Aug 6, 2025):

If you use proxmox ve, try to pin kernel 6.8.12-11-pve.

proxmox-boot-tool kernel pin 6.8.12-11-pve

not sure it's amdgpu driver issues or ollama issues.

<!-- gh-comment-id:3157207104 --> @Nyx1197 commented on GitHub (Aug 6, 2025): If you use proxmox ve, try to pin kernel 6.8.12-11-pve. ```bash proxmox-boot-tool kernel pin 6.8.12-11-pve ``` not sure it's amdgpu driver issues or ollama issues.
Author
Owner

@binarynoise commented on GitHub (Aug 6, 2025):

If you use proxmox ve

I don't. As you can see I use zen kernel and not pve kernel. Also, proxmox don't build their stuff for Arch Linux IIRC.

It could be an amdgpu issue, but how would we pinpoint the issue?

<!-- gh-comment-id:3161803196 --> @binarynoise commented on GitHub (Aug 6, 2025): > If you use proxmox ve I don't. As you can see I use zen kernel and not pve kernel. Also, proxmox don't build their stuff for Arch Linux IIRC. It could be an amdgpu issue, but how would we pinpoint the issue?
Author
Owner

@jessegross commented on GitHub (Aug 6, 2025):

You'll have to file a bug with AMD - as a user space application, there should be nothing that Ollama can do to cause a kernel panic. At a minimum, the driver needs to protect itself better.

<!-- gh-comment-id:3161822689 --> @jessegross commented on GitHub (Aug 6, 2025): You'll have to file a bug with AMD - as a user space application, there should be nothing that Ollama can do to cause a kernel panic. At a minimum, the driver needs to protect itself better.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#69759