[dnsdist] dnsdist 1.9.4 segfault

Remi Gacogne remi.gacogne at powerdns.com
Tue Jun 4 07:34:10 UTC 2024


Hi,

On 03/06/2024 09:39, Remi Gacogne wrote:
> On 02/06/2024 22:43, Nicolas Baumgarten via dnsdist wrote:
>> we started testing 1.9.4 on centos 7 before upgrading, and it 
>> segfaults, after 20 seconds of running.
> 
> Thanks a lot for reporting this issue! I'll try to reproduce this on 
> CentOS 7 later today, as it doesn't happen in my development setup or in 
> our CI. In the meantime, would you by any chance be able to get a 
> backtrace ("bt full" in gdb) from a core dump, if any has been 
> generated? Or, if you still have the setup laying around and can spare a 
> few minutes, by starting dnsdist inside gdb: "gdb dnsdist" then "run", 
> and once you get to the crash "bt full".

In case anyone else stumbles upon this, the issue seems to be caused by 
a bug in the net-snmp version shipped by EL7. I can reproduce it by 
opening a very large number of file descriptors before starting the SNMP 
thread, which causes the net-snmp provided "run_alarms" function to 
segfault because it uses a deprecated net-snmp function that does not 
support large file descriptors (hence the warning in the logs).
I tried to reproduce this behaviour with a more recent version of 
net-snmp (5.9.4) and I couldn't, so for now I don't think I'll bother 
spending more time on it.
If you are running into this issue, please check how many TCP worker 
threads you are starting with setMaxTCPClientThreads, as it really 
doesn't make sense to start more than a dozen of them in most cases 
since 1.4.0 and legacy configurations sometimes use a very high number 
there.

Best regards,
-- 
Remi Gacogne
PowerDNS.COM BV - https://www.powerdns.com/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.powerdns.com/pipermail/dnsdist/attachments/20240604/ace89f8b/attachment.sig>


More information about the dnsdist mailing list