Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 09 Oct 2016 10:35:01 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 213334] vtterm_cngrab is broken on kms-enabled systems
Message-ID:  <bug-213334-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213334

            Bug ID: 213334
           Summary: vtterm_cngrab is broken on kms-enabled systems
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: avg@FreeBSD.org

This stack trace tells it all:
(kgdb) bt
#0  doadump (textdump=3D1) at pcpu.h:222
#1  0xffffffff80a424a5 in kern_reboot (howto=3D<value optimized out>) at
/usr/src/sys/kern/kern_shutdown.c:366
#2  0xffffffff80a42a7b in vpanic (fmt=3D<value optimized out>, ap=3D<value
optimized out>) at /usr/src/sys/kern/kern_shutdown.c:759
#3  0xffffffff80a428b6 in kassert_panic (fmt=3D<value optimized out>) at
/usr/src/sys/kern/kern_shutdown.c:649
#4  0xffffffff80a1f4ae in malloc (size=3D1712, mtp=3D0xffffffff8309c6a0, fl=
ags=3D257)
at /usr/src/sys/kern/kern_malloc.c:475
#5  0xffffffff8306b71a in drm_crtc_helper_set_config (set=3D<value optimized
out>) at /usr/src/sys/modules/drm2/drm2/../../../dev/drm2/drm_crtc_helper.c=
:596
#6  0xffffffff83071fae in vt_kms_postswitch (arg=3D<value optimized out>) at
/usr/src/sys/modules/drm2/drm2/../../../dev/drm2/drm_fb_helper.c:344
#7  0xffffffff808d4b5b in vt_window_switch (vw=3D0xffffffff818e1400) at
/usr/src/sys/dev/vt/vt_core.c:540
#8  0xffffffff808d2620 in vtterm_cngrab (tm=3D<value optimized out>) at
/usr/src/sys/dev/vt/vt_core.c:1465
#9  0xffffffff809e8872 in cngrab () at /usr/src/sys/kern/kern_cons.c:368
#10 0xffffffff80a841e9 in kdb_trap (type=3D<value optimized out>, code=3D<v=
alue
optimized out>, tf=3D<value optimized out>) at /usr/src/sys/kern/subr_kdb.c=
:651
#11 0xffffffff81003732 in nmi_call_kdb (cpu=3D0, type=3D19, code=3D<value o=
ptimized
out>, frame=3D0xffffffff81d73d50, do_panic=3Dfalse) at
/usr/src/sys/x86/x86/cpu_machdep.c:547
#12 0xffffffff8100f32f in nmi_call_kdb_smp (type=3D0, code=3D0, frame=3D0x0,
do_panic=3D<value optimized out>) at /usr/src/sys/x86/x86/mp_x86.c:1228
#13 0xffffffff8100375c in nmi_handle_intr (type=3D0, code=3D0, frame=3D0x0,
panic=3D<value optimized out>) at /usr/src/sys/x86/x86/cpu_machdep.c:564
#14 0xffffffff80eb57f6 in trap (frame=3D0xffffffff81d73d50) at
/usr/src/sys/amd64/amd64/trap.c:547
#15 0xffffffff80e96603 in nmi_calltrap () at
/usr/src/sys/amd64/amd64/exception.S:510
#16 0xffffffff81003216 in acpi_cpu_c1 () at
/usr/src/sys/x86/x86/cpu_machdep.c:130
Previous frame inner to this frame (corrupt stack?)

cngrab() can be called from all kinds of contexts and it should be able to
handle that.
Unfortunately, if a KMS-enabled graphics driver is used, then
vt_kms_postswitch() calls drm code that can only work in an unrestricted
context.  It can not work in an interrupt (including NMI context).

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-213334-8>