From nobody Sat Mar 26 07:09:27 2022 X-Original-To: freebsd-xen@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 BFDFD1A3F17F for ; Sat, 26 Mar 2022 07:10:05 +0000 (UTC) (envelope-from zedupsys@gmail.com) Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) (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 4KQVTS6jRBz3Qsg for ; Sat, 26 Mar 2022 07:10:04 +0000 (UTC) (envelope-from zedupsys@gmail.com) Received: by mail-lj1-x229.google.com with SMTP id u3so12912973ljd.0 for ; Sat, 26 Mar 2022 00:10:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=reply-to:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=BucVQxUrcFaka/tF+rxEZ6gy0b/vrT57y+VJfPqZBMM=; b=D0qmtamqlUwL8BunEOgUkO5n1QEM6f4K/VVUpIlqvwvNAK1hnSaXduo5yeZKcc03xg NY0xn27fdB7uIb3RCe7OjVDcHMrGRqz+QatYXcTZlka3hTh5RCkRQHCBrd57eizFuiZ4 WPMIWQSEd2HQ83d96S8h7UIKq5pxzlDPYcma29ZGOrAKHlI/+zvTsG89EWjvq69sa00V QPfX9rS1Zi9Qn7NwdAeAHzpA3vlgl7Gp4KCgMFjDNkDJ9ysMzG9phvObi/JdqrWIAmAB LZECFCHgBCC32S+o6JI4Eb2MR7pugJZtZa3/WabpYNwiDpTmV7UrzJkGnE4Y1yWvRkfo yARA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:reply-to:subject:to:cc:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=BucVQxUrcFaka/tF+rxEZ6gy0b/vrT57y+VJfPqZBMM=; b=gwbPuOT+VIyFCDbEUMzNABXBhiIoa+gpcxIgIivyOzd7C9CwJZEghjAsJAtju+GLu2 qjyCQnmsnTni6iK+2h1GjV0WBGEO7xJkOf4LNoUeI5trdz0ebrxy9D1fVIWOPTt4WK17 iFh8o7snp/qvvf6TfqNR095CSZsKHJA2Ejx5J7XtnjTk+ATbgaLw1djf1iSG1/PENLEe cAFr+vOwtJtdOahRl8SYmBCDylYXxSV6qJxv6HPmMAEzY8CHmVl+CH0geKTSQbnzFkuQ VBaqZ7t9Wj1Zn3GoQlZ6Z8SgBKdL0eM3sHsYAGCTF4+HkD8dkeRxbizCcpCBm8Rki9yV 0kjA== X-Gm-Message-State: AOAM531X0RFSywyvFI21taYTzmbDAoDlbvTF2yO8Ticvq5S0KEIb5n4Y uRGuzmm8BV69aNq46oasX2Qke2IhMFQ= X-Google-Smtp-Source: ABdhPJzz35cEzOlk7g2ToVkzfxPLAOpKDlqhREDo2x3lD/wa+V+cYM2p9VUi7/+ehCYwSbBE+WAoAQ== X-Received: by 2002:a2e:7d05:0:b0:247:ed41:690d with SMTP id y5-20020a2e7d05000000b00247ed41690dmr11119731ljc.92.1648278603516; Sat, 26 Mar 2022 00:10:03 -0700 (PDT) Received: from [10.3.0.1] ([213.110.65.3]) by smtp.googlemail.com with ESMTPSA id bi9-20020a0565120e8900b0044a84716777sm89754lfb.87.2022.03.26.00.10.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Mar 2022 00:10:02 -0700 (PDT) Reply-To: zedupsys@gmail.com Subject: Re: ZFS + FreeBSD XEN dom0 panic To: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Cc: freebsd-xen@freebsd.org, buhrow@nfbcal.org References: <088c8222-063a-1db5-da83-a5a0168d66c6@gmail.com> From: Ze Dupsys Message-ID: <639f7ce0-8a07-884c-c1cf-8257b9f3d9e8@gmail.com> Date: Sat, 26 Mar 2022 09:09:27 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-xen List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-xen@freebsd.org X-BeenThere: freebsd-xen@freebsd.org MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: lv Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4KQVTS6jRBz3Qsg X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=D0qmtamq; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of zedupsys@gmail.com designates 2a00:1450:4864:20::229 as permitted sender) smtp.mailfrom=zedupsys@gmail.com X-Spamd-Result: default: False [0.10 / 15.00]; HAS_REPLYTO(0.00)[zedupsys@gmail.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(1.00)[1.000]; NEURAL_HAM_LONG(-0.85)[-0.851]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_REPLYTO(0.00)[gmail.com]; PREVIOUSLY_DELIVERED(0.00)[freebsd-xen@freebsd.org]; NEURAL_SPAM_MEDIUM(0.95)[0.949]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::229:from]; MLMMJ_DEST(0.00)[freebsd-xen]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 2022.03.25. 10:17, Roger Pau Monné wrote: > On Thu, Mar 24, 2022 at 06:38:41PM +0200, Ze Dupsys wrote: >> On 2022.03.24. 18:26, Roger Pau Monné wrote: >>> >>> This seems to be a fairly common trace for your panics: >>> >>> #0 0xffffffff80c74605 at kdb_backtrace+0x65 >>> #1 0xffffffff80c26611 at vpanic+0x181 >>> #2 0xffffffff80c26483 at panic+0x43 >>> #3 0xffffffff810c1b97 at trap+0xba7 >>> #4 0xffffffff810c1bef at trap+0xbff >>> #5 0xffffffff810c1243 at trap+0x253 >>> #6 0xffffffff81098c58 at calltrap+0x8 >>> #7 0xffffffff80c7f251 at rman_is_region_manager+0x241 >>> #8 0xffffffff80c36e71 at sbuf_new_for_sysctl+0x101 >>> #9 0xffffffff80c362bc at kernel_sysctl+0x3ec >>> #10 0xffffffff80c36933 at userland_sysctl+0x173 >>> #11 0xffffffff80c3677f at sys___sysctl+0x5f >>> #12 0xffffffff810c249c at amd64_syscall+0x10c >>> #13 0xffffffff8109956b at Xfast_syscall+0xfb >>> >>> Could you give me the output of executing the following on dom0: >>> >>> $ addr2line -e /usr/lib/debug/boot/kernel/kernel.debug 0xffffffff80c7f251 >>> $ addr2line -e /usr/lib/debug/boot/kernel/kernel.debug 0xffffffff80c36e71 >>> $ addr2line -e /usr/lib/debug/boot/kernel/kernel.debug 0xffffffff80c362bc >>> $ addr2line -e /usr/lib/debug/boot/kernel/kernel.debug 0xffffffff80c36933 >>> $ addr2line -e /usr/lib/debug/boot/kernel/kernel.debug 0xffffffff80c3677f >> >> Yes, i'd say that with current stress test the panic message always contains >> rman_is_region_manager in mid. > > That's great. In fact I think I was mislead by the kdb resolved > symbols not being very accurate. > >> addr2line -e /usr/lib/debug/boot/kernel/kernel.debug 0xffffffff80c7f251 >> /usr/src/sys/kern/subr_rman.c:0 > > It's a shame this one hasn't been resolved properly. I think this > would point to sysctl_rman, but without proper debug that's just a > guess. Could you install GNU binutils and try to resolve using GNU > addr2line? > > $ pkg install binutils > $ /usr/local/bin/addr2line -e /usr/lib/debug/boot/kernel/kernel.debug 0xffffffff80c7f251 /usr/src/sys/kern/subr_rman.c:0 Prev. line is not my question, it is output from GNU addr2line. I don't know why it does not resolve either. > After attempting to resolve the address, can you give the attached > patch a try? (maybe it's not going to make a difference, as without > that symbol resolved this is just a hunch). Nice find, but it did not resolve panic problem. Aside from that, i think this fixes some possible problems since current locking logic does not seem to be correct. Next week i will not be able to run tests till Thursday, but i will run some today and tomorrow.