<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>There were found few known regressions in 2.86 release. Could you
      try latest test release of version 2.87, if that crash would still
      occur? Multiple of issues were fixed already.<br>
    </p>
    <div class="moz-cite-prefix">On 5/7/22 13:16, 韩冰 wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAJGq1st60uYb5QH_aKYEq9GnqtRvkuaR_sz6yDzC+tRhwr_tAA@mail.gmail.com">
      <div dir="ltr">
        <div dir="ltr" data-smartmail="gmail_signature">
          <div dir="ltr">
            <div>
              <div>Hello everyone,</div>
            </div>
            <div>I found a core dump issue when I use dnsmasq as a DHCP
              server (Version 2.86, running on Linux). My setup
              and reproduction step is as follows.</div>
            <div>Dnsmasq main config</div>
            <blockquote class="gmail_quote"># Common Configure<br>
              pid-file=/var/run/dnsmasq.pid<br>
              log-facility=/var/log/dnsmasq.log<br>
              user=root<br>
              group=root<br>
              interface=eth0<br>
              <br>
              # DNS Server Configure<br>
              no-hosts<br>
              no-resolv<br>
              log-queries=extra<br>
              port=53<br>
              <br>
              # DHCP Server Configure<br>
              log-dhcp<br>
              dhcp-range=172.17.12.128,static,255.255.255.192 # Change
              the network address and subnet mask.<br>
              dhcp-hostsfile=/etc/dnsmasq/dhcp-hosts<br>
              dhcp-optsfile=/etc/dnsmasq/dhcp-options<br>
              dhcp-vendorclass=set:pxe-bios-x86,PXEClient:Arch:00000<br>
              dhcp-vendorclass=set:pxe-uefi-amd64,PXEClient:Arch:00007<br>
              dhcp-vendorclass=set:pxe-uefi-amd64,PXEClient:Arch:00009<br>
              dhcp-boot=tag:pxe-bios-x86,pxelinux.0,pxeserver<br>
              dhcp-boot=tag:pxe-uefi-amd64,bootnetx64.efi,pxeserver<br>
              dhcp-ignore=tag:!known<br>
            </blockquote>
            <div>External DHCP host file</div>
            <blockquote class="gmail_quote">08:c0:eb:cb:MM:NN,id:*,set:mytag,172.17.12.XXX,XXX-01,5m </blockquote>
            <div>External DHCP options file</div>
            <blockquote class="gmail_quote">tag:mytag,option:netmask,255.255.255.128<br>
              tag:mytag,option:router,172.17.12.190<br>
              tag:mytag,option:dns-server,172.16.0.XXX<br>
              tag:mytag,option:ntp-server,172.16.0.XXX<br>
              tag:mytag,option:domain-name,mydomain<br>
            </blockquote>
            <div>Reproduction step is <br>
            </div>
            <div>First start dnsmasq with the config shown above, </div>
            <div>Then use 08:c0:eb:cb:MM:NN to obtain an IP address from
              dnsmasq server.</div>
            <div>After we can see lease of 08:c0:eb:cb:MM:NN
              in dnsmasq.leases, send signal HUP to dnsmasq,</div>
            <div>Now I got dnsmasq core dumped and traceback is
              following</div>
            <blockquote class="gmail_quote">#0  __GI_raise
              (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50<br>
              #1  0x00007f858837f535 in __GI_abort () at abort.c:79<br>
              #2  0x00007f85883d6518 in __libc_message
              (action=action@entry=do_abort,
              fmt=fmt@entry=0x7f85884e028d "%s\n")<br>
                  at ../sysdeps/posix/libc_fatal.c:181<br>
              #3  0x00007f85883dcc3a in malloc_printerr
              (str=str@entry=0x7f85884e1fe0 "double free or corruption
              (out)") at malloc.c:5359<br>
              #4  0x00007f85883de770 in _int_free (av=0x7f8588517c40
              <main_arena>, p=0x7ffd7d6e79a0,
              have_lock=<optimized out>) at malloc.c:4321<br>
              #5  0x0000000000410187 in dhcp_netid_free
              (nid=0x7ffd7d6e79b0) at option.c:1019<br>
              #6  0x0000000000410258 in dhcp_netid_list_free (netid=0x0)
              at option.c:1050<br>
              #7  0x00000000004102c9 in dhcp_config_free
              (config=0x2273950) at option.c:1068<br>
              #8  0x000000000041c313 in clear_dynamic_conf () at
              option.c:5186<br>
              #9  0x000000000041c3bd in reread_dhcp () at option.c:5219<br>
              #10 0x0000000000428a11 in clear_cache_and_reload
              (now=1650633404) at dnsmasq.c:1694<br>
              #11 0x0000000000428303 in async_event (pipe=10,
              now=1650633404) at dnsmasq.c:1450<br>
              #12 0x0000000000427cf4 in main (argc=3,
              argv=0x7ffd7d6e81a8) at dnsmasq.c:1193<br>
            </blockquote>
            <div>It looks like there is some memory management issue
              about dhcp tag</div>
            <div>I found another related fact that if I just start
              dnsmasq and reload it, or dnsmasq only receive dhcp packet
              from UNKNOWN mac address and reload it, dnsmasq will NOT
              core dumped when reloading, so I guess that the issue
              maybe related to progress of DHCP packet</div>
            <div>That is all about I found about core dumped issue when
              reloading, I'm looking forward for someone found similar
              problem or have idea about this issue</div>
            <div><br>
            </div>
            <div>Thanks</div>
            <div>Han Bing</div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Dnsmasq-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk">Dnsmasq-discuss@lists.thekelleys.org.uk</a>
<a class="moz-txt-link-freetext" href="https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss">https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Petr Menšík
Software Engineer
Red Hat, <a class="moz-txt-link-freetext" href="http://www.redhat.com/">http://www.redhat.com/</a>
email: <a class="moz-txt-link-abbreviated" href="mailto:pemensik@redhat.com">pemensik@redhat.com</a>
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB</pre>
  </body>
</html>