FreeBSDDesktop / kms-drm

the DRM part of the linuxkpi-based KMS
63 stars 26 forks source link

13-CURRENT r353390 on i915kms Whiskey Lake: panic: address 400401c000 beyond the last segment #178

Closed neelchauhan closed 4 years ago

neelchauhan commented 4 years ago

I am using the drm-devel kmod from Ports, with 13-CURRENT r353390 on i915kms on Intel Whiskey Lake.

My system is a HP Spectre x360 13-p0043dx (i7-8565U, 16GB RAM, 4K), and get this line:

panic: address 400401c000 beyond the last segment

Screenshot is below:

Kernel Panic

zeising commented 4 years ago

There has been some changes in the VM subsystem on current lately, which might be related. Have you recompiled the drm-kmod modules after updating the kernel?

neelchauhan commented 4 years ago

Yes.

neelchauhan commented 4 years ago

I still get the error even then.

zeising commented 4 years ago

Can you try the patch that's linked to in the below mailing list e-mail?

https://lists.freebsd.org/pipermail/freebsd-current/2019-October/074583.html

neelchauhan commented 4 years ago

It doesn't work for me.

image)

However, the error message is a bit more descriptive now.

zeising commented 4 years ago

I don't know if it's related, but is there any chance that you can ask in the mail thread as well? I assume that this used to work, or is this a new installation?

neelchauhan commented 4 years ago

This used to work. I will ask in the mail thread.

zeising commented 4 years ago

Hi! Is this relevant? As far as I know, relevant fixes to both FreeBSD CURRENT and to the various drm ports (drm-current-kmod and drm-devel-kmod) has been committed. Are you still seeing issues?

neelchauhan commented 4 years ago

No, not anymore.

avg-I commented 4 years ago

I suddenly started seeing a very similar problem after updating to the latest current. However, I am using amdgpu (from v5.0 branch).

Unread portion of the kernel message buffer:
WARNING !drm_modeset_is_locked(&crtc->mutex) failed at /usr/home/avg/devel/kms-drm/drivers/gpu/drm/drm_atomic_helper.c:610
WARNING !drm_modeset_is_locked(&crtc->mutex) failed at /usr/home/avg/devel/kms-drm/drivers/gpu/drm/drm_atomic_helper.c:610
WARNING !drm_modeset_is_locked(&crtc->mutex) failed at /usr/home/avg/devel/kms-drm/drivers/gpu/drm/drm_atomic_helper.c:610
WARNING !drm_modeset_is_locked(&dev->mode_config.connection_mutex) failed at /usr/home/avg/devel/kms-drm/drivers/gpu/drm/drm_atomic_helper.c:655
WARNING !drm_modeset_is_locked(&plane->mutex) failed at /usr/home/avg/devel/kms-drm/drivers/gpu/drm/drm_atomic_helper.c:860
WARNING !drm_modeset_is_locked(&plane->mutex) failed at /usr/home/avg/devel/kms-drm/drivers/gpu/drm/drm_atomic_helper.c:860
WARNING !drm_modeset_is_locked(&plane->mutex) failed at /usr/home/avg/devel/kms-drm/drivers/gpu/drm/drm_atomic_helper.c:860
WARNING !drm_modeset_is_locked(&plane->mutex) failed at /usr/home/avg/devel/kms-drm/drivers/gpu/drm/drm_atomic_helper.c:860
WARNING !drm_modeset_is_locked(&plane->mutex) failed at /usr/home/avg/devel/kms-drm/drivers/gpu/drm/drm_atomic_helper.c:860
WARNING !drm_modeset_is_locked(&plane->mutex) failed at /usr/home/avg/devel/kms-drm/drivers/gpu/drm/drm_atomic_helper.c:860
kernel trap 22 with interrupts disabled
                    kernel trap 22 with interrupts disabled
kernel trap 22 with interrupts disabled
 panic: address 41ec00000 beyond the last segment
cpuid = 1
time = 1588944828
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe009f91d7c0
vpanic() at vpanic+0x182/frame 0xfffffe009f91d810
panic() at panic+0x43/frame 0xfffffe009f91d870
pmap_enter() at pmap_enter+0xc02/frame 0xfffffe009f91d930
vm_fault() at vm_fault+0x18ee/frame 0xfffffe009f91da40
vm_fault_trap() at vm_fault_trap+0x6e/frame 0xfffffe009f91da80
trap_pfault() at trap_pfault+0x1ec/frame 0xfffffe009f91dae0
trap() at trap+0x44c/frame 0xfffffe009f91dbf0
calltrap() at calltrap+0x8/frame 0xfffffe009f91dbf0
--- trap 0xc, rip = 0x800cd4f5b, rsp = 0x7fffffffcbf8, rbp = 0x7fffffffcc40 ---

I have double-checked that all drm code is built for the latest kernel. The crash happens as soon as Xorg is started. Also, I have never seen those drm_modeset_is_locked warnings on this system before.

avg-I commented 4 years ago

Okay, those warning are not important, they are printed after the panic is called:

WARNING !drm_modeset_is_locked(&crtc->mutex) failed at /usr/home/avg/devel/kms-drm/drivers/gpu/drm/drm_atomic_helper.c:610
#0 0xffffffff825eb533 at linux_dump_stack+0x23
#1 0xffffffff8256b323 at drm_atomic_helper_check_modeset+0xb3
#2 0xffffffff8241b78e at amdgpu_dm_atomic_check+0x2e
#3 0xffffffff8256a47b at drm_atomic_check_only+0x41b
#4 0xffffffff8256a8b3 at drm_atomic_commit+0x13
#5 0xffffffff8259988c at restore_fbdev_mode_atomic+0x16c
#6 0xffffffff8259567a at drm_fb_helper_restore_fbdev_mode_unlocked+0x7a
#7 0xffffffff825bcc8a at vt_kms_postswitch+0x18a
#8 0xffffffff806b04b2 at vt_window_switch+0x122
#9 0xffffffff806ada0f at vtterm_cngrab+0x1f
#10 0xffffffff8079f776 at cngrab+0x16
#11 0xffffffff8080335c at vpanic+0xec
#12 0xffffffff808031a3 at panic+0x43
#13 0xffffffff80bbc552 at pmap_enter+0xc02
#14 0xffffffff80b288be at vm_fault+0x18ee
#15 0xffffffff80b26e7e at vm_fault_trap+0x6e
#16 0xffffffff80bcf89c at trap_pfault+0x1ec
#17 0xffffffff80bceeec at trap+0x44c
avg-I commented 4 years ago

@neelchauhan , by chance, did you you use a custom kernel back then? Maybe played with NUMA option?

neelchauhan commented 4 years ago

Then, I did use a custom kernel, mainly to add patches that weren't in HEAD.

Now, it's mostly stock 13-CURRENT.

I don't know about amdgpu, since I don't use one.