From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1MSzOU-0003He-P3 for garchives@archives.gentoo.org; Mon, 20 Jul 2009 20:23:31 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1897EE005A; Mon, 20 Jul 2009 20:23:30 +0000 (UTC) Received: from mail1.nippynetworks.com (mail.mailasail.com [212.227.250.41]) by pigeon.gentoo.org (Postfix) with ESMTP id B536CE0207 for ; Mon, 20 Jul 2009 20:23:29 +0000 (UTC) Received: from localhost (mail1.nippynetworks.com [127.0.2.1]) by mail1.nippynetworks.com (Postfix) with ESMTP id 24FA0674D6E; Mon, 20 Jul 2009 21:23:29 +0100 (BST) X-Virus-Scanned: amavisd-new at nippynetworks.com Received: from mail1.nippynetworks.com ([127.0.2.1]) by localhost (mail1.nippynetworks.com [127.0.2.1]) (amavisd-new, port 10024) with LMTP id gBSsJNIeqBgi; Mon, 20 Jul 2009 21:23:28 +0100 (BST) Received: from ed-wildgooses-macbook-pro.local (office.nippynetworks.com [94.194.201.187]) (Authenticated sender: edward@wildgooses.com) by mail1.nippynetworks.com (Postfix) with ESMTPSA id 78FA2674D66; Mon, 20 Jul 2009 21:23:28 +0100 (BST) Message-ID: <4A64D23F.8030905@wildgooses.com> Date: Mon, 20 Jul 2009 21:23:27 +0100 From: Ed W User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-embedded@lists.gentoo.org Reply-to: gentoo-embedded@lists.gentoo.org MIME-Version: 1.0 To: uclibc , gentoo-embedded Subject: [gentoo-embedded] Re: Everything that touches the network segfaults... References: <4A623FCE.9010308@wildgooses.com> In-Reply-To: <4A623FCE.9010308@wildgooses.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 4f2636ce-d823-4a82-92ac-d4938dc41a3f X-Archives-Hash: 7c3564634e67778cccea0834e0cd7e06 Ed W wrote: > Hi, I am building an embedded system and I have a certain config which = > is all working well, until I change and enable UCLIBC_USE_NETLINK=3Dy=20 > and UCLIBC_SUPPORT_AI_ADDRCONFIG=3Dy in uclibc-0.30.1 config > > As soon as I enable the second option then I start getting segfaults=20 > whenever I run anything that tries to use the network (eg busybox=20 > ping, dropbear, busybox telnet). ifconfig works fine, as does bringing = > up the interface > > The build environment is gentoo-hardened (gcc 3.4.6) with=20 > uclibc-0.30.1 and busybox 1.14.2. The build environment is a 32bit=20 > chroot on a 64bit kernel. The target machine is an x86 alix board > > What is very odd is that if I chroot into the build on the build=20 > machine then ping, etc works fine. However, with a different kernel=20 > (but very similar) on the alix board I get these segfaults. I have=20 > switched the target to a 2.6.29.6 vanilla kernel to try and eliminate=20 > that - the build machine is running 2.6.29.6 64bit with some patches=20 > (hardened+vserver) > > Obviously it's going to be a pain to turn on symbols and try to get a=20 > backtrace on the embedded board, so hoping someone has some other ideas= ? Below is the backtrace from the crash - can anyone please help=20 interpret? Looks like an issue with getaddrinfo and the=20 SUPPORT_AI_ADDRECONFIG option? (gdb) bt full #0 0xb7fe6327 in __check_pf () at libc/inet/getaddrinfo.c:191 ifa =3D (struct ifaddrs *) 0x968bb38 runp =3D (struct ifaddrs *) 0x968bdcc seen =3D 0 #1 0xb7fe6560 in gaih_inet (name=3D0xbfcbee68 "192.168.105.4", service=3D= 0x0, req=3D0xbfcbe964, pai=3D0xbfcbe924) at libc/inet/getaddrinfo.c:418 nullserv =3D {next =3D 0xb801b244, socktype =3D -1077155576, protocol =3D -1207841846, port =3D 134522499} tp =3D (const struct gaih_typeproto *) 0xb7ffb520 st =3D (struct gaih_servtuple *) 0xbfcbe8a4 at =3D (struct gaih_addrtuple *) 0x0 rc =3D 0 v4mapped =3D 0 seen =3D 3087118916 __PRETTY_FUNCTION__ =3D "gaih_inet" #2 0xb7fe760c in *__GI_getaddrinfo (name=3D0xbfcbee68 "192.168.105.4", service=3D0x0, hints=3D0xbfcbe964, pai=3D0xbfcbe960) at libc/inet/getaddrinfo.c:860 i =3D 0 j =3D 1 last_i =3D 0 p =3D (struct addrinfo *) 0x0 end =3D (struct addrinfo **) 0xbfcbe924 g =3D (const struct gaih *) 0xb80006b8 pg =3D (const struct gaih *) 0xb80006b8 gaih_service =3D {name =3D 0xb801cb1a "\211D$(\203=EF=BF=BD\ba=EF=BF=BD\0= 04", num =3D -1207848920} pservice =3D (struct gaih_service *) 0x0 default_hints =3D {ai_flags =3D -1208060929, ai_family =3D 134525712, ai_socktype =3D 298, ai_protocol =3D 134515904, ai_addrlen =3D 134522288,= ai_addr =3D 0x804bca0, ai_canonname =3D 0x7
, ai_next =3D 0xb801cb25} #3 0x080cef16 in str2sockaddr (host=3D0xbfcbee68 "192.168.105.4", port=3D= 0,=20 af=3D0, ai_flags=3D2) at libbb/xconnect.c:213 rc =3D 0 r =3D (len_and_sockaddr *) 0x0 result =3D (struct addrinfo *) 0x0 used_res =3D (struct addrinfo *) 0xbfcbe984 org_host =3D 0xbfcbee68 "192.168.105.4" cp =3D 0xbfcbe984 "" hint =3D {ai_flags =3D 0, ai_family =3D 0, ai_socktype =3D 1, ai_protocol= =3D 0, ai_addrlen =3D 0, ai_addr =3D 0x0, ai_canonname =3D 0x0, ai_next =3D 0x0}= #4 0x080cefaa in xhost_and_af2sockaddr (host=3D0x0, port=3D-1207958740,=20 af=3D65192) at libbb/xconnect.c:252 No locals. #5 0x08068714 in ping_main (argc=3D2, argv=3D0xbfcbebf4) at=20 networking/ping.c:750 af =3D 812 lsa =3D (len_and_sockaddr *) 0x0 str_s =3D 0xb7fa0c3c "" opt =3D 0 #6 0x0804df9a in run_applet_no_and_exit (applet_no=3D176, argv=3D0xbfcbeb= f4) at libbb/appletlib.c:732 argc =3D 2 #7 0x0804dfbe in run_applet_and_exit (name=3D0xbfcbee63 "ping",=20 argv=3D0xbfcbebf4) at libbb/appletlib.c:739 applet =3D 0 #8 0x0804e1fe in main (argc=3D2, argv=3D0xbfcbebf4) at libbb/appletlib.c:= 776