Re: Segmentation fault dhcpcd 6.11.5
Shahid Mahmood
Thu Mar 09 14:37:48 2017
Thanks Roy,
On 3/8/2017 10:37 PM, Roy Marples wrote:
Hi Shahid
On 07/03/2017 20:57, Shahid Mahmood wrote:
Hi Roy,
There is a crash found during restart of dhcpcd. Brief bt:
...
Core was generated by `dhcpcd -4 -f /var/run/dhcp/dhcpcd.conf -c
/bin/dhcpcd-run-hooks --l'.
Program terminated with signal SIGSEGV, Segmentation fault.
...
#0 0x3d737264 in ?? ()
#1 0x0001e0d4 in arp_packet (len=<optimized out>,
data=0xbee65938 "",
ifp=<optimized out>) at arp.c:180
> #2 arp_read (arg=0xfdc108) at arp.c:206
So arp.c:180 calls out to here:
https://dev.marples.name/source/dhcpcd/browse/master/arp.c;69a91daff8a4defc6131522437af5645ddf8de18$180
astate->conflicted_cb(astate, &arm);
Now, because the BT shows arp_read then there is debug info in the
dhcpcd binary, or it's not fully stripped.
That means the function pointed to by astate->conflicted_cb should be
logged as well, but isn't.
The actual binary that crashed was stripped. gdb was later run using an
unstripped binary that was rebuilt later (unfortunately, original
unstripped binary was not available).
However, being in conflict state is a hint that I can use in the attempt
to reproduce issue.
So I think that's a corrupt stack somehow. Is this isolated to one or
many units? If one, maybe a memory test would be in order.
Unfortunately this was a one-time incident. I am trying to reproduce it
but no luck so far. I'll setup valgrind.
I notice the dhcpcd command line shown in the core file is truncated
(missing eth adaptor name as it was ought to be).
I recall seeing a crash in an older version when dhcpcd was launched
without any parameters. But now, when I try that (ie. run dhcpcd without
specifying the ethernet adaptor at command line), I get this:
# dhcpcd
dev: loaded udev
no valid interfaces found
no interfaces have a carrier
forked to background, child pid 18565
Whereas, this works:
# dhcpcd eth0
all: IPv6 kernel autoconf disabled
eth0: IPv6 kernel autoconf disabled
DUID xxx
eth0: IAID xxx
eth0: adding address xxx
if_addaddress6: Operation not supported
eth0: rebinding lease of 10.138.179.11
eth0: leased 10.138.179.11 for 30 seconds
eth0: changing route to 10.138.179.0/27
eth0: changing default route via 10.138.179.1
forked to background, child pid 18614
Everything works in the later case. May not be related to the actual
crash, but still unexpected. (The adaptor is POE, if that matters)
Roy
-shahid
Archive administrator: postmaster@marples.name