From nobody Wed Jun 14 10:05:31 2023 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 4Qh1Jl58n0z4dTWp for ; Wed, 14 Jun 2023 10:05:43 +0000 (UTC) (envelope-from melifaro@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qh1Jl50zdz45ch; Wed, 14 Jun 2023 10:05:43 +0000 (UTC) (envelope-from melifaro@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686737143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=c+ION93x+HfDirG4bTl02Isk1grwcUq0/VlrXa6ECo0=; b=Wm3k4hYZZXzTuQAJqMbp/wWM6f2HVnDiLuzjTXQSdopsQ6fq73aEiHZeB8X/REtQEISloI PpgDgAjV2XGNOB1HXd5/St2iMEZUHzHMlmBN2w0YbC5tknLpz23V0tdaKpbuRlW1PuQwUL 4mOLMZisBFeRIKLvzrWv0WMqBegKukNvZ1INfp1AMQIj3G6vgYMgE7OWWJAxp9sSonrtFN fqK9u2lNEQLSIk4LX0wRNIxxdPvsw2bXjnKC6yzugmN2zSdqOMeALF/GheeSjWrJz8rLlg 1rqycL58RxyACA6Z/LXoZDA1ikgR/c13ep79XSHbKSxFl3Tv9Lgcqo+RE16Yag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686737143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=c+ION93x+HfDirG4bTl02Isk1grwcUq0/VlrXa6ECo0=; b=Q19dAhtNPlath4jvNx1WRIKO7zgTuLZKDgI8tt1/9SRu0ZQ/5yBO91Hap/vZTEOBCvDU4g LodJLNn/TC1iZqtZVO10z9+J4SBW5oTibSa1LuRkWEl3c998hZzKLezASeCSYPWbsSfUiE F070t/4tPLNRSGfcBAzVRiSchi8vDvc5n7utJLZ4HLuCgjcNAAsQrOyZnnARChFux/RBCX edePHplZoTcA1RY2MPHFIPE/0ZFcPpJcecI+ZVv3VKPbQbYQePJuZcYqMHUrbkrUfdYPuZ q4/GYwJtc2vmL9k+cZ6VoV2nvt7P4tY9gB0zqNrkjkpDhwONlhifjhrz2gpV1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686737143; a=rsa-sha256; cv=none; b=unWvI/G+6qXm4lA22fQXsrjDZlRt0vk2M0TPpRD+6nDmsQJWLWXQzPiym87qlZJmx6hovN hMmYE6xyLV22nJNJ/cavNZ2uFtMcQAzJbYp3u559/PHgHmtXemWcy/6LsxHHVwlzKMkr/M +x2zHeLMLAK+e+5aUK9htrhWeBiOoT5oFh50g8DWCxEU96+f8QAVi4MITEx769ZLKtSqOG cP8I8zwI4Od9lbAQHilhQ68D+BlaIcChzS9XI09qNGxSKDvNoBe2juMykDHUTgJTYhCaou 99YA2+yEFsv6oyUa8N3+e7datlzntnGi6SE0VwtGpc4g22eCxbOUr+KJHyjXnQ== Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (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) (Authenticated sender: melifaro/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Qh1Jl3rBXzJr8; Wed, 14 Jun 2023 10:05:43 +0000 (UTC) (envelope-from melifaro@freebsd.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 73AD327C0054; Wed, 14 Jun 2023 06:05:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 14 Jun 2023 06:05:43 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedvtddgvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhkfgtggfuffgjvefvfhfosegrtd hmrehhtddvnecuhfhrohhmpeetlhgvgigrnhguvghrucevhhgvrhhnihhkohhvuceomhgv lhhifhgrrhhosefhrhgvvgeuufffrdhorhhgqeenucggtffrrghtthgvrhhnpeduteffvd ffheettdduudfghfduudejgfeikeefffeuheevffehveehtdduffffjeenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmvgdomhgvshhmthhprg huthhhphgvrhhsohhnrghlihhthidqudefvdelvdduvdefvddqvdelfeeiuddtgeekqdhm vghlihhfrghroheppehfrhgvvggsshgurdhorhhgsehmphhlshdrihgv X-ME-Proxy: Feedback-ID: i02494642:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 14 Jun 2023 06:05:42 -0400 (EDT) From: Alexander Chernikov Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_D8DFF943-15F9-4B45-B131-186AEC58725F" 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 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: ifconfig dumps core and gdb uses an undefined symbol Date: Wed, 14 Jun 2023 11:05:31 +0100 In-Reply-To: <20230614115350.5e7386fa@ernst.home> Cc: current@freebsd.org To: garyj@gmx.de References: <20230614095956.26234554@ernst.home> <7A98AD66-35D3-447B-B808-2A52E9AD28F3@FreeBSD.org> <20230614110135.15b928db@ernst.home> <20230614115350.5e7386fa@ernst.home> X-Mailer: Apple Mail (2.3731.600.7) X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_D8DFF943-15F9-4B45-B131-186AEC58725F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 14 Jun 2023, at 10:53, Gary Jennejohn wrote: >=20 > On Wed, 14 Jun 2023 09:01:35 +0000 > Gary Jennejohn > wrote: >=20 >> On Wed, 14 Jun 2023 09:09:04 +0100 >> Alexander Chernikov wrote: >>=20 >>>> On 14 Jun 2023, at 08:59, Gary Jennejohn wrote: >>> Hi Gary, >>>>=20 >>>> So, now I have a new problem with current. >>>>=20 >>>> I just now updated my current sources and ran buildworld and = buildkernel, >>>> since Gleb fixed the WITHOUT_PF problem. >>>>=20 >>>> After installing the new world and kernel I see that ifconfig is = dumping >>>> a core, apparently when it tries to show lo0, since re0 is = correctly >>>> shown: >>>>=20 >>>> ifconfig >>>> re0: flags=3D8843 metric 0 = mtu 4088 = options=3D82098 >>>> ether redacted >>>> inet 192.168.178.XXX netmask 0xffffff00 broadcast = 192.168.178.255 >>>> Segmentation fault (core dumped) >>> Could you please try to narrow down the crashing command? e.g. >>> Ifconfig lo0 >>> Ifconfig lo0 net >>> Ifconfig lo0 inet6 >>> Could you try to rebuild ifconfig w/o netlink (e.g. set = WITHOUT_NETLINK=3Dyes in the make.conf & make -C sbin/ifconfig clean all = install) and see if the new binary works? >>>=20 >>=20 >> I already have WITHOUT_NETLINK=3Dyes in my /etc/src.conf. >>=20 >> I didn't install ifconfig. I simply started it from the build = directory. >>=20 >> ifconfig lo0 shows the settings for lo0 and then dumps core. >>=20 >=20 > After your most recent changes "ifconfig re0" and "ifconfg lo0" don't > result in any errors. But "ifconfig" alone still results in a core > dump, which per gdb is happening in the strlcpy() call at = in_status_tunnel() > in af_inet.c. Indeed. diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index d30d3e1909ae..6a80ad5763b2 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -822,6 +822,7 @@ list_interfaces_ioctl(if_ctx *ctx) continue; if (!group_member(ifa->ifa_name, args->matchgroup, = args->nogroup)) continue; + ctx->ifname =3D cp; /* * Are we just listing the interfaces? */ Does this one fix the crash? >=20 > -- > Gary Jennejohn --Apple-Mail=_D8DFF943-15F9-4B45-B131-186AEC58725F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

On 14 = Jun 2023, at 10:53, Gary Jennejohn <garyj@gmx.de> wrote:

On Wed, 14 Jun 2023 09:01:35 = +0000
Gary Jennejohn = <garyj@gmx.de> = wrote:

On Wed, 14 Jun 2023 09:09:04 +0100
Alexander = Chernikov <melifaro@FreeBSD.org> wrote:

On 14 Jun 2023, at 08:59, Gary = Jennejohn <garyj@gmx.de> wrote:
Hi = Gary,

So, now I have a new problem with = current.

I just now updated my current sources and ran buildworld = and buildkernel,
since Gleb fixed the WITHOUT_PF = problem.

After installing the new world and kernel I see that = ifconfig is dumping
a core, apparently when it tries to show lo0, = since re0 is correctly
shown:

ifconfig
re0: = flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu = 4088 = options=3D82098<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE= >
     ether = redacted
     inet 192.168.178.XXX netmask = 0xffffff00 broadcast 192.168.178.255
Segmentation fault (core = dumped)
Could you please try to narrow down the crashing = command? e.g.
Ifconfig lo0
Ifconfig lo0 net
Ifconfig lo0 = inet6
Could you try to rebuild ifconfig w/o netlink (e.g. set = WITHOUT_NETLINK=3Dyes in the make.conf & make -C sbin/ifconfig clean = all install) and see if the new binary works?


I = already have WITHOUT_NETLINK=3Dyes in my /etc/src.conf.

I didn't = install ifconfig. I simply started it from the build = directory.

ifconfig lo0 shows the settings for lo0 and then dumps = core.


After = your most recent changes "ifconfig re0" and "ifconfg lo0" = don't
result in any errors. =  But "ifconfig" alone still results in a core
dump, which per gdb is happening in the = strlcpy() call at in_status_tunnel()
in = af_inet.c.
Indeed.

diff --git = a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index = d30d3e1909ae..6a80ad5763b2 100644
--- = a/sbin/ifconfig/ifconfig.c
+++ = b/sbin/ifconfig/ifconfig.c
@@ -822,6 +822,7 @@ = list_interfaces_ioctl(if_ctx *ctx)
        =                 = continue;
              =   if (!group_member(ifa->ifa_name, args->matchgroup, = args->nogroup))
            =             continue;
+   =             ctx->ifname =3D = cp;
                = /*
                =  * Are we just listing the interfaces?
    =             =  */

Does this one fix the = crash?

--
Gary = Jennejohn

= --Apple-Mail=_D8DFF943-15F9-4B45-B131-186AEC58725F--