From nobody Sun Nov 21 21:46:30 2021 X-Original-To: freebsd-stable@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 1B83918A2147 for ; Sun, 21 Nov 2021 21:54:29 +0000 (UTC) (envelope-from pmc@citylink.dinoex.sub.org) Received: from uucp.dinoex.org (uucp.dinoex.org [IPv6:2a0b:f840::12]) (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 "uucp.dinoex.sub.de", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hy41b6Hdxz4gZr for ; Sun, 21 Nov 2021 21:54:27 +0000 (UTC) (envelope-from pmc@citylink.dinoex.sub.org) Received: from uucp.dinoex.sub.de (uucp.dinoex.org [185.220.148.12]) by uucp.dinoex.org (8.17.1/8.17.1) with ESMTPS id 1ALLs40I017559 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Sun, 21 Nov 2021 22:54:05 +0100 (CET) (envelope-from pmc@citylink.dinoex.sub.org) X-MDaemon-Deliver-To: X-Authentication-Warning: uucp.dinoex.org: Host uucp.dinoex.org [185.220.148.12] claimed to be uucp.dinoex.sub.de Received: (from uucp@localhost) by uucp.dinoex.sub.de (8.17.1/8.17.1/Submit) with UUCP id 1ALLs4Ou017558 for freebsd-stable@freebsd.org; Sun, 21 Nov 2021 22:54:04 +0100 (CET) (envelope-from pmc@citylink.dinoex.sub.org) Received: from gate.intra.daemon.contact (gate-e [192.168.98.2]) by citylink.dinoex.sub.de (8.16.1/8.16.1) with ESMTP id 1ALLn06j056805 for ; Sun, 21 Nov 2021 22:49:00 +0100 (CET) (envelope-from peter@gate.intra.daemon.contact) Received: from gate.intra.daemon.contact (gate-e [192.168.98.2]) by gate.intra.daemon.contact (8.16.1/8.16.1) with ESMTPS id 1ALLkU9R056127 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Sun, 21 Nov 2021 22:46:30 +0100 (CET) (envelope-from peter@gate.intra.daemon.contact) Received: (from peter@localhost) by gate.intra.daemon.contact (8.16.1/8.16.1/Submit) id 1ALLkUnH056124 for freebsd-stable@freebsd.org; Sun, 21 Nov 2021 22:46:30 +0100 (CET) (envelope-from peter) Date: Sun, 21 Nov 2021 22:46:30 +0100 From: Peter To: freebsd-stable@freebsd.org Subject: Re: 12.3-RC1 fails to compile perl,tcl86 (ipfw dtrace issue) Message-ID: List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Milter: Spamilter (Reciever: uucp.dinoex.sub.de; Sender-ip: 185.220.148.12; Sender-helo: uucp.dinoex.sub.de;) X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (uucp.dinoex.org [185.220.148.12]); Sun, 21 Nov 2021 22:54:07 +0100 (CET) X-Rspamd-Queue-Id: 4Hy41b6Hdxz4gZr X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of pmc@citylink.dinoex.sub.org designates 2a0b:f840::12 as permitted sender) smtp.mailfrom=pmc@citylink.dinoex.sub.org X-Spamd-Result: default: False [1.35 / 15.00]; FAKE_REPLY(1.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.955]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[4]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; NEURAL_SPAM_SHORT(0.60)[0.605]; NEURAL_SPAM_LONG(1.00)[1.000]; DMARC_NA(0.00)[sub.org]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:205376, ipnet:2a0b:f840::/32, country:DE]; RCVD_TLS_LAST(0.00)[] X-ThisMailContainsUnwantedMimeParts: N ## this seems not have arrived on the list at first send ## > dtrace: failed to establish error handler: "/usr/lib/dtrace/ipfw.d", > line 106: failed to copy type of 'inp': Conflicting type is already defined > That file ipfw.d appears to be new in 12.3, but I'm clueless what > the error means (and why it happens only to me). I figured out why - I have "device dtraceall" in my kernel. This is reproducible: > root@y12y:/ # dtrace -h > dtrace: -h requires one or more scripts or enabling options > root@y12y:/ # kldload dtraceall > root@y12y:/ # dtrace -h > dtrace: failed to establish error handler: "/usr/lib/dtrace/ipfw.d", line 106: failed to copy type of 'inp': Conflicting type is already defined > root@y12y:/ # kldunload dtraceall > root@y12y:/ # dtrace -h > dtrace: -h requires one or more scripts or enabling options But we do already have a bug (#254483) for this error. This bug was closed as duplicate to bug #258763, and the latter one was closed as solved with a fix as stated here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258763#c7 But the fancy is: 1. that fix appears to have missed the releng/12.3 branch by three days, so it is not in the code. But also 2. if applied, (*surprize*) that fix does NOT help! More than one thing is wrong here, and bug #254483 is *not* a duplicate to #258763. The failure does NOT come from code covered by Mark Johnstons fix. It comes from a neighboring section where Integers are compared, and it fails with a type conflict 8bit vs. 32bit. The problem must be within /usr/lib/dtrace/ipfw.d - and indeed it is (irrelevant parts stripped away): > typedef struct ipfw_match_info { > struct mbuf *m; > } ipfw_match_info_t; > > translator ipfw_match_info_t < struct ip_fw_args *p > { > m = p->m; > }; This does not work. Within the 'struct mbuf' definition is a construct, that looks like this: > uint32_t m_type:8, /* type of data in this mbuf */ > m_flags:24; /* flags; see below */ And it seems that is somehow the cause for the integer size conflict (not implemented?) In the neighboring file /usr/lib/dtrace/mbuf.d this is done distinctively: > translator mbufinfo_t < struct mbuf *p > { > mbuf_addr = (uintptr_t)p; > m_data = p->m_data; > m_len = p->m_len; > m_type = p->m_type & 0xff000000; > m_flags = p->m_type & 0x00ffffff; >}; So probably we should just duplicate that approach for ipfw. Or, could that definition be directly included and called? Does dtrace allow one tranlation to call another? I can't answer that, have never been that deep in dtrace - but I really love the idea that we now get means to look into ipfw. Comes in handy and at the right time. :) cheerio, PMc