NetBSD Problem Report #55734

From martin@duskware.de  Mon Oct 19 11:12:52 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 965FB1A9217
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 19 Oct 2020 11:12:52 +0000 (UTC)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: ptyfs alignment crash
X-Send-Pr-Version: 3.95

>Number:         55734
>Category:       kern
>Synopsis:       ptyfs alignment crash
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 19 11:15:00 +0000 2020
>Last-Modified:  Mon Oct 19 11:35:01 +0000 2020
>Originator:     Martin Husemann
>Release:        NetBSD 9.99.74
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD somnambulist.duskware.de 9.99.74 NetBSD 9.99.74 (SOMNA) #2: Mon Oct 19 12:45:50 CEST 2020 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/sparc/compile/SOMNA sparc
Architecture: sparc
Machine: sparc
>Description:

This machine has /dev/pts mounted on ptyfs, which is build into the kernel
(no file system modules involved).

On first ssh into the machine sometimes (but not always) the machine
crashes:

[ 309.4373808] panic: alignment fault
[ 309.4559129] cpu0: Begin traceback...
[ 309.4707418] 0x0(0xf0216600, 0xf636d6f0, 0xf0291800, 0x104, 0xf0292400, 0xf0292620) at netbsd:panic+0x20
[ 309.5742230] panic(0xf0216600, 0xf0209b30, 0xf00b8180, 0xf00b8250, 0xf636d708, 0xf0288400) at netbsd:trap+0x108
[ 309.6842296] trap(0x1c, 0x410000c3, 0xf00b8180, 0xf636d820, 0x0, 0xc0d7) at netbsd:memfault_sun4m+0x2cc
[ 309.7742249] memfault_sun4m(0xf06281c0, 0xf06281c0, 0x0, 0xf027029c, 0xf0002000, 0x0) at netbsd:ptyfs_get_node+0x44
[ 309.8642403] ptyfs_get_node(0x3, 0x0, 0xf054ac40, 0x0, 0xf0289400, 0xc) at netbsd:ptyfs_loadvnode+0x1c
[ 309.9642483] ptyfs_loadvnode(0xf076a000, 0xf07d8e20, 0xf636da08, 0x0, 0xf636d998, 0x0) at netbsd:vcache_get+0x158
[ 310.0742439] vcache_get(0xf07d8e20, 0xf636da08, 0x8, 0xf636dad4, 0xc7f1f50b, 0xf07d8e20) at netbsd:ptyfs_allocvp+0x14
[ 310.1742498] ptyfs_allocvp(0xf076a000, 0xf636dad4, 0x0, 0x0, 0xf0002000, 0x0) at netbsd:ptyfs__allocvp+0x44
[ 310.2742638] ptyfs__allocvp(0x16, 0xf06281c0, 0xf636dad4, 0xf076a000, 0x0, 0x0) at netbsd:pty_grant_slave+0x34
[ 310.3642592] pty_grant_slave(0x2d, 0x0, 0x1400, 0xf076a000, 0xf0271000, 0xf06281c0) at netbsd:ptmioctl+0x54
[ 310.4442869] ptmioctl(0x0, 0xa501, 0x48087446, 0xf07d6000, 0x3, 0xf06281c0) at netbsd:cdev_ioctl+0x38
[ 310.5542805] cdev_ioctl(0x0, 0xa501, 0x48087446, 0xf07d6000, 0x3, 0xf06281c0) at netbsd:VOP_IOCTL+0x4c
[ 310.6442989] VOP_IOCTL(0xf0738aa8, 0x48087446, 0xf07d6000, 0x3, 0xf0555aa0, 0x0) at netbsd:vn_ioctl+0x180
[ 310.7642951] vn_ioctl(0xf060dfa0, 0x48087446, 0xf07d6000, 0x0, 0x3, 0xf0738aa8) at netbsd:sys_ioctl+0x17c
[ 310.8642970] sys_ioctl(0x19, 0xf636df30, 0xf060dfa0, 0xf07d6000, 0x808, 0x48087446) at netbsd:syscall+0x180
[ 310.9643060] syscall(0xc36, 0xf636dfb0, 0xed564cdc, 0x36, 0xf06281c0, 0x15940) at netbsd:memfault_sun4m+0x3f8



>How-To-Repeat:
Boot sparc machine, ssh into it.

>Fix:
n/a

>Audit-Trail:
From: Rin Okuyama <rokuyama.rk@gmail.com>
To: Martin Husemann <martin@NetBSD.org>
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/55734: ptyfs alignment crash
Date: Mon, 19 Oct 2020 20:31:19 +0900

 What happens if __attribute__((__optimize__("O0"))) is specified to
 ptyfs_get_node(), or whole ptyfs_subr.c is compiled with -O0?
 How about kernel compiled by GCC8?

 Just curious; I don't know sparc at all. Sorry for the noise.

 Thanks,
 rin

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.