Closed jnhmn closed 3 years ago
strace_isc-dhcp-server-ipv6.log Hello,
I have too a Segmentation fault
on a Netgear R7800
with isc-dhcp-server-ipv6
on OpenWRT 19.07.2
.
You can find included output of strace. How can I help ?
Kind Regards
I'm getting exactly the same problem in an Alpine docker instance, so this may be an upstream problem.
Setting ddns-update-style to none stops it from crashing, though obviously that means the DNS server isn't getting updated.
I don't have time to dig deep on this but if someone finds a patch upstream I'll either refresh the package to a new version containing the fix or backport it if it's not yet released...
Hello,
Many thanks for your return.
Before reverting my device back from 19.07.2
to 18.06.2
and loosing all I updated isc-dhcp-*
4.4.1
packages with some isc patches and then to the last 4.4.2 version and using ever the same configuration ... segmentation fault
Then I have reverted back the R7800
device to 18.06.2
.
I have recreated all interfaces, VLAN, routing rules ... and other configuration on this device taking into account that R7800
is less supported on 18.06.2 (many updates for this devices with 19.07.2 as for other devices).
Using bind
and isc-dhcp-server-ipv6
18.06.2
stock version (Bind 9.11.14-1
/ isc-dhcp-server-ipv6 4.4.1-3
) and exactly and same bind configuration, zone file and dhcpd configuration ... no segmentation fault
.
Then I have I have backported bind
19.07.2
stock version (Bind 9.14.8-1
/ isc-dhcp-server-ipv6 4.4.1-3
) to 18.06.2
using buildsystem and with exactly the same bind configuration, zone file and dhcpd configuration ... no segmentation fault
. Then from 4.4.1 + patches to 4.4.2 ... no segmentation fault
Then using a proxmox server and a light ubuntu 18.04 server VM with Bind and dhcpd with same amount of RAM, interfaces, VLAN and using same conf files for bind to dhcpd ... no segmentation fault
If I am not discouraged and have time, I would do all these tests again with the latest 18.06
release thus 18.06.8
I'm not a developer, how can I diagnose this and report this to upstream or someone else ?
Thanks you in advance for your return.
PS: I would like to apologize for my English language mistakes. Kind Regards
It sounds like the issue might be architecture dependent, so I'm not surprised that you can't reproduce it on an x86-based VM.
Can you bisect it on the R7800 itself by trying different package versions (on master
or 19.07.02
) until you find the point that the regression crept in?
Thanks
You also might be able to run Qemu/KVM on a Raspberry Pi4 and emulate ARM execution.
Hi,
I am also getting the same issue with an Archer C7 v2 running 19.07.3, r11063-85e04e9f46 - both dhcp and bind installed locally. Have tried both the ipv4 and ipv6 packages.
The apparent sequence of events appears to be: Start DHCP DHCPDISCOVER received DHCPOFFER sent DHCPREQUEST received DHCPACK sent Segfault
On the bind side of things, the A & TXT records are created in my zone file, the .jnl is created/updated, but nothing happens with the reverse zone (which is also configured as per pre-update)
Looks like it may be the same as this: https://gitlab.alpinelinux.org/alpine/aports/issues/10934 with the equivalent of this bind patch fixing it: https://gitlab.isc.org/isc-projects/bind9/-/commit/daade37977fafee12c7b3c1483516e010d2b74a6
If I can work out how to build a version & install with this patch myself I'll let you know if it works.
Can confirm applying the code edit from my second link to openwrt/build_dir/target-mips_24kc_musl/isc-dhcp-ipv6/dhcp-4.4.1/bind/bind-9.11.2-P1/lib/isc/nls/msgcat.c and re-compiling dhcpd (actually, recompiling nls, then lib, then bind-9.11.2-P1, then bind, then dhcp-4.4.1 for exact reproduction steps) fixes the issue.
This method did increase my dhcpd binary's size from 1.9Mb to 2.6Mb which I found odd... but it works now at least.
I updated a TP-Link Archer C2600 from an old snapshot to stable 19.07.3 and this issue appeared, using isc-dhcp-server-ipv4.
Tried to compile the existing package with the above linked patch using the build systems patch folder, but can't figure out how to get it to apply with the multiple layers of archives. Also tried compiling 4.4.2, since it was released a few days after said patch was committed, but that also ended in quick failure due to missing includes.
For the moment, I've disabled dynamic dns on my network, just to keep it from being completely offline, but hope to see this fixed soon to get features back to par.
Looking at how the NLS is built, it's from a tarball taken from tar that's embedded in the dhcp tarball itself. So it can't easily be patched because exploding bind/bind.tar.gz
until after patches have been applied.
Further, looking at the dhcp-4.4.2-RELNOTES
file, it doesn't look like this (2020/1/13) was submitted in time for the 4.4.2 release (2020/1/22).
heho... my problem was not to apply patches, i have done weirder things with the build system :-) it is my first post on github ever, as i do not like toooooo much accounts... but as others are facing this problem. here are my patches, put them in the patches folder...
--- /dev/null +++ b/bind/010-ddns.patch @@ -0,0 +1,27 @@ +diff --git a/lib/isc/nls/msgcat.c b/lib/isc/nls/msgcat.c +index ab09b9457942ff359af6cdc5babbac53d13e53a0..dd3d177fb3968c2f16e18ac8dca226f5ed8667a4 100644 +--- a/lib/isc/nls/msgcat.c ++++ b/lib/isc/nls/msgcat.c +@@ -62,9 +62,8 @@ isc_msgcat_open(const char *name, isc_msgcat_t **msgcatp) { +
+@@ -112,8 +111,9 @@ isc_msgcat_get(isc_msgcat_t *msgcat, int set, int message,
+- if (msgcat == NULL) ++ if (msgcat == NULL || msgcat->catalog == (nl_catd)(-1)) {
--- a/bind/Makefile.in +++ b/bind/Makefile.in @@ -42,6 +42,9 @@ bind1: echo ${bindsrcdir} already unpacked... ; \ else \ gunzip -c bind.tar.gz | tar xf - ; \
patch -p1 < 010-ddns.patch) ; \ fi
sorry if not useful ... m first post on github ;-)
@mannimammut76
Hello,
May I ask you to upload all your patches files on github (in your message) please ?
You can attach your files just with a drag and drop at the bottom of the message field (after the dotted line).
And where to put them .. if patches folder is feeds/packages/net/isc-dhcp/patches
?
Sorry i'm not an expert of the build system :(
It would be very nice.
Thank you in advance
Kind Regards
Hi everybody, What is the current status of this issue? I have encountered the same problem that with 19.07, a DDNS update causes a segmentation fault. Is it possible to provide a package update to an existing release?
Many thanks for your help & kind regards!
This might have been fixed by PR #14196. Please retest.
I picked the above mentioned change back to 19.07 and built the ipv4 server package, then pushed it to a tp-link archer c2600. It is working with ddns-update-style set to standard. Can that change be officially backported to stable?
Sorry, which PR's are you asking to be cherry-picked where?
https://github.com/openwrt/packages/pull/14196 to 19.07. To fix the crash on the current stable releases.
14196 to 19.07. To fix the crash on the current stable releases.
@webgeek1234 See PR #14715.
Version 4.4.1-4, which is now available via opkg, does fix the crash. Which resolves this issue for me.
Works for me, too.
I would suggest to close this issue
Thank you very much :)
Maintainer: @pprindeville Environment: ar71xx-generic-archer-c7-v2 (v19.07.2)
Description: While trying to send DDNS Updates to an ISC Bind9 Server (9.10.3-P4-Debian) the DHCP Server terminates with an segfault. The same config file works with an Openwrt 18.06.2
/etc/dhcpd.conf
:/root/ddns.key
:Diffconfig:
Stacktrace:
I can attach a gdb session to the affected daemon, if you need further details. But I have no debugging experience.