From nobody Sat Dec 28 16:27:15 2024 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 4YL77F4vxJz5jbHQ for ; Sat, 28 Dec 2024 16:27:21 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YL77D5J6Yz4j0s; Sat, 28 Dec 2024 16:27:20 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=Kz0urAms; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::f29 as permitted sender) smtp.mailfrom=markjdb@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=freebsd.org (policy=none) Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-6d92cd1e811so77878266d6.1; Sat, 28 Dec 2024 08:27:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735403239; x=1736008039; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=wXm9FqENMIpIgbj5JJoYdP0oR+EHGRQO1LUbLnaDCT8=; b=Kz0urAmsgFNRzifC4Ml7Kd23eWO0XcfqgSAk/sgNPXdwR+S/lRAHx5m+hpb3fP0tCo sNQNxOh35JrnDZGet/aDjiyXIXJTdkxG+loAVyDSwq2jPBlp+8xEdSdWGpIfOSJ1RQ98 bKbKM5D/qCBqWasJ88hdFYWdOWvw7w0OKo6WgiKY6HUfluKaF6U7ko9j5n4NsIn1GA4z Z59jRn3yAUlpENbJ/dv+568HP2lSCbGBnG8Q4MTjl4mEMhLWnS4XccwwGr7nex3lE0TG kH5fB1eslRsFnu0RwlBcTNrLQTcnrh68CNiCrmbGWmhSV/wtPyAdyv5dsE9CsIeR3PM7 FYnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735403239; x=1736008039; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wXm9FqENMIpIgbj5JJoYdP0oR+EHGRQO1LUbLnaDCT8=; b=Cfun3r2dmjRJRhF0TIuxhX/SXpjsLA0JPpNDLue6JkFn5kV8wmtJSOrd6wgRfi+Gbr 9ju+vl7fy2N1o0cadutQx0zkJs4wrZBgnwo+IFmMrvj1puzPMemoMy8n16OO7e5fgq4X AX3lXV1trYQmUh4aiZfxWCe7wFxBJBKFBMIMJrRF8e0ocaRTN9kKJK+25L78ZnjEQnFG NjM3sqtH2J56cJqK31upKo5b1MS2lNgPBzZulr7z1m1y6hyUXjHXpGGu0N0PBoOT1n6p FH1HkDlVwifefuGtW4ZNOdh/ZtzWllyn3riwBHhLJf9WJlg4xiDexEp92ay2tp20MUl9 eeig== X-Forwarded-Encrypted: i=1; AJvYcCVIJetSE5tPUdSIzQAKazDM/WuwBDYOcSsTd2lxYrRIfJicppfEQqIKJx/ljkUU3S/5kf7F@freebsd.org, AJvYcCW9Kk75MMa95gqkWdaOpmDHc2NPkfNpxuHOR80mDr7KNVy8oXf5hpYKKmgcUUt0mkOuDR0=@freebsd.org X-Gm-Message-State: AOJu0YweynL+2Nnfkr/SJlZndqDP9CXsFFgm+OaX5YwwiI64T6LZbFVn M6x/dhjqTmZouWXus7dgXp4hmEJKROzgaULGRunaha0AZtaJdDGHXJVCgQ== X-Gm-Gg: ASbGncv7/CJSYLPWlSLHFDquM2iywgwrkjTFomjtVGfecz++CpyZw/pSekFHDfe659w rtfeLXufk007LNjLffeWC6xf514rLhvALcd2ivgHCjuhANsYkAI6WlK8z/XUsTmxStm9xC4mxVi W5V/iXk4oiRNh7qNodlAJEyvVrbX9v79F5x+1LXbVoc5VwXW/uVEh06VlRjLEFNy/+kI2PZy9w/ d0TTe1MBSBmcRsdGD5EFunfChQ6VF7vusji+pAUFehdZATZFeBonXD3OF2hPdM2R/Sfo1Y= X-Google-Smtp-Source: AGHT+IGi+lg6f49wxDsNV3kwN76pfq2UEwgK4Mat7pCLbtJTNdR27KYzcH4nZufF5mLsLns0XLZY8A== X-Received: by 2002:ad4:5d4b:0:b0:6d8:f155:2259 with SMTP id 6a1803df08f44-6dd15554e54mr542568956d6.6.1735403239571; Sat, 28 Dec 2024 08:27:19 -0800 (PST) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-46a3eb30b46sm90173691cf.87.2024.12.28.08.27.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Dec 2024 08:27:18 -0800 (PST) Date: Sat, 28 Dec 2024 11:27:15 -0500 From: Mark Johnston To: Yuri Pankov Cc: current@freebsd.org, imp@freebsd.org, jhb@freebsd.org Subject: Re: hdaa: uma_zalloc_debug: zone "malloc-{32,64}" with the following non-sleepable locks held Message-ID: References: <6901050e-c6bc-4347-a0d4-98e1de94b005@aetern.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: <6901050e-c6bc-4347-a0d4-98e1de94b005@aetern.org> X-Spamd-Result: default: False [-2.60 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MID_RHS_NOT_FQDN(0.50)[]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), DKIM not aligned (relaxed),none]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; DKIM_TRACE(0.00)[gmail.com:+]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f29:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; RCPT_COUNT_THREE(0.00)[4]; MLMMJ_DEST(0.00)[current@freebsd.org]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_VIA_SMTP_AUTH(0.00)[]; MISSING_XM_UA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-Rspamd-Queue-Id: 4YL77D5J6Yz4j0s X-Spamd-Bar: -- On Fri, Dec 27, 2024 at 08:30:37PM +0700, Yuri Pankov wrote: > Getting the following debug notifications: > > hdacc0: at cad 0 on hdac0 > hdaa0: at nid 1 on hdacc0 > uma_zalloc_debug: zone "malloc-32" with the following non-sleepable > locks held: > exclusive sleep mutex hdac0 (HDA driver mutex) r = 0 > (0xfffff80107cb7aa0) locked @ /usr/src/sys/dev/sound/pci/hda/hdaa.c:1571 > stack backtrace: > #0 0xffffffff80bcbbac at witness_debugger+0x6c > #1 0xffffffff80bccdc0 at witness_warn+0x430 > #2 0xffffffff80f00974 at uma_zalloc_debug+0x34 > #3 0xffffffff80f004c7 at uma_zalloc_arg+0x27 > #4 0xffffffff80b26a7d at malloc+0x7d > #5 0xffffffff80b2737d at realloc+0xed > #6 0xffffffff80b27432 at reallocf+0x12 > #7 0xffffffff80b9238d at devclass_add_device+0x1cd > #8 0xffffffff80b9093b at make_device+0x10b > #9 0xffffffff80b9077d at device_add_child_ordered+0x2d > #10 0xffffffff808b2b2c at hdaa_configure+0x485c > #11 0xffffffff808ac5b4 at hdaa_attach+0x544 > #12 0xffffffff80b92b9b at device_attach+0x45b > #13 0xffffffff80b93f0a at bus_attach_children+0x4a > #14 0xffffffff808c51c0 at hdacc_attach+0x2f0 > #15 0xffffffff80b92b9b at device_attach+0x45b > #16 0xffffffff80b93f0a at bus_attach_children+0x4a > #17 0xffffffff808c3e9d at hdac_attach2+0x35d I see this as well on a new system. I think this is fallout from commit f3d3c63442fff. At a glance, the hdaa lock in question can't trivially be made sleepable, as it's also used to lock a callout handler, hdaa_jack_poll_callback(), and the lock itself is shared with the parent hdac device. Until that's fixed somehow, I suspect we should restore the M_NOWAIT usage. > pcm0: at nid 3 on hdaa0 > pcm1: at nid 5 on hdaa0 > pcm2: at nid 7 on hdaa0 > pcm3: at nid 9 on hdaa0 > hdacc1: at cad 0 on hdac1 > hdaa1: at nid 1 on hdacc1 > uma_zalloc_debug: zone "malloc-64" with the following non-sleepable > locks held: > exclusive sleep mutex hdac1 (HDA driver mutex) r = 0 > (0xfffff80107cb7a40) locked @ /usr/src/sys/dev/sound/pci/hda/hdaa.c:1571 > stack backtrace: > #0 0xffffffff80bcbbac at witness_debugger+0x6c > #1 0xffffffff80bccdc0 at witness_warn+0x430 > #2 0xffffffff80f00974 at uma_zalloc_debug+0x34 > #3 0xffffffff80f004c7 at uma_zalloc_arg+0x27 > #4 0xffffffff80b26a7d at malloc+0x7d > #5 0xffffffff80b2737d at realloc+0xed > #6 0xffffffff80b27432 at reallocf+0x12 > #7 0xffffffff80b9238d at devclass_add_device+0x1cd > #8 0xffffffff80b9093b at make_device+0x10b > #9 0xffffffff80b9077d at device_add_child_ordered+0x2d > #10 0xffffffff808b2b2c at hdaa_configure+0x485c > #11 0xffffffff808ac5b4 at hdaa_attach+0x544 > #12 0xffffffff80b92b9b at device_attach+0x45b > #13 0xffffffff80b93f0a at bus_attach_children+0x4a > #14 0xffffffff808c51c0 at hdacc_attach+0x2f0 > #15 0xffffffff80b92b9b at device_attach+0x45b > #16 0xffffffff80b93f0a at bus_attach_children+0x4a > #17 0xffffffff808c3e9d at hdac_attach2+0x35d > pcm4: at nid 20,22,21 and 24,26 > on hdaa1 > pcm5: at nid 27 and 25 on hdaa1 > pcm6: at nid 17 and 31 on hdaa1 > pcm7: at nid 30 on hdaa1 > > Devices in question: > > hdac0@pci0:17:0:1: class=0x040300 rev=0x00 hdr=0x00 vendor=0x1002 > device=0x1640 subvendor=0x15d9 subdevice=0x1c97 > vendor = 'Advanced Micro Devices, Inc. [AMD/ATI]' > device = 'Rembrandt Radeon High Definition Audio Controller' > class = multimedia > subclass = HDA > hdac1@pci0:17:0:6: class=0x040300 rev=0x00 hdr=0x00 vendor=0x1022 > device=0x15e3 subvendor=0x15d9 subdevice=0x1c97 > vendor = 'Advanced Micro Devices, Inc. [AMD]' > device = 'Family 17h/19h HD Audio Controller' > class = multimedia > subclass = HDA >