From nobody Tue Feb 22 01:47:46 2022 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D60DA19CB8E3 for ; Tue, 22 Feb 2022 01:47:59 +0000 (UTC) (envelope-from rob.fx907@gmail.com) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K2hrZ6CB5z3v7B for ; Tue, 22 Feb 2022 01:47:58 +0000 (UTC) (envelope-from rob.fx907@gmail.com) Received: by mail-ed1-x533.google.com with SMTP id c6so30315134edk.12 for ; Mon, 21 Feb 2022 17:47:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wbkA+9eTwi7CvQopl3wLVnmJdD5MjzUty24QUak3OyI=; b=hv4uAMooFRHC5fWaJvyT+yVBK/pRutl5N+bDO6Vzg99ff4744Ax/HW7LI6JR/4jkie gjsSE8IT0DuWzb4o85lldwfx4rEO5hr6VbRhD3m3L2ETYFU+4hqOuHTb6aAmDe9CeuIL kmHCYBKo2kgWqZ7VoABl+m9bh/B2FAlE+Us1j+GrDxIgtt0/8nhtZHOrD/B438P6u22b ECMSCmoAX6ibR9q1ux0ZlvUWHyErXO0ojMahFA6KpuSbYYHLidTT+DnrX1l+oUQuVM7l Y1Oc7aGE1sJPKCYe1kpIOClQfytL7Cea456g7hzt4a3p+p2827yR+6q0RCN99yg7sbnV 1NsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wbkA+9eTwi7CvQopl3wLVnmJdD5MjzUty24QUak3OyI=; b=3lXU4Vra/fbqRrQuDGXjp2B6nrM+9xRF3PReCVe7WoTPAmO+6mumoZ3t95YypaV1tE vxXhhPNfohOm34YQRFdpLi/PT+MMCX7tPuIcUc4epmDYOW+YzvxZRZCEzEzC3IL4QsAc RhWUKylosAi4TFi9yEhVRhuMtuuAS4136DLiJOYT8/QfZhADVdSIBcx277oXwJQe9ziU uroGAsF5zfeNeaAMJIvEtY40ynIj45JzrI+UEwrCrBzoS/GCr/CFM5fHljXMxT3FD9SE fKRsfbgE4Bl08kETFjJow4IRi7Z4lL65Oim8+sL7dr1eFhd6wu9wjvMoCZlqItj25vc3 NkSQ== X-Gm-Message-State: AOAM531SxEb0KLVc/uFWql/93hUGwdMgP7DGmVoObmWZl/Nvs3J2mzNB T9BCq3x5IKFdyTZ5ijKUjDSC6uLXWQWRZ7PTVRE= X-Google-Smtp-Source: ABdhPJz46/qLOisT0fN1lP8Mh7BkmzTZVbeH4bLGpl0Jv6M1rovOvMyMv6NBAnF6oyOUMwGYzv2IUYjuHyKkEJRVtPI= X-Received: by 2002:a05:6402:27d4:b0:412:b81a:b2dc with SMTP id c20-20020a05640227d400b00412b81ab2dcmr20277867ede.87.1645494472428; Mon, 21 Feb 2022 17:47:52 -0800 (PST) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <6fcc161dd23b4f7ebe7cc789f11c017e@MAIL-HUB.pai.local> <924c13764ce342cf968ef9a93699be9a@MAIL-HUB.pai.local> <719aa03f-6f34-fdf8-1258-c7e5fcf33043@selasky.org> In-Reply-To: <719aa03f-6f34-fdf8-1258-c7e5fcf33043@selasky.org> From: Rob Wing Date: Mon, 21 Feb 2022 16:47:46 -0900 Message-ID: Subject: Re: New panic in main-n253273-a52d8d4a6c6: To: Hans Petter Selasky Cc: Michael Jung , freebsd-current Content-Type: multipart/alternative; boundary="000000000000824e2605d891891f" X-Rspamd-Queue-Id: 4K2hrZ6CB5z3v7B X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=hv4uAMoo; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of robfx907@gmail.com designates 2a00:1450:4864:20::533 as permitted sender) smtp.mailfrom=robfx907@gmail.com X-Spamd-Result: default: False [-4.00 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::533:from]; MLMMJ_DEST(0.00)[freebsd-current]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --000000000000824e2605d891891f Content-Type: text/plain; charset="UTF-8" kinda thinking this might be related to commit f40dd6c8034b ("tty: switch ttyhook_register to use fget_cap_locked") fget_unlocked() must have grabbed an extra reference count on the file pointer that fget_cap_locked() doesn't get On Mon, Feb 21, 2022 at 4:35 PM Hans Petter Selasky wrote: > On 2/22/22 00:42, Michael Jung wrote: > > Hi: > > > > I was trying to remember what I did that was odd when this crash > occurred then it > > hit me. You can repeat this panic by doing: > > > > # watch -I -W pts/0 > > > > Here is another panic that happened write after issuing "watch" for > comparison. > > > > http://mail.mikej.com/core.txt.1 > > > > http://mail.mikej.com/info.1 > > > > http://mail.mikej.com/vmcore.1 > > > > I also need your kernel and debug kernel to fully debug this. > > 1) Do ssh to machine. > 2) watch -i -W pts/0 (does not panic over here) > > Can you explain what step 1 is? An scp ? > > Refcount is -1. > f_count = 0xffffffff > > f_data = 0xfffff800158b0400 > > In your KGDB, can you enter: > > info 0xffffffff81b052d0 > > Does the attached patch make any difference? > > --HPS --000000000000824e2605d891891f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
kinda thinking this might be related to commit f40dd6= c8034b ("tty: switch ttyhook_register to use fget_cap_locked")

fget_unlocked() must have grabbed an extra reference= count on the file pointer that fget_cap_locked() doesn't get

On M= on, Feb 21, 2022 at 4:35 PM Hans Petter Selasky <hps@selasky.org> wrote:
On 2/22/22 00:42, Michael Jung wrote:
> Hi:
>
> I was trying to remember what I did that was odd when this crash occur= red then it
> hit me.=C2=A0 You can repeat this panic by doing:
>
> # watch -I -W pts/0
>
> Here is another panic that happened write after issuing "watch&qu= ot; for comparison.
>
> http://mail.mikej.com/core.txt.1
>
> http://mail.mikej.com/info.1
>
> http://mail.mikej.com/vmcore.1
>

I also need your kernel and debug kernel to fully debug this.

1) Do ssh to machine.
2) watch -i -W pts/0 (does not panic over here)

Can you explain what step 1 is? An scp ?

Refcount is -1.
f_count =3D 0xffffffff

f_data =3D 0xfffff800158b0400

In your KGDB, can you enter:

info 0xffffffff81b052d0

Does the attached patch make any difference?

--HPS
--000000000000824e2605d891891f--