NetBSD Problem Report #55071

From www@netbsd.org  Sat Mar 14 01:55:15 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 550B71A9213
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 14 Mar 2020 01:55:15 +0000 (UTC)
Message-Id: <20200314015514.5FECB1A924B@mollari.NetBSD.org>
Date: Sat, 14 Mar 2020 01:55:14 +0000 (UTC)
From: venture73@geeklan.co.uk
Reply-To: venture73@geeklan.co.uk
To: gnats-bugs@NetBSD.org
Subject: Panic shortly after running X11 due to kernel diagnostic assertion "mutex_owned(&pp->pp_lock)"
X-Send-Pr-Version: www-1.0

>Number:         55071
>Category:       kern
>Synopsis:       Panic shortly after running X11 due to kernel diagnostic assertion "mutex_owned(&pp->pp_lock)"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    ad
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 14 02:00:00 +0000 2020
>Closed-Date:    Fri Apr 24 14:57:12 +0000 2020
>Last-Modified:  Fri Apr 24 14:57:12 +0000 2020
>Originator:     Sevan Janiyan
>Release:        HEAD
>Organization:
>Environment:
GENERIC amd64 202003130750Z
>Description:
panic: kernel diagnostic assertion mutex_owned(&pp->pp_lock)" failed for file "/home/source/ab/HEAD/src/sys/arch/x86/x86/pmap.c" line 532

bt
https://pbs.twimg.com/media/ETB8p_4XkAAMCwF?format=jpg&name=orig

This was introduced sometime since 22nd of February.
>How-To-Repeat:
Boot amd64 build, startx wait a minute
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->ad
Responsible-Changed-By: ad@NetBSD.org
Responsible-Changed-When: Sat, 14 Mar 2020 13:29:31 +0000
Responsible-Changed-Why:
bug in a failure path, spotted it yesterday


From: "Andrew Doran" <ad@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/55071 CVS commit: src/sys/arch/x86
Date: Sat, 14 Mar 2020 18:24:10 +0000

 Module Name:	src
 Committed By:	ad
 Date:		Sat Mar 14 18:24:10 UTC 2020

 Modified Files:
 	src/sys/arch/x86/include: pmap.h pmap_pv.h
 	src/sys/arch/x86/x86: pmap.c

 Log Message:
 PR kern/55071 (Panic shortly after running X11 due to kernel diagnostic assertion "mutex_owned(&pp->pp_lock)")

 - Fix a locking bug in pmap_pp_clear_attrs() and in pmap_pp_remove() do the
   TLB shootdown while still holding the target pmap's lock.

 Also:

 - Finish PV list locking for x86 & update comments around same.

 - Keep track of the min/max index of PTEs inserted into each PTP, and use
   that to clip ranges of VAs passed to pmap_remove_ptes().

 - Based on the above, implement a pmap_remove_all() for x86 that clears out
   the pmap in a single pass.  Makes exit() / fork() much cheaper.


 To generate a diff of this commit:
 cvs rdiff -u -r1.112 -r1.113 src/sys/arch/x86/include/pmap.h
 cvs rdiff -u -r1.13 -r1.14 src/sys/arch/x86/include/pmap_pv.h
 cvs rdiff -u -r1.365 -r1.366 src/sys/arch/x86/x86/pmap.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: ad@NetBSD.org
State-Changed-When: Sat, 14 Mar 2020 22:33:51 +0000
State-Changed-Why:
I think this should be fixed now.


From: Andrew Doran <ad@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/55071 (Panic shortly after running X11 due to kernel
 diagnostic assertion "mutex_owned(&pp->pp_lock)")
Date: Mon, 16 Mar 2020 20:20:34 +0000

 It's an X11/DRM thing.  Will get a graphics card to test in future.  In the
 meantime it should be fixed now.

 Thanks,
 Andrew

 ----- Forwarded message from Andrew Doran <ad@netbsd.org> -----

 Date: Mon, 16 Mar 2020 19:56:39 +0000
 From: Andrew Doran <ad@netbsd.org>
 To: source-changes@NetBSD.org
 Subject: CVS commit: src/sys/uvm/pmap
 X-Mailer: log_accum

 Module Name:	src
 Committed By:	ad
 Date:		Mon Mar 16 19:56:39 UTC 2020

 Modified Files:
 	src/sys/uvm/pmap: pmap_pvt.c

 Log Message:
 pmap_pv_track(): use PMAP_PAGE_INIT() otherwise the x86 pmap pukes.


 To generate a diff of this commit:
 cvs rdiff -u -r1.8 -r1.9 src/sys/uvm/pmap/pmap_pvt.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.


 ----- End forwarded message -----

State-Changed-From-To: feedback->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Fri, 24 Apr 2020 14:57:12 +0000
State-Changed-Why:
Feedback didn't go to GNATS - it's fixed. Thanks!


>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.