From nobody Mon Dec 27 19:15:53 2021 X-Original-To: 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 97B151902396 for ; Mon, 27 Dec 2021 19:16:01 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4JN6p90YjWz4TJW; Mon, 27 Dec 2021 19:16:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 1BRJFr4Z096276 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 27 Dec 2021 21:15:56 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 1BRJFr4Z096276 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 1BRJFr6S096275; Mon, 27 Dec 2021 21:15:53 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 27 Dec 2021 21:15:53 +0200 From: Konstantin Belousov To: Gleb Smirnoff Cc: Alexander Motin , Larry Rosenman , current@freebsd.org Subject: Re: My -CURRENT crashes.... Message-ID: References: <286c830efc0e12e3e7a7e9b2ede31c28@lerctr.org> <45ee5689-b24c-51b5-d7b7-33fd73ee7dce@FreeBSD.org> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4JN6p90YjWz4TJW X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Mon, Dec 27, 2021 at 10:58:02AM -0800, Gleb Smirnoff wrote: > On Mon, Dec 27, 2021 at 01:43:01PM -0500, Alexander Motin wrote: > A> > This allows us to deduct that the callout belongs to proc subsystem and > A> > we can retrieve the proc it points to: c_lock - 0x128 = 0xfffff8030521e548 > A> > It is ccache in PRS_NORMAL state. And the "tmp" in our stack frame is its > A> > p_itcallout. > A> > > A> > So there is something that would zero out most of the p_itcallout while > A> > it is scheduled? > A> > A> So carefully zero it, but keep the lock pointer... The only way that > A> comes to mind is callout_init_mtx() in do_fork() if we assume the > A> process has completed and the struct proc was reused. I guess if we > A> could somehow leak scheduled callout in exit1(). May be we could add > A> some more assertions to try catch callout still being active there. > > Note that _callout_stop_safe(p_itcallout) is the only place in kernel where > CS_EXECUTING is used. I would start asking are there any third-party modules loaded.