From nobody Wed Jun 14 09:17:51 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 4Qh0Fm64Kfz4d4Cx for ; Wed, 14 Jun 2023 09:18:04 +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 4Qh0Fm4L54z3pSH; Wed, 14 Jun 2023 09:18:04 +0000 (UTC) (envelope-from melifaro@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686734284; 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=AU8P4tCJLicTOfx8aIwofqFGMYc+7rkAo/VSPSopnDU=; b=K4FCA6hLI/Vqi1U1F/JyDOyiI142LUFtYSJymoU2y/gToNDYlrHsk2pO7qiJISLIXEs9p6 jDygFmR/AJns74bFLTrpTNF+9enWsLadWC07m8N/Rx71X0xQy2iOXtfuVcTQU+Cwgr1N+F tGrDmRD3ppQtrNX7KlrvKTdA/nQaijGG4Nc78ziNcD0Vu79kgwSv470ssjojROgDNBRdkn rI8IY10C9oXUDKWU+w4d37uKDyW6b9egFTG3c01fHXyAAR4LFqUZ7SShDQTO7Y0AVbkqC5 fn2JenwKW6QNeGSo2CJrZr6LYA8X9HGPUsW4pnIQKc387U/kTa2Boj4Rmt1Hyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686734284; 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=AU8P4tCJLicTOfx8aIwofqFGMYc+7rkAo/VSPSopnDU=; b=NTDpqbIJJ1L+VbF3p9GWQcQZH+lfDnsZy+qSH2/xlpE+L4l8CmSXjYO1rNNfjHXNZTTnsR qBKiaHbZrp+87QTmK5y18CN+zQV/0bWFWCXNp/trv4HPwY9SAOK8um+ws51Wg5wo7a0bv6 N2lxGRZLa4nfVAQ437oaJvnpVpHy/OCuZbiaoapeTT2G0ocVCLLvEUxu7kY1D+MiHWp8I4 jLNqwRrlbldzspvXm4Bd7fpCBdpeLhjbhRDUmaFl/X0EciLDPv5NJcTkvEo1ZLGMig019A 8H/j37SP+phbfNml4YQf9j+Ks8/7aJqAFPbEYnU5S1r13SQr+NMn7uwvjAoMsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686734284; a=rsa-sha256; cv=none; b=gerE87FbxPFK5P4r59hHoE0HDmmpkZhfSTs7j67I/jxOkQQzw/7aaFJe2u0WKUvvQOL/Uh c72/IEKwutUizKPqVtkKKvCLqc1Fao7Fp3MgfZ2DJpFumUM+30kkgjzOqr09Lv7v4yinpk avHAJtnsolKrtXwaoLX5lEApddZ5CyyJdrr3dvgfM3WNZaEbj6RIDBprZiKoBchqhj50z0 6qwETA/NkcGFfSmKKVfJnOEVTzhw6NSNhgPvVqQXUxnXQvwlVkZNjRul3hI3WKADJGINF3 7HzLkPYPI9XaZYxOCZwtVrn0hCxRw/79PrkmkaZB8ii8kiLo0qddYMJh7hJOOQ== 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 4Qh0Fm39t6zJ3c; Wed, 14 Jun 2023 09:18:04 +0000 (UTC) (envelope-from melifaro@freebsd.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 4060027C0054; Wed, 14 Jun 2023 05:18:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 14 Jun 2023 05:18:03 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedvtddgudegucetufdoteggodetrfdotf 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 05:18:02 -0400 (EDT) From: Alexander Chernikov Message-Id: <66CFF721-79D5-4A03-BCC4-93B3639F6CD8@FreeBSD.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_0848E618-4E88-4479-8E60-2DB236FBB428" 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 10:17:51 +0100 In-Reply-To: <20230614110135.15b928db@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> X-Mailer: Apple Mail (2.3731.600.7) X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_0848E618-4E88-4479-8E60-2DB236FBB428 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 14 Jun 2023, at 10:01, 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 >>> Unfortunately, I see this error message when I try to look at the = core >>> file with gdb: >>>=20 >>> gdb /sbin/ifconfig ifconfig.core >>> ld-elf.so.1: Undefined symbol "rl_eof_found" referenced from COPY >>> relocation in /usr/local/bin/gdb >> Not a specialist here, but if you could build the binary with debug >> (make DEBUG_FLAGS=3D-O0 -g3 sbin/ifconfig clean all install) & share = the >> binary & core with me, I could take a look on what?s happening. >>>=20 >=20 > I compiled gbd under /usr/ports and it now works, although it's = emitting > some weird errors. >=20 > -O0 -g3 removes too much and gdb shows no useful information. >=20 > With just -g3 I get this output from gdb after running the newly = compiled > ifconfig: >=20 > Program terminated with signal SIGSEGV, Segmentation fault > warning: Section `.reg-xstate/100294' in core file too small. > #0 lagg_status (ctx=3D0x2f051660ba00) at = /usr/src/sbin/ifconfig/iflagg.c:223 > 223 const int verbose =3D ctx->args->verbose; > (gdb) bt > #0 lagg_status (ctx=3D0x2f051660ba00) at = /usr/src/sbin/ifconfig/iflagg.c:223 > #1 0x00002efcf610ea55 in af_other_status (ctx=3D0x2f051660ba00) > at /usr/src/sbin/ifconfig/ifconfig.c:964 > #2 status (args=3D0x2f051660ba70, ifa=3D0x2f051a2f2000, = sdl=3D) > at /usr/src/sbin/ifconfig/ifconfig.c:1788 > #3 list_interfaces_ioctl (args=3D0x2f051660ba70) > at /usr/src/sbin/ifconfig/ifconfig.c:845 > #4 list_interfaces (args=3D0x2f051660ba70) > at /usr/src/sbin/ifconfig/ifconfig.c:428 > #5 main (ac=3D, av=3D) > at /usr/src/sbin/ifconfig/ifconfig.c:724 > (gdb) >=20 > I looked at ctx: >=20 > (gdb) p ctx > $1 =3D (if_ctx *) 0x2f051660ba00 > (gdb) p/x *0x2f051660ba00 > $2 =3D 0x0 <=3D=3D > (gdb) >=20 > So, looks like the problem is in iflagg and ctx is NULL. Ack. Does bbad5525fabf fix the issue? >=20 > -- > Gary Jennejohn --Apple-Mail=_0848E618-4E88-4479-8E60-2DB236FBB428 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

On 14 = Jun 2023, at 10:01, 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.


Unfortunately, I = see this error message when I try to look at the core
file with = gdb:

gdb /sbin/ifconfig ifconfig.core
ld-elf.so.1: Undefined = symbol "rl_eof_found" referenced from COPY
relocation in = /usr/local/bin/gdb
Not a specialist here, but if you = could build the binary with debug
(make DEBUG_FLAGS=3D-O0 -g3 = sbin/ifconfig clean all install) & share the
binary & core = with me, I could take a look on what?s happening.


I = compiled gbd under /usr/ports and it now works, although it's = emitting
some weird = errors.

-O0 -g3 removes too much = and gdb shows no useful information.

With = just -g3 I get this output from gdb after running the newly = compiled
ifconfig:

Program terminated with signal SIGSEGV, = Segmentation fault
warning: Section `.reg-xstate/100294' in core file too = small.
#0  lagg_status = (ctx=3D0x2f051660ba00) at /usr/src/sbin/ifconfig/iflagg.c:223
223 =             co= nst int verbose =3D ctx->args->verbose;
(gdb) bt
#0 =  lagg_status (ctx=3D0x2f051660ba00) at = /usr/src/sbin/ifconfig/iflagg.c:223
#1 =  0x00002efcf610ea55 in af_other_status = (ctx=3D0x2f051660ba00)
   at = /usr/src/sbin/ifconfig/ifconfig.c:964
#2 =  status (args=3D0x2f051660ba70, ifa=3D0x2f051a2f2000, = sdl=3D<optimized out>)
   at = /usr/src/sbin/ifconfig/ifconfig.c:1788
#3 =  list_interfaces_ioctl (args=3D0x2f051660ba70)
   at = /usr/src/sbin/ifconfig/ifconfig.c:845
#4 =  list_interfaces (args=3D0x2f051660ba70)
   at = /usr/src/sbin/ifconfig/ifconfig.c:428
#5 =  main (ac=3D<optimized out>, av=3D<optimized = out>)
   at = /usr/src/sbin/ifconfig/ifconfig.c:724
(gdb)

I = looked at ctx:

(gdb) p = ctx
$1 =3D (if_ctx *) = 0x2f051660ba00
(gdb) = p/x *0x2f051660ba00
$2 =3D = 0x0 <=3D=3D
(gdb)

So, = looks like the problem is in iflagg and ctx is NULL.
Ack. Does bbad5525fabf fix the = issue?

--
Gary = Jennejohn

= --Apple-Mail=_0848E618-4E88-4479-8E60-2DB236FBB428--