NetBSD Problem Report #44900

From tsutsui@ceres.dti.ne.jp  Sat Apr 23 12:36:59 2011
Return-Path: <tsutsui@ceres.dti.ne.jp>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id F2E9663C34D
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 23 Apr 2011 12:36:58 +0000 (UTC)
Message-Id: <201104231142.p3NBgRuf024106@mirage.localdomain>
Date: Sat, 23 Apr 2011 20:42:27 +0900 (JST)
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@gnats.NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: R5000/Rm5200 mips ports
X-Send-Pr-Version: 3.95

>Number:         44900
>Category:       port-mips
>Synopsis:       R5000/Rm5200 mips ports are broken
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    matt
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 23 12:40:00 +0000 2011
>Closed-Date:    Fri Sep 30 08:12:51 +0000 2016
>Last-Modified:  Wed Nov 08 21:25:04 +0000 2017
>Originator:     Izumi Tsutsui
>Release:        NetBSD 5.99.48
>Organization:
>Environment:
System: NetBSD mirage 5.99.48
but also affected systems after the second mips64 merge
Architecture: mips
Machine: cobalt, sgimips
>Description:
On R5000 and Rm52xx machines (probably also VR41xx, i.e. all MIPS3 CPUs
except R4000/R4400 with virtual cache coherency exception hardware)
kernels don't work properly.

- misc RPC programs complain "clntudp_create: RPC: Program not registered"
- NFS file read ops get corrupted randomly (returns zeroed block etc)
- FFS file write ops sometimes get corrupted
 etc.

R4400 machines don't have the problem, so I guess this is caused by
VA cache aliases, which is handled by hardware on R4000/R4400.

>How-To-Repeat:
You can see the problems on multiuser with GENERIC kernels on
R5000 sgimips or Rm52xx cobalt machines.

This doesn't happen on gxemul, but I'm doubt the emulator emulates
VA cache index ops and its aliases.

>Fix:
Unknown. Check and handle more possible VA cache aliases in pmap.c etc?

---

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: port-mips-maintainer->matt
Responsible-Changed-By: tsutsui@NetBSD.org
Responsible-Changed-When: Sun, 05 Jan 2014 05:49:26 +0000
Responsible-Changed-Why:
broken since mips64 merge


From: "Nick Hudson" <skrll@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/44900 CVS commit: src/sys/arch/mips/mips
Date: Wed, 23 Apr 2014 20:57:16 +0000

 Module Name:	src
 Committed By:	skrll
 Date:		Wed Apr 23 20:57:15 UTC 2014

 Modified Files:
 	src/sys/arch/mips/mips: pmap.c vm_machdep.c

 Log Message:
 Fix a logic inversion introduced with the matt-nb5-mips64 for
 pmap_{zero,copy}_page cache alias handing. The check previously used
 PG_MD_UNCACHED_P, where it now uses PG_MD_CACHED_P, when considering if
 a cache invalidation is required.

 Additionally flush the cache for the uarea va to avoid potential (future)
 cache aliases in cpu_uarea_free when handing pages back to uvm for later
 use.

 ok matt@

 Hopefully this addresses the instability reported in the following PRs:

 PR/44900 - R5000/Rm5200 mips ports are broken
 PR/46170 - NetBSD/cobalt 6.0_BETA does not boot
 PR/46890 - upcoming NetBSD 6.0 release is very unstable / unusable on cobalt qube 2
 PR/48628 - cobalt and hpcmips ports are dead


 To generate a diff of this commit:
 cvs rdiff -u -r1.209 -r1.210 src/sys/arch/mips/mips/pmap.c
 cvs rdiff -u -r1.142 -r1.143 src/sys/arch/mips/mips/vm_machdep.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: skrll@NetBSD.org
State-Changed-When: Wed, 23 Apr 2014 21:01:48 +0000
State-Changed-Why:
Please try -current (or netbsd-6 with 

cvs rdiff -u -r1.209 -r1.210 src/sys/arch/mips/mips/pmap.c
cvs rdiff -u -r1.142 -r1.143 src/sys/arch/mips/mips/vm_machdep.c

applied)


State-Changed-From-To: feedback->open
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Mon, 05 May 2014 05:13:26 +0000
State-Changed-Why:
Still broken.


From: "Nick Hudson" <skrll@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/44900 CVS commit: src/sys/arch/mips
Date: Sun, 11 May 2014 07:53:28 +0000

 Module Name:	src
 Committed By:	skrll
 Date:		Sun May 11 07:53:28 UTC 2014

 Modified Files:
 	src/sys/arch/mips/include: pmap.h
 	src/sys/arch/mips/mips: pmap.c pmap_segtab.c

 Log Message:
 Deal with incompatible cache aliases. Specifically,

 - always flush an ephemeral page on unmap
 - track unmanaged mappings (mappings entered via pmap_kenter_pa) for
   aliases where required and handle appropriately (via pmap_enter_pv)

 Hopefully this (finally) addresses the instability reported in the
 following PRs:

 PR/44900 - R5000/Rm5200 mips ports are broken
 PR/46890 - upcoming NetBSD 6.0 release is very unstable / unusable on cobalt qube 2
 PR/48628 - cobalt and hpcmips ports are dead


 To generate a diff of this commit:
 cvs rdiff -u -r1.62 -r1.63 src/sys/arch/mips/include/pmap.h
 cvs rdiff -u -r1.213 -r1.214 src/sys/arch/mips/mips/pmap.c
 cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/mips/pmap_segtab.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: skrll@NetBSD.org
State-Changed-When: Sun, 11 May 2014 07:57:01 +0000
State-Changed-Why:
A potential fix has been committed


From: "Manuel Bouyer" <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/44900 CVS commit: [netbsd-6] src/sys/arch/mips/mips
Date: Wed, 21 May 2014 20:39:17 +0000

 Module Name:	src
 Committed By:	bouyer
 Date:		Wed May 21 20:39:17 UTC 2014

 Modified Files:
 	src/sys/arch/mips/mips [netbsd-6]: pmap.c vm_machdep.c

 Log Message:
 Pull up following revision(s) (requested by skrll in ticket #1056):
 	sys/arch/mips/mips/pmap.c: revision 1.211
 	sys/arch/mips/mips/pmap.c: revision 1.212
 	sys/arch/mips/mips/pmap.c: revision 1.213
 	sys/arch/mips/mips/vm_machdep.c: revision 1.143
 	sys/arch/mips/mips/pmap.c: revision 1.210
 Fix a logic inversion introduced with the matt-nb5-mips64 for
 pmap_{zero,copy}_page cache alias handing. The check previously used
 PG_MD_UNCACHED_P, where it now uses PG_MD_CACHED_P, when considering if
 a cache invalidation is required.
 Additionally flush the cache for the uarea va to avoid potential (future)
 cache aliases in cpu_uarea_free when handing pages back to uvm for later
 use.
 ok matt@
 Hopefully this addresses the instability reported in the following PRs:
 PR/44900 - R5000/Rm5200 mips ports are broken
 PR/46170 - NetBSD/cobalt 6.0_BETA does not boot
 PR/46890 - upcoming NetBSD 6.0 release is very unstable / unusable on cobalt qube 2
 PR/48628 - cobalt and hpcmips ports are dead
 Grab pv_list lock in pmap_unmap_ephemeral_page only when needed.
 Make PARANOIADIAG compile.
 Use pmap_tlb_asid_check to reduce code c&p.


 To generate a diff of this commit:
 cvs rdiff -u -r1.207.2.1 -r1.207.2.2 src/sys/arch/mips/mips/pmap.c
 cvs rdiff -u -r1.141 -r1.141.8.1 src/sys/arch/mips/mips/vm_machdep.c

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

From: "SAITOH Masanobu" <msaitoh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/44900 CVS commit: [netbsd-6] src/sys/arch/mips
Date: Wed, 11 Jun 2014 15:38:05 +0000

 Module Name:	src
 Committed By:	msaitoh
 Date:		Wed Jun 11 15:38:05 UTC 2014

 Modified Files:
 	src/sys/arch/mips/include [netbsd-6]: pmap.h
 	src/sys/arch/mips/mips [netbsd-6]: pmap.c pmap_segtab.c

 Log Message:
 Pull up following revision(s) (requested by skrll in ticket #1068):
 	sys/arch/mips/mips/pmap.c: revision 1.214
 	sys/arch/mips/include/pmap.h: revision 1.63
 	sys/arch/mips/mips/pmap_segtab.c: revision 1.8
 Deal with incompatible cache aliases. Specifically,
 - always flush an ephemeral page on unmap
 - track unmanaged mappings (mappings entered via pmap_kenter_pa) for
     aliases where required and handle appropriately (via pmap_enter_pv)
 Hopefully this (finally) addresses the instability reported in the
 following PRs:
 PR/44900 - R5000/Rm5200 mips ports are broken
 PR/46890 - upcoming NetBSD 6.0 release is very unstable/unusable on cobalt qube2
 PR/48628 - cobalt and hpcmips ports are dead


 To generate a diff of this commit:
 cvs rdiff -u -r1.61.8.1 -r1.61.8.2 src/sys/arch/mips/include/pmap.h
 cvs rdiff -u -r1.207.2.2 -r1.207.2.3 src/sys/arch/mips/mips/pmap.c
 cvs rdiff -u -r1.4.2.1 -r1.4.2.2 src/sys/arch/mips/mips/pmap_segtab.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: dholland@NetBSD.org
State-Changed-When: Fri, 30 Sep 2016 08:12:51 +0000
State-Changed-Why:
Feedback timeout.


From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-mips/44900 (R5000/Rm5200 mips ports are broken)
Date: Sun, 2 Oct 2016 05:05:37 +0000

 On Fri, Sep 30, 2016 at 08:12:51AM +0000, dholland@NetBSD.org wrote:
  > State-Changed-Why:
  > Feedback timeout.

 This was brought to my attention:
    https://twitter.com/tsutsuii/status/781893391118327809

  : no proposal
  : no design description
  : no review
  : no response
  : workaround committed
  : broken again
  : then feedback timeout

 Yes, well, perhaps if you'd said a single word sometime in the past
 two and a half years, something useful might have happened instead.

 quit kvetching.

 -- 
 David A. Holland
 dholland@netbsd.org

From: Nick Hudson <nick.hudson@gmx.co.uk>
To: tsutsui@NetBSD.org, tsutsui@ceres.dti.ne.jp
Cc: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: port-mips/44900 (R5000/Rm5200 mips ports are broken)
Date: Sun, 2 Oct 2016 09:09:17 +0100

 >   This was brought to my attention:
 >      https://twitter.com/tsutsuii/status/781893391118327809
 >   
 >    : no proposal
 >    : no design description
 >    : no review
 >    : no response
 >    : workaround committed

 I think you mean "fixed by Nick Hudson. thanks"..

 >    : broken again

 I think you mean "performance improvement after short period of influx 
 HEAD. thanks."

 >    : then feedback timeout

 You only have yourself to blame for lack of feedback.

 >   
 >   Yes, well, perhaps if you'd said a single word sometime in the past
 >   two and a half years, something useful might have happened instead.
 >   
 >   quit kvetching.
 Yeah, stop complaining. Perhaps you'd like to take your negative 
 attitude elsewhere?

 Nick

From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/44900 CVS commit: [netbsd-6-0] src/sys/arch/mips
Date: Wed, 8 Nov 2017 21:22:48 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Wed Nov  8 21:22:48 UTC 2017

 Modified Files:
 	src/sys/arch/mips/include [netbsd-6-0]: pmap.h
 	src/sys/arch/mips/mips [netbsd-6-0]: pmap.c pmap_segtab.c

 Log Message:
 Pull up following revision(s) (requested by skrll in ticket #1068):
 	sys/arch/mips/include/pmap.h: revision 1.63
 	sys/arch/mips/mips/pmap.c: revision 1.214
 	sys/arch/mips/mips/pmap_segtab.c: revision 1.8
 Deal with incompatible cache aliases. Specifically,
 - always flush an ephemeral page on unmap
 - track unmanaged mappings (mappings entered via pmap_kenter_pa) for
     aliases where required and handle appropriately (via pmap_enter_pv)
 Hopefully this (finally) addresses the instability reported in the
 following PRs:
 PR/44900 - R5000/Rm5200 mips ports are broken
 PR/46890 - upcoming NetBSD 6.0 release is very unstable / unusable on cobalt qube 2
 PR/48628 - cobalt and hpcmips ports are dead


 To generate a diff of this commit:
 cvs rdiff -u -r1.61.8.1 -r1.61.8.1.4.1 src/sys/arch/mips/include/pmap.h
 cvs rdiff -u -r1.207.2.1.4.1 -r1.207.2.1.4.2 src/sys/arch/mips/mips/pmap.c
 cvs rdiff -u -r1.4.2.1 -r1.4.2.1.4.1 src/sys/arch/mips/mips/pmap_segtab.c

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

From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/44900 CVS commit: [netbsd-6-1] src/sys/arch/mips
Date: Wed, 8 Nov 2017 21:22:58 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Wed Nov  8 21:22:58 UTC 2017

 Modified Files:
 	src/sys/arch/mips/include [netbsd-6-1]: pmap.h
 	src/sys/arch/mips/mips [netbsd-6-1]: pmap.c pmap_segtab.c

 Log Message:
 Pull up following revision(s) (requested by skrll in ticket #1068):
 	sys/arch/mips/include/pmap.h: revision 1.63
 	sys/arch/mips/mips/pmap.c: revision 1.214
 	sys/arch/mips/mips/pmap_segtab.c: revision 1.8
 Deal with incompatible cache aliases. Specifically,
 - always flush an ephemeral page on unmap
 - track unmanaged mappings (mappings entered via pmap_kenter_pa) for
     aliases where required and handle appropriately (via pmap_enter_pv)
 Hopefully this (finally) addresses the instability reported in the
 following PRs:
 PR/44900 - R5000/Rm5200 mips ports are broken
 PR/46890 - upcoming NetBSD 6.0 release is very unstable / unusable on cobalt qube 2
 PR/48628 - cobalt and hpcmips ports are dead


 To generate a diff of this commit:
 cvs rdiff -u -r1.61.8.1 -r1.61.8.1.6.1 src/sys/arch/mips/include/pmap.h
 cvs rdiff -u -r1.207.2.1.6.1 -r1.207.2.1.6.2 src/sys/arch/mips/mips/pmap.c
 cvs rdiff -u -r1.4.2.1 -r1.4.2.1.6.1 src/sys/arch/mips/mips/pmap_segtab.c

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

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.