radeon_cp_texture: page fault with non-sleepable locks held

Kostik Belousov kostikbel at gmail.com
Mon Nov 8 13:16:25 UTC 2010


On Mon, Nov 08, 2010 at 03:06:01PM +0200, Andriy Gapon wrote:
> on 08/11/2010 14:04 Kostik Belousov said the following:
> > On Mon, Nov 08, 2010 at 01:50:25PM +0200, Andriy Gapon wrote:
> >> on 05/11/2010 09:27 Andriy Gapon said the following:
> >>> Kernel page fault with the following non-sleepable locks held:
> >>> exclusive sleep mutex drmdev (drmdev) r = 0 (0xffffff0001b968a0) locked @
> >>> /usr/src/sys/dev/drm/drm_drv.c:791
> >>> KDB: stack backtrace:
> >>> db_trace_self_wrapper() at 0xffffffff801b8afa = db_trace_self_wrapper+0x2a
> >>> kdb_backtrace() at 0xffffffff803a7afa = kdb_backtrace+0x3a
> >>> _witness_debugger() at 0xffffffff803bd49c = _witness_debugger+0x2c
> >>> witness_warn() at 0xffffffff803bed32 = witness_warn+0x322
> >>> trap() at 0xffffffff8054639f = trap+0x39f
> 
> Kostik,
> 
> a tangential question - do you think that it would make sense to put a check
> like the above (in trap) into copyin/copyout (but non-fatal), so that we can
> catch such situations pro-actively (without having to wait for a page fault to
> actually happen)?
uiomove() already contains
	WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL,
	    "Calling uiomove()");
at the start.

For the copyin/out routines, that are implemented in assembler for
most (all ?) architectures, this seems to be overkill, IMHO.

> 
> >>> calltrap() at 0xffffffff80530688 = calltrap+0x8
> >>> --- trap 0xc, rip = 0xffffffff8054411d, rsp = 0xffffff81241917f0, rbp =
> >>> 0xffffff8124191870 ---
> >>> copyin() at 0xffffffff8054411d = copyin+0x3d
> >>> radeon_cp_texture() at 0xffffffff8022fcc7 = radeon_cp_texture+0x167
> >>> drm_ioctl() at 0xffffffff8020fa78 = drm_ioctl+0x318
> >>> devfs_ioctl_f() at 0xffffffff802dd739 = devfs_ioctl_f+0x109
> >>> kern_ioctl() at 0xffffffff803c1197 = kern_ioctl+0x1f7
> >>> ioctl() at 0xffffffff803c1358 = ioctl+0x168
> >>> syscallenter() at 0xffffffff803b584e = syscallenter+0x26e
> >>> syscall() at 0xffffffff80545f12 = syscall+0x42
> >>> Xfast_syscall() at 0xffffffff80530962 = Xfast_syscall+0xe2
> >>> --- syscall (54, FreeBSD ELF64, ioctl), rip = 0x801f96a1c, rsp = 0x7fffffffe7a8,
> >>> rbp = 0xc020644e ---
> 
> -- 
> Andriy Gapon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-x11/attachments/20101108/5f5e48af/attachment.pgp


More information about the freebsd-x11 mailing list