NetBSD Problem Report #55300

From martin@duskware.de  Mon May 25 12:29:27 2020
Return-Path: <martin@duskware.de>
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 248731A9227
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 25 May 2020 12:29:27 +0000 (UTC)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: ubciomove triggers page not dirty assertion
X-Send-Pr-Version: 3.95

>Number:         55300
>Category:       kern
>Synopsis:       ubciomove triggers page not dirty assertion
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    ad
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 25 12:30:00 +0000 2020
>Closed-Date:    Tue May 26 17:45:12 +0000 2020
>Last-Modified:  Tue May 26 17:45:12 +0000 2020
>Originator:     Martin Husemann
>Release:        NetBSD 9.99.64
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD thirdstage.duskware.de 9.99.64 NetBSD 9.99.64 (MODULAR) #343: Mon May 25 13:22:20 CEST 2020 martin@thirdstage.duskware.de:/usr/src/sys/arch/sparc64/compile/MODULAR sparc64
Architecture: sparc64
Machine: sparc64
>Description:

Running atf tests with /tmp mounted as a tmpfs the machine crashes after
a short while:

[ 1678.3843402] panic: kernel diagnostic assertion "uvm_pagegetdirty(pg) == UVM_PAGE_STATUS_DIRTY" failed: file "../../../../uvm/uvm_bio.c", line 673 page 0x100adfdd0 not dirty

Backtrace is:

vpanic(19d5a10, 1e1a9b768, 1cc0c00, 1cc2000, 104, 1cc1ec0) at netbsd:vpanic+0x1c0
kern_assert(19d5a10, 1953de8, 19d59e0, 19d5808, 2a1, 100adfdd0) at netbsd:kern_assert+0x34
ubc_release(2000, 1e1a9b898, 1e1a9b890, 2, 1042f8480, 100adfdd0) at netbsd:ubc_release+0x4f4
ubc_uiomove(109bdca00, 1e1a9bc00, 2800, 0, 6, 0) at netbsd:ubc_uiomove+0x118
tmpfs_write(0, 0, 0, 104e66f40, 108dd6d40, 1e1a9bc00) at tmpfs:tmpfs_write+0x1a8
VOP_WRITE(108dd6d40, 1e1a9bc00, 10, 1037599c0, 1c73000, 10f87cd00) at netbsd:VOP_WRITE+0x34
vn_write(0, 105344780, 1e1a9bc00, 1037599c0, 1, 10) at netbsd:vn_write+0xf0
dofilewrite(16, 105344780, 4749879c, 2800, 105344780, 1) at netbsd:dofilewrite+0x5c
sys_write(9, 1e1a9bde0, 1e1a9bdd0, 19ea400, 4, 4) at netbsd:sys_write+0x44
syscall(1e1a9bed0, 1e1a9bf58, 457644e0, 3, 2, 10f87cd00) at netbsd:syscall+0x40c


db{0}> show page 0x100adfdd0
PAGE 0x100adfdd0:
  flags=0x604<BUSY,TABLED,AOBJ>
  pqflags=0xc<INTENT_SET,INTENT_QUEUED>
  uobject=0x109bdca00, uanon=0x0, offset=0x2000
  loan_count=0 wire_count=0 bucket=1 freelist=0
  pa=0x3527c000
  [page ownership tracking disabled]



>How-To-Repeat:
s/a

>Fix:
n/a

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->ad
Responsible-Changed-By: ad@NetBSD.org
Responsible-Changed-When: Mon, 25 May 2020 18:01:56 +0000
Responsible-Changed-Why:
related to recent tmpfs changes


State-Changed-From-To: open->feedback
State-Changed-By: ad@NetBSD.org
State-Changed-When: Mon, 25 May 2020 20:14:50 +0000
State-Changed-Why:
This should be fixed now.


From: "Andrew Doran" <ad@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/55300 CVS commit: src/sys/uvm
Date: Mon, 25 May 2020 20:13:00 +0000

 Module Name:	src
 Committed By:	ad
 Date:		Mon May 25 20:13:00 UTC 2020

 Modified Files:
 	src/sys/uvm: uvm_aobj.c

 Log Message:
 PR kern/55300: ubciomove triggers page not dirty assertion

 If overwriting an existing page, mark it dirty since there may be no
 managed mapping to track the modification.


 To generate a diff of this commit:
 cvs rdiff -u -r1.144 -r1.145 src/sys/uvm/uvm_aobj.c

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

State-Changed-From-To: feedback->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Tue, 26 May 2020 17:45:12 +0000
State-Changed-Why:
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.