Date: Wed, 14 Jun 2023 09:01:35 +0000 From: Gary Jennejohn <garyj@gmx.de> To: Alexander Chernikov <melifaro@FreeBSD.org> Cc: current@freebsd.org Subject: Re: ifconfig dumps core and gdb uses an undefined symbol Message-ID: <20230614110135.15b928db@ernst.home> In-Reply-To: <7A98AD66-35D3-447B-B808-2A52E9AD28F3@FreeBSD.org> References: <20230614095956.26234554@ernst.home> <7A98AD66-35D3-447B-B808-2A52E9AD28F3@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 buildkern= el, > > since Gleb fixed the WITHOUT_PF problem. > > > > After installing the new world and kernel I see that ifconfig is dumpi= ng > > 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,LINKST= ATE> > > ether redacted > > inet 192.168.178.XXX netmask 0xffffff00 broadcast 192.168.178.25= 5 > > 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 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<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. =2D- Gary Jennejohn
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20230614110135.15b928db>