From: "Steven Levine" Received: from [192.168.100.201] (HELO mail.2rosenthals.com) by 2rosenthals.com (CommuniGate Pro SMTP 5.4.10) with ESMTP id 10080008 for ecs-isp@2rosenthals.com; Fri, 28 Jun 2024 04:09:59 -0400 Received: from secmgr-va.2rosenthals.com ([50.73.8.217]:47983 helo=mail2.2rosenthals.com) by mail.2rosenthals.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1sN6g2-000000008Lq-13PJ for ecs-isp@2rosenthals.com; Fri, 28 Jun 2024 04:09:50 -0400 Received: from mta-202b.earthlink-vadesecure.net ([51.81.232.241]:59601 helo=mta-202a.earthlink-vadesecure.net) by mail2.2rosenthals.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.97.1) (envelope-from ) id 1sN6fu-000000007sS-07qi for ecs-isp@2rosenthals.com; Fri, 28 Jun 2024 04:09:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; bh=UaKn0a+kdk+KpfT39iR7AanF6Atfxroui3nsA8 RJK4M=; c=relaxed/relaxed; d=earthlink.net; h=from:reply-to:subject: date:to:cc:resent-date:resent-from:resent-to:resent-cc:in-reply-to: references:list-id:list-help:list-unsubscribe:list-subscribe:list-post: list-owner:list-archive; q=dns/txt; s=dk12062016; t=1719562180; x=1720166980; b=V96ehKimgTzbqslJAxKDquZ2FzJck9mv/+oLTIfo3f/RhAtC9NaQ6Iv XYv84fmrGFzPZ9+XPCfFeQ6ktD55XiqBEk8nsta8uBd3P4EIEGnzf96TNs1Vuq9A7dPloYX oFZ7Vm23HrjUHTUhY6sDicl6dhtqBqyKGXs9QIu/VAB4s2y6rbgUFz2gsTSMLcAQeOyURyH prwGq6qOuJ7cAPAtQY11ehkYEgyjTOr/oyiiCS/NTuCZMQirc0h8NxBr2pjTdpJYi5c/F+i edNTDyUWYqkzAxVAvik1+2nFV2aoVdv4LpkloaeiDtTYwKWnQXuB90N1YT2m+n6ubf6p1GB Kvw== Received: from slamain ([172.56.189.10]) by vsel2nmtao02p.internal.vadesecure.com with ngmta id baf4089c-17dd1cb14e85d974; Fri, 28 Jun 2024 08:09:40 +0000 Message-ID: <667e6328.20.mr2ice.fgrirsq@earthlink.net> Date: Fri, 28 Jun 2024 00:15:52 -0700 To: "eCS ISP Mailing List" In-Reply-To: Subject: Re: [eCS-ISP] Bind 9.11.37 issue - ticket #784 - update Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable X-Mailer: MR/2 Internet Cruiser Edition for OS/2 v3.00.11.24/60 In , on 06/28/24 at 07:26 AM, "Paul Smedley" said: Hi Paul, >I got around to looking at this this morning.@Steven I'm assuming the >select call at lib\isc\unix\socket.c=A0 is the one you had in mind to ad= d >the timeout to? Yes, that should be the one. In the isc sources it's lib\isc\unix\socket.c:4377 cc =3D select(maxfd, manager->read_fds_copy, manager->write_fds_copy, NULL, NULL); The select is wrapped in a do while loop so the net effect of a timeout should be to re-issue the select which is what we want. BTW, I may have mentioned that I finally tracked down the code that cause= s the database dump to be corrupted on a slave dns server. The code path i= s dns_master_dump3 -> opentmp -> isc_file_bopenunique -> isc_file_openuniquemode because we have lib\dns\masterdump.c:1826 if (format =3D=3D dns_masterformat_text) result =3D isc_file_openunique(tempname, &f); else result =3D isc_file_bopenunique(tempname, &f); The problem is since we use the unix version of file.c, isc_file_bopenunique does not set O_BINARY. This is technically wrong, but not a problem on linux because O_TEXT and O_BINARY are effectively nops. In our case the dump file that should be binary gets spurious NLs inserte= d and the resulting binary database file is corrupt. This slows down the slave server a bit because it needs to fully rebuild its internal databas= e which means it needs to contact the master dns. I'm sure the corruption would be logged if the logging was configured to log this kind of error. Fixing this is a bit messy. Since we have lib\isc\unix\file.c:388 isc_result_t isc_file_bopenuniquemode(char *templet, int mode, FILE **fp) { return (isc_file_openuniquemode(templet, mode, fp)); } There's no easy way to pass the O_BINARY flag without creating a helper function that both isc_file_bopenuniquemode and isc_file_openuniquemode can call. The helper function would take an additional argument that would pass either O_TEXT or O_BINARY. Steven -- ---------------------------------------------------------------------- "Steven Levine" Warp/DIY/BlueLion etc. www.scoug.com www.arcanoae.com www.warpcave.com ----------------------------------------------------------------------