<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;"><div>Hello DNS Masq,<br></div><div><br></div><div>While using dnsmasq as part of libvirt I've noticed that my /etc/hosts prevents my VMs from starting. I looked through the system logs and found that it was DNS Masq that was crashing causing my VMs to not have any network (not even DHCP or any ip connectivity).<br><br>I'm using NixOS and using StevenBlack hosts to block ads on my system.<br><br>I sorted /etc/hosts lines by length and then performed a binary search to cut down the longest lines one by one.</div><div><br></div><div>What I found was that once the lines get to <=57 chars dnsmasq is able to start with no problems.<br></div><div><br></div><div>Please see my change log here for what I've done on my system:<br><a target="_blank" href="https://github.com/StevenBlack/hosts/compare/master...yuannan:hosts:short">https://github.com/StevenBlack/hosts/compare/master...yuannan:hosts:short</a><br><br><br>Versions:<br>- dnsmasq: dnsmasq-2.92rel2<br>- nixos: NixOS 26.11 (Zokor) x86_64</div><div>- kernel: Linux 7.0.10-zen1 x86_64<br>- libvirt: 12.2.0<br><br>Logs:<br>```Jun 03 22:21:07 aurelius systemd-coredump[326471]: [🡕] Process 326466 (dnsmasq) of user 65534 dumped core.</div><div> <br></div><div> Module /nix/store/s6fgvggs1rh0qq88z64xp2ais3kq19m7-dnsmasq-2.92rel2/bin/dnsmasq without build-id.<br></div><div> Module libncursesw.so.6 without build-id.<br></div><div> Module libedit.so.0 without build-id.<br></div><div> Module libjansson.so.4 without build-id.<br></div><div> Module libxtables.so.12 without build-id.<br></div><div> Module libnftnl.so.11 without build-id.<br></div><div> Module libmnl.so.0 without build-id.<br></div><div> Module libnftables.so.1 without build-id.<br></div><div> Module libgmp.so.10 without build-id.<br></div><div> Module libhogweed.so.6 without build-id.<br></div><div> Module libnettle.so.8 without build-id.<br></div><div> Module libnfnetlink.so.0 without build-id.<br></div><div> Module libnetfilter_conntrack.so.3 without build-id.<br></div><div> Module libidn.so.12 without build-id.<br></div><div> Stack trace of thread 326466:<br></div><div> #0 0x00007351cf89fdcc __pthread_kill_implementation (libc.so.6 + 0x9fdcc)<br></div><div> #1 0x00007351cf84265e raise (libc.so.6 + 0x4265e)<br></div><div> #2 0x00007351cf829350 abort (libc.so.6 + 0x29350)<br></div><div> #3 0x00007351cf82a3c8 __libc_message_impl.cold (libc.so.6 + 0x2a3c8)<br></div><div> #4 0x00007351cf931b79 __fortify_fail (libc.so.6 + 0x131b79)<br></div><div> #5 0x00007351cf931444 __chk_fail (libc.so.6 + 0x131444)<br></div><div> #6 0x00007351cf933193 __strcpy_chk (libc.so.6 + 0x133193)<br></div><div> #7 0x000064cc6d9f669a read_hostsfile (/nix/store/s6fgvggs1rh0qq88z64xp2ais3kq19m7-dnsmasq-2.92rel2/bin/dnsmasq + 0xf69a)<br></div><div> #8 0x000064cc6d9f6caf cache_reload (/nix/store/s6fgvggs1rh0qq88z64xp2ais3kq19m7-dnsmasq-2.92rel2/bin/dnsmasq + 0xfcaf)<br></div><div> #9 0x000064cc6da19a1d clear_cache_and_reload (/nix/store/s6fgvggs1rh0qq88z64xp2ais3kq19m7-dnsmasq-2.92rel2/bin/dnsmasq + 0x32a1d)<br></div><div> #10 0x000064cc6d9f36b8 main (/nix/store/s6fgvggs1rh0qq88z64xp2ais3kq19m7-dnsmasq-2.92rel2/bin/dnsmasq + 0xc6b8)<br></div><div> #11 0x00007351cf82b285 __libc_start_call_main (libc.so.6 + 0x2b285)<br></div><div> #12 0x00007351cf82b338 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x2b338)<br></div><div> #13 0x000064cc6d9f4245 _start (/nix/store/s6fgvggs1rh0qq88z64xp2ais3kq19m7-dnsmasq-2.92rel2/bin/dnsmasq + 0xd245)<br></div><div> ELF object binary architecture: AMD x86-64<br></div><div>```<br><br>Please let me know if there is anything else you need from me, thanks.</div><div><br></div><div class="zmail_signature_below"><div id="" data-zbluepencil-ignore="true" data-sigid="4659405000000159007"><div>Brandon Lin<br></div><div>Managing Director - Emergence Technologies Ltd<br></div></div></div><div><br></div></div><br></body></html>