Bug 250503 - [panic] OpenGL operations with radeon hardware
Summary: [panic] OpenGL operations with radeon hardware
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.1-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
Depends on:
Reported: 2020-10-21 10:02 UTC by pr
Modified: 2021-11-19 15:00 UTC (History)
2 users (show)

See Also:

Trap (551.76 KB, image/jpeg)
2020-12-24 18:36 UTC, pr
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description pr 2020-10-21 10:02:37 UTC
I get a number of panics with any OpenGL operation on Radeon hardware. Stack trace includes radeon_crtc_handle_flip() or radeon_sa_bo_new(). I have photos of the panics if useful.

How to reproduce:
vblank_mode=0 glxgears
Or any other GL consumer.

I am unable to obtain a kernel dump on panic, despite having dumpon configured and kern.coredump=1, as the machine is completely hung (long press power button to switch off).

% uname -a
FreeBSD radeon 12.2-STABLE FreeBSD 12.2-STABLE GENERIC  amd64

svn #366230

Was OK in previous versions (12.1 STABLE), cannot dissect which one exactly. In July it was working.

% pkg info|fgrep drm
drm-fbsd12.0-kmod-4.16.g20200221 DRM modules for the linuxkpi-based KMS components
libdrm-2.4.102,1               Userspace interface to kernel Direct Rendering Module services

% pkg info | fgrep -i opengl
glew-2.2.0                     OpenGL Extension Wrangler Library
libGLU-9.0.1                   OpenGL utility library
libepoxy-1.5.4                 Library to handle OpenGL function pointer management
libgltf-0.0.2_21               C++ Library for rendering OpenGL models stored in glTF format
mesa-demos-8.4.0_2             OpenGL demos distributed with Mesa
mesa-dri-20.2.0_1              OpenGL hardware acceleration drivers for DRI2+
mesa-libs-20.2.0_1             OpenGL libraries that support GLX and EGL clients
qt5-opengl-5.15.0              Qt 5-compatible OpenGL support module

% pciconf -lv
vgapci0@pci0:1:5:0:     class=0x030000 card=0x1609103c chip=0x97121002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'RS880M [Mobility Radeon HD 4225/4250]'
    class      = display
    subclass   = VGA

NOTE: I can only have this with radeonkms.ko. amdgpu.ko is working.

Is this a known issue? Is there a fix for this?

Thank you.
Comment 1 Niclas Zeising freebsd_committer 2020-12-23 19:40:03 UTC
Can you try to rebuild drm-fbsd12.0-kmod locally from ports, with /usr/src matching the version of FreeBSD 12.2-STABLE that you are running.
Comment 2 Niclas Zeising freebsd_committer 2020-12-23 19:40:47 UTC
(In reply to Niclas Zeising from comment #1)
Also, amdgpu.ko is most likely not doing anything, since the hardware you are using is way too old to work with amdgpu.ko.
Comment 3 pr 2020-12-24 18:36:01 UTC
Created attachment 220899 [details]

thanks for looking into this bug.

(In reply to Niclas Zeising from comment #1)
It still booms with drm-fbsd12.0-kmod-4.16.g20201016.txz in sync with /usr/src 368341 from "stable" branch.

(In reply to Niclas Zeising from comment #2)
Maybe I did not express myself correctly: I get this bug on a variety of hardware. On those machines where radeonkms.ko attaches, I see the bug. On those where amdgpu.ko attaches there is no bug. I am trying to help you identify the bug.

I might try and get a coredump, if this is to any help to you. Please let me know.

Please note that I get this on BIOS machines (not on (U)EFI), but chances are this is the same as radeonkms vs amdgpu.

Comment 4 Emmanuel Vadot freebsd_committer 2021-11-19 15:00:16 UTC
It's unlikely to have drm-fbsd12-kmod fixed for this, please try FreeBSD >= 13