NetBSD Problem Report #55665

From martin@duskware.de  Thu Sep 17 06:07:34 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 C252D1A9239
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 17 Sep 2020 06:07:34 +0000 (UTC)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: reliably trigerable KASSERT with gdb -p
X-Send-Pr-Version: 3.95

>Number:         55665
>Category:       kern
>Synopsis:       reliably trigerable KASSERT with gdb -p
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kre
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 17 06:10:00 +0000 2020
>Last-Modified:  Thu Sep 17 11:40:01 +0000 2020
>Originator:     Martin Husemann
>Release:        NetBSD 9.99.72
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD unpluged.duskware.de 9.99.72 NetBSD 9.99.72 (UNPLUGED) #340: Wed Sep 16 13:35:07 CEST 2020 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/evbarm/compile/UNPLUGED evbarm
Architecture: earmv5
Machine: evbarm
>Description:

I tried to debug makemandb and gdb "run" would not work for me, so I tried
to attach to the makemandb process with -p and immediately hit the (in-)famous
assertion:

[ 165.1514604] panic: kernel diagnostic assertion "pgrp->pg_jobc > 0" failed: f$
[ 165.1514604] cpu0: Begin traceback...
[ 165.1514604] 0xd4cafc94: netbsd:db_panic+0x14
[ 165.1514604] 0xd4cafcac: netbsd:vpanic+0x11c
[ 165.1514604] 0xd4cafcc4: netbsd:kern_assert+0x3c
[ 165.1514604] 0xd4cafd0c: netbsd:fixjobc+0x1ac
[ 165.1514604] 0xd4cafdac: netbsd:exit1+0x1c4  
[ 165.1514604] 0xd4cafdd4: netbsd:sigexit+0x1c0
[ 165.1514604] 0xd4cafe84: netbsd:postsig+0x22c
[ 165.1514604] 0xd4cafec4: netbsd:lwp_userret+0x1d4
[ 165.1514604] 0xd4cafeec: netbsd:userret+0x228
[ 165.1514604] 0xd4caffac: netbsd:syscall+0x1e4


Robert, I know you are diagnosing this issue - can we comment out the KASSERT
while you are tracking it down?

>How-To-Repeat:

This may depend on my shell setup, but for me it is as simple as:

  makemandb -Q &; gdb -p $( pgrep makemandb )

>Fix:
n/a

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->kre
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Thu, 17 Sep 2020 06:17:28 +0000
Responsible-Changed-Why:
Robert was looking at that assertion


From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/55665: reliably trigerable KASSERT with gdb -p
Date: Thu, 17 Sep 2020 13:29:40 +0700

     Date:        Thu, 17 Sep 2020 06:10:00 +0000 (UTC)
     From:        martin@NetBSD.org
     Message-ID:  <20200917061000.BF3F21A923C@mollari.NetBSD.org>

   | can we comment out the KASSERT while you are tracking it down?

 Sure, the KASSERT is of no value any more - it served its purpose already.

 kre


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/55665 CVS commit: src/sys/kern
Date: Thu, 17 Sep 2020 11:37:35 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Thu Sep 17 11:37:35 UTC 2020

 Modified Files:
 	src/sys/kern: kern_proc.c

 Log Message:
 PR kern/55665: temporarily comment out an assertion that is known to
 trigger in some conditions (where ignoring the wrap around does no harm
 for now)


 To generate a diff of this commit:
 cvs rdiff -u -r1.260 -r1.261 src/sys/kern/kern_proc.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.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.