Gentoo Archives: gentoo-embedded

From: Ed W <lists@××××××××××.com>
To: uclibc <uclibc@××××××.org>, gentoo-embedded <gentoo-embedded@l.g.o>
Subject: [gentoo-embedded] Re: Everything that touches the network segfaults...
Date: Mon, 20 Jul 2009 20:23:31
Message-Id: 4A64D23F.8030905@wildgooses.com
In Reply to: [gentoo-embedded] Everything that touches the network segfaults... by Ed W
1 Ed W wrote:
2 > Hi, I am building an embedded system and I have a certain config which
3 > is all working well, until I change and enable UCLIBC_USE_NETLINK=y
4 > and UCLIBC_SUPPORT_AI_ADDRCONFIG=y in uclibc-0.30.1 config
5 >
6 > As soon as I enable the second option then I start getting segfaults
7 > whenever I run anything that tries to use the network (eg busybox
8 > ping, dropbear, busybox telnet). ifconfig works fine, as does bringing
9 > up the interface
10 >
11 > The build environment is gentoo-hardened (gcc 3.4.6) with
12 > uclibc-0.30.1 and busybox 1.14.2. The build environment is a 32bit
13 > chroot on a 64bit kernel. The target machine is an x86 alix board
14 >
15 > What is very odd is that if I chroot into the build on the build
16 > machine then ping, etc works fine. However, with a different kernel
17 > (but very similar) on the alix board I get these segfaults. I have
18 > switched the target to a 2.6.29.6 vanilla kernel to try and eliminate
19 > that - the build machine is running 2.6.29.6 64bit with some patches
20 > (hardened+vserver)
21 >
22 > Obviously it's going to be a pain to turn on symbols and try to get a
23 > backtrace on the embedded board, so hoping someone has some other ideas?
24
25
26 Below is the backtrace from the crash - can anyone please help
27 interpret? Looks like an issue with getaddrinfo and the
28 SUPPORT_AI_ADDRECONFIG option?
29
30
31 (gdb) bt full
32 #0 0xb7fe6327 in __check_pf () at libc/inet/getaddrinfo.c:191
33 ifa = (struct ifaddrs *) 0x968bb38
34 runp = (struct ifaddrs *) 0x968bdcc
35 seen = 0
36 #1 0xb7fe6560 in gaih_inet (name=0xbfcbee68 "192.168.105.4", service=0x0,
37 req=0xbfcbe964, pai=0xbfcbe924) at libc/inet/getaddrinfo.c:418
38 nullserv = {next = 0xb801b244, socktype = -1077155576,
39 protocol = -1207841846, port = 134522499}
40 tp = (const struct gaih_typeproto *) 0xb7ffb520
41 st = (struct gaih_servtuple *) 0xbfcbe8a4
42 at = (struct gaih_addrtuple *) 0x0
43 rc = 0
44 v4mapped = 0
45 seen = 3087118916
46 __PRETTY_FUNCTION__ = "gaih_inet"
47 #2 0xb7fe760c in *__GI_getaddrinfo (name=0xbfcbee68 "192.168.105.4",
48 service=0x0, hints=0xbfcbe964, pai=0xbfcbe960)
49 at libc/inet/getaddrinfo.c:860
50 i = 0
51 j = 1
52 last_i = 0
53 p = (struct addrinfo *) 0x0
54 end = (struct addrinfo **) 0xbfcbe924
55 g = (const struct gaih *) 0xb80006b8
56 pg = (const struct gaih *) 0xb80006b8
57 gaih_service = {name = 0xb801cb1a "\211D$(\203�\ba�\004",
58 num = -1207848920}
59 pservice = (struct gaih_service *) 0x0
60 default_hints = {ai_flags = -1208060929, ai_family = 134525712,
61 ai_socktype = 298, ai_protocol = 134515904, ai_addrlen = 134522288,
62 ai_addr = 0x804bca0, ai_canonname = 0x7 <Address 0x7 out of bounds>,
63 ai_next = 0xb801cb25}
64 #3 0x080cef16 in str2sockaddr (host=0xbfcbee68 "192.168.105.4", port=0,
65 af=0,
66 ai_flags=2) at libbb/xconnect.c:213
67 rc = 0
68 r = (len_and_sockaddr *) 0x0
69 result = (struct addrinfo *) 0x0
70 used_res = (struct addrinfo *) 0xbfcbe984
71 org_host = 0xbfcbee68 "192.168.105.4"
72 cp = 0xbfcbe984 ""
73 hint = {ai_flags = 0, ai_family = 0, ai_socktype = 1, ai_protocol = 0,
74 ai_addrlen = 0, ai_addr = 0x0, ai_canonname = 0x0, ai_next = 0x0}
75 #4 0x080cefaa in xhost_and_af2sockaddr (host=0x0, port=-1207958740,
76 af=65192)
77 at libbb/xconnect.c:252
78 No locals.
79 #5 0x08068714 in ping_main (argc=2, argv=0xbfcbebf4) at
80 networking/ping.c:750
81 af = 812
82 lsa = (len_and_sockaddr *) 0x0
83 str_s = 0xb7fa0c3c ""
84 opt = 0
85 #6 0x0804df9a in run_applet_no_and_exit (applet_no=176, argv=0xbfcbebf4)
86 at libbb/appletlib.c:732
87 argc = 2
88 #7 0x0804dfbe in run_applet_and_exit (name=0xbfcbee63 "ping",
89 argv=0xbfcbebf4)
90 at libbb/appletlib.c:739
91 applet = 0
92 #8 0x0804e1fe in main (argc=2, argv=0xbfcbebf4) at libbb/appletlib.c:776

Replies

Subject Author
Re: [gentoo-embedded] Re: Everything that touches the network segfaults... Peter Stuge <peter@×××××.se>