Subject: odd dhcpd coredump stack trace
To: None <current-users@netbsd.org>
From: Laine Stump <lainestump@rcn.com>
List: current-users
Date: 10/23/2000 00:09:39
I recompiled everything in the dhcp directory with "CFLAGS=-g make",
then ran dhcpd to wait for a crash (it's been dumping core with
regularity since the Oct 18 update). The resulting corefile gave me
the stack backtrace below. The odd part is the ?? () reference - line
413 of dns.c is a call to dns_zone_lookup(), which is in the same
file, so it *must* have symbols in it. I suppose the problem must be
that the compiler didn't give that function a stack frame, so the
backtrace can't tell me anything.

So what's the best/simplest way to get dhcpd built with *all* symbols,
stack frames, etc? It's crashing every few hours, so it shouldn't be a
problem to get another coredump once I have it built in a useful way.

------------------

#0  0x480ea27d in strlen ()
#1  0x81122e0 in ?? ()
#2  0x8095185 in cache_found_zone (class=ns_c_in, zname=0xbfbfb20c "home.org", 
    addrs=0xbfbfb614, naddrs=1)
    at /drive2/src/src/usr.sbin/dhcp/common/dns.c:413
#3  0x809da53 in MRres_findzonecut (statp=0x80c00e0, 
    dname=0x8115900 "DALGICNT-SMP.home.org", class=ns_c_in, opts=1, 
    zname=0xbfbfb20c "home.org", zsize=1025, addrs=0xbfbfb614, naddrs=3, 
    count=0xbfbfb620, zcookie=0xbfbfb1c0)
    at /drive2/src/src/usr.sbin/dhcp/minires/res_findzonecut.c:180
#4  0x809a6e4 in minires_nupdate (statp=0x80c00e0, rrecp_in=0x80cca40)
    at /drive2/src/src/usr.sbin/dhcp/minires/res_update.c:101
#5  0x8081fa4 in evaluate_numeric_expression (result=0xbfbfbce8, 
    packet=0x80cd580, lease=0x8135650, in_options=0x80cc780, 
    cfg_options=0x80cc7c0, scope=0x81356c8, expr=0x80cb500)
    at /drive2/src/src/usr.sbin/dhcp/common/tree.c:2172
#6  0x807dd65 in find_matching_case (ep=0xbfbfbd50, packet=0x80cd580, 
    lease=0x8135650, in_options=0x80cc780, out_options=0x80cc7c0, 
    scope=0x81356c8, expr=0x80cb500, stmt=0x80cb660)
    at /drive2/src/src/usr.sbin/dhcp/common/execute.c:900
#7  0x807c7a3 in execute_statements (result=0x0, packet=0x80cd580, 
    lease=0x8135650, in_options=0x80cc780, out_options=0x80cc7c0, 
    scope=0x81356c8, statements=0x80cb4e0)
    at /drive2/src/src/usr.sbin/dhcp/common/execute.c:142
#8  0x807c888 in execute_statements (result=0x0, packet=0x80cd580, 
    lease=0x8135650, in_options=0x80cc780, out_options=0x80cc7c0, 
    scope=0x81356c8, statements=0x80cb320)
    at /drive2/src/src/usr.sbin/dhcp/common/execute.c:180
#9  0x807c888 in execute_statements (result=0x0, packet=0x80cd580, 
    lease=0x8135650, in_options=0x80cc780, out_options=0x80cc7c0, 
    scope=0x81356c8, statements=0x80cb1c0)
    at /drive2/src/src/usr.sbin/dhcp/common/execute.c:180
#10 0x804f426 in ack_lease (packet=0x80cd580, lease=0x8135320, offer=5, 
    when=0, 
    msg=0xbfbfbed4 "DHCPREQUEST for 10.0.20.50 from 00:50:04:11:55:16 (DALGICNT-SMP) via tlp0", ms_nulltp=1)
    at /drive2/src/src/usr.sbin/dhcp/server/dhcp.c:1757
#11 0x804bf42 in dhcprequest (packet=0x80cd580, ms_nulltp=1)
    at /drive2/src/src/usr.sbin/dhcp/server/dhcp.c:399
#12 0x804b625 in dhcp (packet=0x80cd580)
    at /drive2/src/src/usr.sbin/dhcp/server/dhcp.c:83
#13 0x80991aa in do_packet (interface=0x80cd000, packet=0xbfbfc398, len=300, 
    from_port=17408, from={len = 4, 
      iabuf = "\n\000\0242", '\000' <repeats 11 times>}, hfrom=0xbfbfd3b0)
    at /drive2/src/src/usr.sbin/dhcp/common/options.c:1952
#14 0x807af01 in got_one (h=0x80cd000)
    at /drive2/src/src/usr.sbin/dhcp/common/discover.c:705
#15 0x8073657 in omapi_one_dispatch (wo=0x0, t=0xbfbfd548)
    at /drive2/src/src/usr.sbin/dhcp/omapip/dispatch.c:371
#16 0x8079922 in dispatch ()
    at /drive2/src/src/usr.sbin/dhcp/common/dispatch.c:94
#17 0x804b125 in main (argc=4, argv=0xbfbfd6a0, envp=0xbfbfd6b4)
    at /drive2/src/src/usr.sbin/dhcp/server/dhcpd.c:632
#18 0x8049d61 in ___start ()