NetBSD Problem Report #51938

From www@NetBSD.org  Thu Feb  2 22:37:58 2017
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 "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 76F067A168
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  2 Feb 2017 22:37:58 +0000 (UTC)
Message-Id: <20170202223757.499B17A2A1@mollari.NetBSD.org>
Date: Thu,  2 Feb 2017 22:37:57 +0000 (UTC)
From: dhgutteridge@sympatico.ca
Reply-To: gutteridge@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: Reproducible kernel panics caused by basic ffs file system operations (e.g. chown) on macppc
X-Send-Pr-Version: www-1.0

>Number:         51938
>Category:       port-macppc
>Synopsis:       Reproducible kernel panics caused by basic ffs file system operations (e.g. chown) on macppc
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-macppc-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 02 22:40:00 +0000 2017
>Closed-Date:    Sat Jun 08 01:22:55 +0000 2024
>Last-Modified:  Sat Jun 08 01:22:55 +0000 2024
>Originator:     David H. Gutteridge
>Release:        current
>Organization:
>Environment:
NetBSD arcusv.nonus-porta.net 7.99.59 NetBSD 7.99.59 (ARCUSV_DEBUG) #1: Mon Jan 30 18:36:13 EST 2017  disciple%arcus-v3.nonus-porta.net@localhost:/home/disciple/netbsd-current/src/sys/arch/macppc/compile/obj/ARCUSV_DEBUG macppc
>Description:
Basic file operations of any protracted intensity are regularly
triggering kernel panics with -current on macppc, e.g. while running
a recursive chown on a pkgsrc tree, I hit this:

panic: /usr: bad dir ino 212202 at offset 0: null entry

Stopped in pid 786.1 (chown) at netbsd:vpanic+0x140:    addi   r4, r0, 0x0
0x01a0dab0: at panic+0x4c
0x01a0daf0: at ufs_lookup+0x53c
0x01a0dba0: at VOP_LOOKUP+0x44
0x01a0dbd0: at lookup_once+0x1d8
0x01a0dc30: at namei_tryemulroot+0x4b4
0x01a0dd00: at namei+0x34
0x01a0dd40: at fd_nameiat.isra.2+0x7c
0x01a0dd70: at do_sys_statat+0x90
0x01a0dde0: at sys___stat50+0x24
0x01a0dea0: at syscall+0x300
0x01a0df20: user SC trap #439 by 0xfdf4c5a4: srr1=0xd032
            r1=0xffffe7b0 cr=0x44822488 xer=0x20000000 ctr=0xfdf4c59c

This was on a file system previously marked clean by fsck_ffs a short
time before.

(I'm not able to analyze a crash dump because of PR port-macppc/11854.)

>How-To-Repeat:
This particular example was triggered by recursively running chown on
a pkgsrc tree. I've also triggered it by extracting tar archives, by
running pkgclean in a pkgsrc tree, etc.
>Fix:
Unknown.

>Release-Note:

>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-macppc/51938: Reproducible kernel panics caused by basic
 ffs file system operations (e.g. chown) on macppc
Date: Sat, 4 Feb 2017 23:43:51 +0000

 On Thu, Feb 02, 2017 at 10:40:00PM +0000, dhgutteridge@sympatico.ca wrote:
  > panic: /usr: bad dir ino 212202 at offset 0: null entry
  > 
  > Stopped in pid 786.1 (chown) at netbsd:vpanic+0x140:    addi   r4, r0, 0x0
  > 0x01a0dab0: at panic+0x4c
  > 0x01a0daf0: at ufs_lookup+0x53c
  > 0x01a0dba0: at VOP_LOOKUP+0x44
  > 0x01a0dbd0: at lookup_once+0x1d8
  > 0x01a0dc30: at namei_tryemulroot+0x4b4
  > 0x01a0dd00: at namei+0x34
  > 0x01a0dd40: at fd_nameiat.isra.2+0x7c
  > 0x01a0dd70: at do_sys_statat+0x90
  > 0x01a0dde0: at sys___stat50+0x24
  > 0x01a0dea0: at syscall+0x300
  > 0x01a0df20: user SC trap #439 by 0xfdf4c5a4: srr1=0xd032
  >             r1=0xffffe7b0 cr=0x44822488 xer=0x20000000 ctr=0xfdf4c59c
  > 
  > This was on a file system previously marked clean by fsck_ffs a short
  > time before.

 Can you try to repeat it with ufs_lookup.c compiled with -O0?

 :-|

 -- 
 David A. Holland
 dholland@netbsd.org

From: "David H. Gutteridge" <dhgutteridge@sympatico.ca>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-macppc/51938: Reproducible kernel panics caused by basic
 ffs file system operations (e.g. chown) on macppc
Date: Mon, 06 Feb 2017 16:03:00 -0500

 On Sat, 2017-02-04 at 23:45 +0000, David Holland wrote:
 > Can you try to repeat it with ufs_lookup.c compiled with -O0?

 I re-tested with ufs_lookup.c compiled with -O0, and I still get
 panics, but they're more varied and slightly less frequent.

 The first time I retried the chown test, I ended up with this instead:

 trap: pid 293.1 (chown): user write DSI trap @ 0xd8344000 by 0xfdf5371c
 (DSISR 0x42000000, err=12)
 UVM: pid 293.1 (chown), uid 0 killed: out of swap

 The second time I retried the same chown test, it resulted in another
 panic:

 panic: kernel diagnostic assertion "newsize != VSIZENOTSET && newsize >=
 0" failed: file "/home/disciple/netbsd-current/src/sys/uvm/uvm_vnode.c", 
 line 351
 Stopped in pid 111.1 (chown) at netbsd:vpanic+0x140:    addi    r4,  r0,
 0x0
 0x100e0960: at kern_assert+0x68
 0x100e09a0: at uvm_vnp_setsize+0x6c
 0x100e09c0: at ffs_loadvnode+0xfc
 0x100e0a00: at vcache_get+0x3cc
 0x100e0a80: at ufs_getino+0xa0
 0x100e0ab0: at ufs_lookup+0xc8c
 0x100e0ba0: at VOP_LOOKUP+0x44
 0x100e0bd0: at lookup_once+0x1d8
 0x100e0c30: at namei_tryemulroot+0x4b4
 0x100e0d00: at namei+0x34
 0x100e0d40: at fd_nameiat.isra.2+0x7c
 0x100e0d70: at do_sys_statat+0x90
 0x100e0de0: at sys___stat50+0x24
 0x100e0ea0: at syscall+0x300
 0x100e0f20: user SC trap #439 by 0xfdf4c5a4: srr1=0xd032
             r1=0xffffe570 cr=0x44822488 xer=0x20000000 ctr=0xfdf4c59c

 Another invocation of pkgclean resulted in a kernel panic with a trace
 quite similar to the original one I reported, except in between
 ufs_lookup() and panic(), there's a call to ufs_dirbad().

 I should also mention, WAPBL logging is not enabled on the machine,
 and I haven't encountered any ICEs that would suggest bad RAM when
 compiling packages from pkgsrc. (The hard drive is original to the
 machine, though, and could be suspect, I suppose.)

 Dave

State-Changed-From-To: open->closed
State-Changed-By: gutteridge@NetBSD.org
State-Changed-When: Sat, 08 Jun 2024 01:22:55 +0000
State-Changed-Why:
Likely a hard drive issue. Not reproducible for me on other macppc hardware.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.