NetBSD Problem Report #49089

From www@NetBSD.org  Thu Aug  7 19:05:08 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 067C9AB90D
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  7 Aug 2014 19:05:08 +0000 (UTC)
Message-Id: <20140807190506.D46D1ABD54@mollari.NetBSD.org>
Date: Thu,  7 Aug 2014 19:05:06 +0000 (UTC)
From: degroote@NetBSD.org
Reply-To: degroote@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: Incorrect locking in i915_capture_error_state
X-Send-Pr-Version: www-1.0

>Number:         49089
>Category:       kern
>Synopsis:       Incorrect locking in i915_capture_error_state
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          needs-pullups
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 07 19:10:00 +0000 2014
>Closed-Date:    
>Last-Modified:  Thu Jan 07 11:17:01 +0000 2021
>Originator:     Arnaud Degroote
>Release:        6.99.49
>Organization:
>Environment:
NetBSD hermes 6.99.49 NetBSD 6.99.49 (DRMKMS) #4: Tue Aug  5 22:10:37 CEST 2014  zul@hermes:/home/zul/netbsd-dev/build_temp/amd64/objdir/sys/arch/amd64/compile/DRMKMS amd64

>Description:
On my IronLake card, when launching firefox, I often hit the following kernel panic 

#0  0xffffffff80678f6f in cpu_reboot (howto=howto@entry=260, bootstr=bootstr@entry=0x0)
    at /home/zul/netbsd-dev/src/sys/arch/amd64/amd64/machdep.c:671
#1  0xffffffff808c4634 in vpanic (fmt=0xffffffff80d31620 "kernel %sassertion \"%s\" failed: file \"%s\", line %d ", 
    ap=ap@entry=0xfffffe8043463d60) at /home/zul/netbsd-dev/src/sys/kern/subr_prf.c:284
#2  0xffffffff80a5f7d3 in kern_assert (fmt=fmt@entry=0xffffffff80d31620 "kernel %sassertion \"%s\" failed: file \"%s\", line %d ")
    at /home/zul/netbsd-dev/src/sys/lib/libkern/kern_assert.c:51
#3  0xffffffff803b14ec in DRM_SPIN_WAITERS_P (interlock=0xffff80000360cca0, q=0xffff80000360c688)
    at /home/zul/netbsd-dev/src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h:89
#4  i915_record_ring_state (ering=0xfffffe8019fa7210, ring=0xffff80000360c560, dev=0xfffffe80435dd810)
    at /home/zul/netbsd-dev/src/sys/external/bsd/drm2/dist/drm/i915/i915_gpu_error.c:812
#5  i915_gem_record_rings (error=0xfffffe8019fa7010, dev=0xfffffe80435dd810)
    at /home/zul/netbsd-dev/src/sys/external/bsd/drm2/dist/drm/i915/i915_gpu_error.c:924
#6  i915_capture_error_state (dev=0xfffffe80435dd810, wedged=<optimized out>, error_msg=0xfffffe8043463e88 "Ring hung")
    at /home/zul/netbsd-dev/src/sys/external/bsd/drm2/dist/drm/i915/i915_gpu_error.c:1191
#7  0xffffffff803b633f in i915_handle_error (dev=0xfffffe80435dd810, wedged=<optimized out>, fmt=<optimized out>)
    at /home/zul/netbsd-dev/src/sys/external/bsd/drm2/dist/drm/i915/i915_irq.c:2364
#8  0xffffffff80617732 in callout_softclock (v=<optimized out>) at /home/zul/netbsd-dev/src/sys/kern/kern_timeout.c:736
#9  0xffffffff8060c208 in softint_execute (l=<optimized out>, s=2, si=0xffff8000224090c0)
    at /home/zul/netbsd-dev/src/sys/kern/kern_softint.c:589


>How-To-Repeat:

>Fix:
Adding some lock dance around DRM_SPIN_WAITERS_P in i915_record_ring_state should be sufficient, but I'm not familiar enough with the code to know if it is the good solution.

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->feedback
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Tue, 24 Mar 2020 05:58:02 +0000
State-Changed-Why:
this was fixed in external/bsd/drm2/dist/drm/i915/i915_gpu_error.c
rev 1.9.  that is missing on netbsd-8.

Arnaud, are you still using netbsd 8?  we can request a pullup, or
simply close this (fixed in netbsd-9.)

thanks!


State-Changed-From-To: feedback->needs-pullups
State-Changed-By: maya@NetBSD.org
State-Changed-When: Thu, 07 Jan 2021 11:17:01 +0000
State-Changed-Why:
Appropriate state for "fixed in -9, not fixed in -8"


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.