From nobody Thu Apr 13 22:12:54 2023 X-Original-To: freebsd-hackers@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 4PyDNV2Y9Kz44lGr for ; Thu, 13 Apr 2023 22:12:58 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from smtp-42ab.mail.infomaniak.ch (smtp-42ab.mail.infomaniak.ch [84.16.66.171]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "relay.mail.infomaniak.ch", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PyDNT1sWWz3M0k for ; Thu, 13 Apr 2023 22:12:57 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 84.16.66.171 is neither permitted nor denied by domain of dumbbell@FreeBSD.org) smtp.mailfrom=dumbbell@FreeBSD.org; dmarc=none Received: from smtp-2-0001.mail.infomaniak.ch (unknown [10.5.36.108]) by smtp-2-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4PyDNQ6bp6zMsHFd for ; Fri, 14 Apr 2023 00:12:54 +0200 (CEST) Received: from unknown by smtp-2-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4PyDNQ4cFnzMpx5T for ; Fri, 14 Apr 2023 00:12:54 +0200 (CEST) Message-ID: Date: Fri, 14 Apr 2023 00:12:54 +0200 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: Handling panics inside vt(4) callbacks Content-Language: fr, en-US To: freebsd-hackers@freebsd.org References: <4ed85151-09e8-db3e-0e0b-d0a8f3bb937c@FreeBSD.org> From: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= Organization: The FreeBSD Project In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Infomaniak-Routing: alpha X-Spamd-Result: default: False [-1.11 / 15.00]; R_MIXED_CHARSET(1.00)[subject]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-0.93)[-0.930]; RCVD_IN_DNSWL_LOW(-0.10)[84.16.66.171:from]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_SHORT(0.02)[0.020]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; FREEFALL_USER(0.00)[dumbbell]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_ONE(0.00)[1]; TO_DOM_EQ_FROM_DOM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; R_SPF_SOFTFAIL(0.00)[~all:c]; TO_DN_NONE(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:29222, ipnet:84.16.64.0/19, country:CH]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[84.16.66.171:from] X-Rspamd-Queue-Id: 4PyDNT1sWWz3M0k X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N On 12/04/2023 23:33, Kyle Evans wrote: > FWIW, I have a related patch that I maintain in my tree that I simply > haven't found time to try and upstream. When the system panics, it > tries to switch back to ttyv0, but it calls into vd_postswitch() with > the vt lock still held. In my case, with i915kms, the vd_postswitch > implementation attempts to sleep with the lock still held and > everything goes off the rails. See below. Indeed, there are several locking issues in the DRM driver callbacks related to vt(4) because of the different contraints in Linux. I'm currently working on revisiting the way we integrate the DRM drivers in vt(4), hopefully this work will address the problem you hit. -- Jean-Sébastien Pédron The FreeBSD Project