Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drm-v5.0-fbsd12.1 -- kernel crash on 12.1-RELEASE with SUMO #195

Open
Zirias opened this issue Dec 5, 2019 · 9 comments
Open

drm-v5.0-fbsd12.1 -- kernel crash on 12.1-RELEASE with SUMO #195

Zirias opened this issue Dec 5, 2019 · 9 comments

Comments

@Zirias
Copy link

Zirias commented Dec 5, 2019

I'm trying to use the branch drm-v5.0-fbsd12.1 here with the following graphics chip:

vgapci0@pci0:0:1:0:     class=0x030000 card=0x96401849 chip=0x964a1002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'Sumo [Radeon HD 6530D]'
    class      = display
    subclass   = VGA

This is part of an old AMD APU. Unfortunately, I can't use the stable branch built by graphics/drm-fbsd12.0-kmod because this doesn't find any displays and the screen goes black, see FreeBSD PR #237223.

The branch works fine for me if I disable acceleration in radeon(4) (Option "Accel" "off").

With acceleration enabled, I get crashes like the following:

Dec  5 09:08:03 nexus kernel: Fatal trap 12: page fault while in kernel mode
Dec  5 09:08:03 nexus kernel: cpuid = 0; apic id = 00
Dec  5 09:08:03 nexus kernel: fault virtual address     = 0x7ead5ea998
Dec  5 09:08:03 nexus kernel: fault code                = supervisor read data, page not present
Dec  5 09:08:03 nexus kernel: instruction pointer       = 0x20:0xffffffff82cbb80b
Dec  5 09:08:03 nexus kernel: stack pointer             = 0x28:0xfffffe00556b8160
Dec  5 09:08:03 nexus kernel: frame pointer             = 0x28:0xfffffe00556b8190
Dec  5 09:08:03 nexus kernel: code segment              = base 0x0, limit 0xfffff, type 0x1b
Dec  5 09:08:03 nexus kernel:                   = DPL 0, pres 1, long 1, def32 0, gran 1
Dec  5 09:08:03 nexus kernel: processor eflags  = interrupt enabled, resume, IOPL = 0
Dec  5 09:08:03 nexus kernel: current process           = 1192 (X:rcs0)
Dec  5 09:08:03 nexus kernel: trap number               = 12
Dec  5 09:08:03 nexus kernel: panic: page fault
Dec  5 09:08:03 nexus kernel: cpuid = 0
Dec  5 09:08:03 nexus kernel: time = 1575533175
Dec  5 09:08:03 nexus kernel: KDB: stack backtrace:
Dec  5 09:08:03 nexus kernel: #0 0xffffffff80c1e8e7 at kdb_backtrace+0x67
Dec  5 09:08:03 nexus kernel: #1 0xffffffff80bd1c1d at vpanic+0x19d
Dec  5 09:08:03 nexus kernel: #2 0xffffffff80bd1a73 at panic+0x43
Dec  5 09:08:03 nexus kernel: #3 0xffffffff810a9dcc at trap_fatal+0x39c
Dec  5 09:08:03 nexus kernel: #4 0xffffffff810a9e19 at trap_pfault+0x49
Dec  5 09:08:03 nexus kernel: #5 0xffffffff810a940f at trap+0x29f
Dec  5 09:08:03 nexus kernel: #6 0xffffffff8108305c at calltrap+0x8
Dec  5 09:08:03 nexus kernel: #7 0xffffffff82cd3441 at radeon_sa_bo_new+0x251
Dec  5 09:08:03 nexus kernel: #8 0xffffffff82cc2b3f at radeon_ib_get+0x2f
Dec  5 09:08:03 nexus kernel: #9 0xffffffff82cae3ec at radeon_cs_ioctl+0x23c
Dec  5 09:08:03 nexus kernel: #10 0xffffffff82daaf9f at drm_ioctl_kernel+0xff
Dec  5 09:08:03 nexus kernel: #11 0xffffffff82dab293 at drm_ioctl+0x2d3
Dec  5 09:08:03 nexus kernel: #12 0xffffffff82cb981d at radeon_drm_ioctl+0x4d
Dec  5 09:08:03 nexus kernel: #13 0xffffffff82df1d38 at linux_file_ioctl+0x298
Dec  5 09:08:03 nexus kernel: #14 0xffffffff80c3cbae at kern_ioctl+0x2be
Dec  5 09:08:03 nexus kernel: #15 0xffffffff80c3c87d at sys_ioctl+0x15d
Dec  5 09:08:03 nexus kernel: #16 0xffffffff810aa984 at amd64_syscall+0x364
Dec  5 09:08:03 nexus kernel: ---<<BOOT>>---
@zeising
Copy link
Member

zeising commented Dec 5, 2019

This branch is not supported, and not properly updated. Do you get the same panic on CURRENT with drm-devel-kmod?

@Zirias
Copy link
Author

Zirias commented Dec 5, 2019

Is there any branch that should work on 12.1 except for the default one? Moving to -CURRENT just for working gfx acceleration seems a bit excessive ...

@zeising
Copy link
Member

zeising commented Dec 5, 2019

drm-fbsd12.0-kmod is the correct one, although currently it requires building it from ports on FreeBSD 12.1.
Just use drm-kmod, it will pick the correct version for your version of FreeBSD.

@Zirias
Copy link
Author

Zirias commented Dec 5, 2019

See the second paragraph above: the official package/port is broken for me (and long was on 12.0 as well, but now on 12.1, the ages old drm-stable-kmod doesn't work any more either). That's the reason I modified the port to build a different branch in the first place.

Of course, fixing the issue in PR #237223 would help me as well, I just thought that's less likely, because it seems the problem was just fixed upstream (in Linux) in newer versions.

So, are you telling me it's planned to stick with v4.16 for 12.1?

@zeising
Copy link
Member

zeising commented Dec 5, 2019

drm-stable-kmod is long gone. It was a very old version.
Can you create a new issue for the isse you have with drm-fbsd12.0-kmod, that one is actually supported, but the PR was closed since there was no feedback.

@Zirias
Copy link
Author

Zirias commented Dec 5, 2019

Of course I can just copy it here. Nothing has changed since that, except that drm-stable-kmod indeed doesn't work on 12.1 any more. My assumption was that Linux 4.16 would show the same breakage, therefore having a 5.0 drm seemed to be more promising ;) anyways, feel free to close this issue then, if there are no plans to bring 5.0 to FreeBSD 12.1.

@zeising
Copy link
Member

zeising commented Dec 5, 2019

There are currently no plans to bring 5.0 to FreeBSD 12.1. There are regressions with the 5.0 version on CURRENT still, and we have to spend our resources there and elsewhere. Since 4.16 mostly works on 12.0 and 12.1, this feels to me the best way to spend our resources.

@BSDer
Copy link

BSDer commented Dec 31, 2019

Hello @Zirias ,
is this on BIOS or on EFI?
I can reproduce but only with BIOS boot, so this might actually be related to vt vga?

In any case from the backtrace this might be a duplicate of #130 , should this be the case, then the bug might be unrelated to the actual Linux (radeon) or FBSD version.

@zeising , I have some hardware and a few hours to run some tests over the next days, I can now reproduce on 12.1 STABLE, would you recommend I switch to CURRENT?

@Zirias
Copy link
Author

Zirias commented Dec 31, 2019

@BSDer yes, it boots in "legacy" mode, the machine is probably too old, didn't get it to boot successfully from EFI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants