Bug#1035967: ypserv: yphelper, yppush fail to run with segmentation fault
Hi all, I was encountering the same issue on a slave NIS machine. Adding the hostname of the master in the /etc/hosts file does work around this bug. I have additionally had a look at the source code of yphelper. It seems that there is a bug in function get_canonical_hostname which can read the ai_canonname of the addrinfo structure, although it may be NULL. My understanding is that modifying the /etc/hosts file makes this field non-null, and thus avoids this bug. I have also reported this bug upstream: https://github.com/thkukuk/ypserv/issues/19 Cheers, Laurent Voisin.
Bug#1035967: ypserv: yphelper, yppush fail to run with segmentation fault
On 12/05/2023 13:32, Francesco P. Lovergine wrote: On Fri, May 12, 2023 at 01:01:24PM +0100, Robert Pumphrey wrote: Thank you for the fast response. On the NIS master, I have moved the domain directory /var/yp/domain to a backup. I then ran /usr/lib/yp/ypinit -m and added the IP addresses of the NIS slaves. This ran successfully. /usr/lib/yp/yphelper --hostname runs successfully on the master. /usr/lib/yp/yphelper --maps nameofnismaster runs successfully on the master and gives a list of maps. This is quite strange, because in moving from bullseye to bookworm no chages in the binary gdbm files have been required in my test. Test done after generating maps in bullseye. Are your current maps older than that? Even, I'm assuming you are on a amd64 arch. I am on amd64. I have ensured that the slaves have the hostname of the NIS master in /etc/hosts and it now works. On buster, this must not have been an issue, but obviously is a hard requirement for bullseye. I guess the only remaining problem really is that yphelper seg faults if the names are not in /etc/hosts, which is not ideal, but also now not a show stopper for me. Thank you for helping me. I have noticed that if the /etc/hosts file does not have an entry for local machine, then /usr/lib/yp/yphelper --hostname seg faults. This is expressly mandatory in NIS configuration, as by documentation. Every hostname used must be resolved at /etc/hosts level. Anyway that should not cause a segfault but an error, indeed. That seems an upstream issue (or several for each tool). All the other trials could be a direct consequence of that. The NIS master now looks to be operating correctly. On one of the NIS slaves, I moved the domain directory /var/yp/domain to a backup. I then ran /usr/lib/yp/ypinit -s nameofnismaster and I get a segmentation fault, followed by Can't enumerate maps from name>. Please check that it is running. /usr/lib/yp/yphelVper --hostname runs successfully on the slave /usr/lib/yp/yphelper --maps nameofnismaster seg faults So I have made some progress. Please let me know if there is anything else I can tell you. Regards Rob On 12/05/2023 10:09, Francesco P. Lovergine wrote: tags 1035967 + moreinfo unreproducible thanks Hi Rob, I just verified with a fresh installation of bookworm and it perfectly works. My first hypothesis could be about a gdbm-related breakage. It is somethig already seen in the past and even annotatedi at sect.9 of the Debian HOWTO. NEVER CROSS THE STREAMS (cit.). GDBM is quite weak in managing changes in file formats due to external conditions (e.g. changes in compiler/optimizations/ecc.) Could you plese run yptest on your serveri and send anomalies in result? Is this a single NIS master or do you have slaves ? Could you please regenerate gdbm stuff by ypinit -m after cleaning up maps? Anywyay, my next step will be preparing an upgrading box to test bullseye->bookworm, stay tuned. On Thu, May 11, 2023 at 07:55:26PM +, Rob Pumphrey wrote: Package: ypserv Version: 4.1-2 Severity: important Dear Maintainer, Recently upgraded our NIS master from buster to bullseye. when I run cd /var/yp; make several apps fail to run and seg fault, for example /usr/lib/yp/yphelper --hostname Segmentation fault yppush -d example.com ypservers Segmentation fault makedbm does appear to make valid files when run from the cmd line -- System Information: Debian Release: 11.7 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 5.10.0-22-amd64 (SMP w/4 CPU threads) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages ypserv depends on: ii hostname 3.23 ii libc6 2.31-13+deb11u6 ii libcrypt1 1:4.4.18-4 ii libgdbm6 1.19-2 ii libnsl2 1.3.0-2 ii libsystemd0 247.3-7+deb11u2 ii libtirpc3 1.3.1-1+deb11u1 ii lsb-base 11.1.0 ii make 4.3-4.1 ii rpcbind [portmap] 1.2.5-9 ii ucf 3.0043 Versions of packages ypserv recommends: ii yp-tools 4.2.3-3 Versions of packages ypserv suggests: pn krb5-kdc ii ypbind-mt 2.7.2-2 -- no debconf information -- Certus Technology Associates Limited. http://www.certus-tech.com Tel: +44 (0)114 272 5081 -- Certus Technology Associates Limited. http://www.certus-tech.com Tel: +44 (0)114 272 5081
Bug#1035967: ypserv: yphelper, yppush fail to run with segmentation fault
On Fri, May 12, 2023 at 01:01:24PM +0100, Robert Pumphrey wrote: Thank you for the fast response. On the NIS master, I have moved the domain directory /var/yp/domain to a backup. I then ran /usr/lib/yp/ypinit -m and added the IP addresses of the NIS slaves. This ran successfully. /usr/lib/yp/yphelper --hostname runs successfully on the master. /usr/lib/yp/yphelper --maps nameofnismaster runs successfully on the master and gives a list of maps. This is quite strange, because in moving from bullseye to bookworm no chages in the binary gdbm files have been required in my test. Test done after generating maps in bullseye. Are your current maps older than that? Even, I'm assuming you are on a amd64 arch. I have noticed that if the /etc/hosts file does not have an entry for local machine, then /usr/lib/yp/yphelper --hostname seg faults. This is expressly mandatory in NIS configuration, as by documentation. Every hostname used must be resolved at /etc/hosts level. Anyway that should not cause a segfault but an error, indeed. That seems an upstream issue (or several for each tool). All the other trials could be a direct consequence of that. The NIS master now looks to be operating correctly. On one of the NIS slaves, I moved the domain directory /var/yp/domain to a backup. I then ran /usr/lib/yp/ypinit -s nameofnismaster and I get a segmentation fault, followed by Can't enumerate maps from name>. Please check that it is running. /usr/lib/yp/yphelVper --hostname runs successfully on the slave /usr/lib/yp/yphelper --maps nameofnismaster seg faults So I have made some progress. Please let me know if there is anything else I can tell you. Regards Rob On 12/05/2023 10:09, Francesco P. Lovergine wrote: tags 1035967 + moreinfo unreproducible thanks Hi Rob, I just verified with a fresh installation of bookworm and it perfectly works. My first hypothesis could be about a gdbm-related breakage. It is somethig already seen in the past and even annotatedi at sect.9 of the Debian HOWTO. NEVER CROSS THE STREAMS (cit.). GDBM is quite weak in managing changes in file formats due to external conditions (e.g. changes in compiler/optimizations/ecc.) Could you plese run yptest on your serveri and send anomalies in result? Is this a single NIS master or do you have slaves ? Could you please regenerate gdbm stuff by ypinit -m after cleaning up maps? Anywyay, my next step will be preparing an upgrading box to test bullseye->bookworm, stay tuned. On Thu, May 11, 2023 at 07:55:26PM +, Rob Pumphrey wrote: Package: ypserv Version: 4.1-2 Severity: important Dear Maintainer, Recently upgraded our NIS master from buster to bullseye. when I run cd /var/yp; make several apps fail to run and seg fault, for example /usr/lib/yp/yphelper --hostname Segmentation fault yppush -d example.com ypservers Segmentation fault makedbm does appear to make valid files when run from the cmd line -- System Information: Debian Release: 11.7 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 5.10.0-22-amd64 (SMP w/4 CPU threads) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages ypserv depends on: ii hostname 3.23 ii libc6 2.31-13+deb11u6 ii libcrypt1 1:4.4.18-4 ii libgdbm6 1.19-2 ii libnsl2 1.3.0-2 ii libsystemd0 247.3-7+deb11u2 ii libtirpc3 1.3.1-1+deb11u1 ii lsb-base 11.1.0 ii make 4.3-4.1 ii rpcbind [portmap] 1.2.5-9 ii ucf 3.0043 Versions of packages ypserv recommends: ii yp-tools 4.2.3-3 Versions of packages ypserv suggests: pn krb5-kdc ii ypbind-mt 2.7.2-2 -- no debconf information -- Certus Technology Associates Limited. http://www.certus-tech.com Tel: +44 (0)114 272 5081 -- Francesco P. Lovergine
Bug#1035967: ypserv: yphelper, yppush fail to run with segmentation fault
Thank you for the fast response. On the NIS master, I have moved the domain directory /var/yp/domain to a backup. I then ran /usr/lib/yp/ypinit -m and added the IP addresses of the NIS slaves. This ran successfully. /usr/lib/yp/yphelper --hostname runs successfully on the master. /usr/lib/yp/yphelper --maps nameofnismaster runs successfully on the master and gives a list of maps. I have noticed that if the /etc/hosts file does not have an entry for local machine, then /usr/lib/yp/yphelper --hostname seg faults. The NIS master now looks to be operating correctly. On one of the NIS slaves, I moved the domain directory /var/yp/domain to a backup. I then ran /usr/lib/yp/ypinit -s nameofnismaster and I get a segmentation fault, followed by Can't enumerate maps from name>. Please check that it is running. /usr/lib/yp/yphelper --hostname runs successfully on the slave /usr/lib/yp/yphelper --maps nameofnismaster seg faults So I have made some progress. Please let me know if there is anything else I can tell you. Regards Rob On 12/05/2023 10:09, Francesco P. Lovergine wrote: tags 1035967 + moreinfo unreproducible thanks Hi Rob, I just verified with a fresh installation of bookworm and it perfectly works. My first hypothesis could be about a gdbm-related breakage. It is somethig already seen in the past and even annotatedi at sect.9 of the Debian HOWTO. NEVER CROSS THE STREAMS (cit.). GDBM is quite weak in managing changes in file formats due to external conditions (e.g. changes in compiler/optimizations/ecc.) Could you plese run yptest on your serveri and send anomalies in result? Is this a single NIS master or do you have slaves ? Could you please regenerate gdbm stuff by ypinit -m after cleaning up maps? Anywyay, my next step will be preparing an upgrading box to test bullseye->bookworm, stay tuned. On Thu, May 11, 2023 at 07:55:26PM +, Rob Pumphrey wrote: Package: ypserv Version: 4.1-2 Severity: important Dear Maintainer, Recently upgraded our NIS master from buster to bullseye. when I run cd /var/yp; make several apps fail to run and seg fault, for example /usr/lib/yp/yphelper --hostname Segmentation fault yppush -d example.com ypservers Segmentation fault makedbm does appear to make valid files when run from the cmd line -- System Information: Debian Release: 11.7 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 5.10.0-22-amd64 (SMP w/4 CPU threads) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages ypserv depends on: ii hostname 3.23 ii libc6 2.31-13+deb11u6 ii libcrypt1 1:4.4.18-4 ii libgdbm6 1.19-2 ii libnsl2 1.3.0-2 ii libsystemd0 247.3-7+deb11u2 ii libtirpc3 1.3.1-1+deb11u1 ii lsb-base 11.1.0 ii make 4.3-4.1 ii rpcbind [portmap] 1.2.5-9 ii ucf 3.0043 Versions of packages ypserv recommends: ii yp-tools 4.2.3-3 Versions of packages ypserv suggests: pn krb5-kdc ii ypbind-mt 2.7.2-2 -- no debconf information -- Certus Technology Associates Limited. http://www.certus-tech.com Tel: +44 (0)114 272 5081
Bug#1035967: ypserv: yphelper, yppush fail to run with segmentation fault
severity 1035967 normal thanks On Fri, May 12, 2023 at 11:09:50AM +0200, Francesco P. Lovergine wrote: tags 1035967 + moreinfo unreproducible thanks Hi Rob, I just verified with a fresh installation of bookworm and it perfectly works. My first hypothesis could be about a gdbm-related breakage. It is somethig already seen in the past and even annotatedi at sect.9 of the Debian HOWTO. NEVER CROSS THE STREAMS (cit.). GDBM is quite weak in managing changes in file formats due to external conditions (e.g. changes in compiler/optimizations/ecc.) Could you plese run yptest on your serveri and send anomalies in result? Is this a single NIS master or do you have slaves ? Could you please regenerate gdbm stuff by ypinit -m after cleaning up maps? Anywyay, my next step will be preparing an upgrading box to test bullseye->bookworm, stay tuned. ... and as promised, I just tested an upgrade of a NIS server successfully. Services are all operational and the pointed binaries do not issue a segfault. In order to undestand your problem, I need to have details about your configuration, and eventually also pinned packages, additional repos etc. Feel free to send that stuff off-bugs.d.o to protect your site information, eventually. Thanks. On Thu, May 11, 2023 at 07:55:26PM +, Rob Pumphrey wrote: Package: ypserv Version: 4.1-2 Severity: important Dear Maintainer, Recently upgraded our NIS master from buster to bullseye. when I run cd /var/yp; make several apps fail to run and seg fault, for example /usr/lib/yp/yphelper --hostname Segmentation fault yppush -d example.com ypservers Segmentation fault makedbm does appear to make valid files when run from the cmd line -- System Information: Debian Release: 11.7 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 5.10.0-22-amd64 (SMP w/4 CPU threads) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages ypserv depends on: ii hostname 3.23 ii libc6 2.31-13+deb11u6 ii libcrypt1 1:4.4.18-4 ii libgdbm6 1.19-2 ii libnsl21.3.0-2 ii libsystemd0247.3-7+deb11u2 ii libtirpc3 1.3.1-1+deb11u1 ii lsb-base 11.1.0 ii make 4.3-4.1 ii rpcbind [portmap] 1.2.5-9 ii ucf3.0043 Versions of packages ypserv recommends: ii yp-tools 4.2.3-3 Versions of packages ypserv suggests: pn krb5-kdc ii ypbind-mt 2.7.2-2 -- no debconf information -- Francesco P. Lovergine -- Francesco P. Lovergine
Bug#1035967: ypserv: yphelper, yppush fail to run with segmentation fault
tags 1035967 + moreinfo unreproducible thanks Hi Rob, I just verified with a fresh installation of bookworm and it perfectly works. My first hypothesis could be about a gdbm-related breakage. It is somethig already seen in the past and even annotatedi at sect.9 of the Debian HOWTO. NEVER CROSS THE STREAMS (cit.). GDBM is quite weak in managing changes in file formats due to external conditions (e.g. changes in compiler/optimizations/ecc.) Could you plese run yptest on your serveri and send anomalies in result? Is this a single NIS master or do you have slaves ? Could you please regenerate gdbm stuff by ypinit -m after cleaning up maps? Anywyay, my next step will be preparing an upgrading box to test bullseye->bookworm, stay tuned. On Thu, May 11, 2023 at 07:55:26PM +, Rob Pumphrey wrote: Package: ypserv Version: 4.1-2 Severity: important Dear Maintainer, Recently upgraded our NIS master from buster to bullseye. when I run cd /var/yp; make several apps fail to run and seg fault, for example /usr/lib/yp/yphelper --hostname Segmentation fault yppush -d example.com ypservers Segmentation fault makedbm does appear to make valid files when run from the cmd line -- System Information: Debian Release: 11.7 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 5.10.0-22-amd64 (SMP w/4 CPU threads) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages ypserv depends on: ii hostname 3.23 ii libc6 2.31-13+deb11u6 ii libcrypt1 1:4.4.18-4 ii libgdbm6 1.19-2 ii libnsl21.3.0-2 ii libsystemd0247.3-7+deb11u2 ii libtirpc3 1.3.1-1+deb11u1 ii lsb-base 11.1.0 ii make 4.3-4.1 ii rpcbind [portmap] 1.2.5-9 ii ucf3.0043 Versions of packages ypserv recommends: ii yp-tools 4.2.3-3 Versions of packages ypserv suggests: pn krb5-kdc ii ypbind-mt 2.7.2-2 -- no debconf information -- Francesco P. Lovergine
Bug#1035967: ypserv: yphelper, yppush fail to run with segmentation fault
Package: ypserv Version: 4.1-2 Severity: important Dear Maintainer, Recently upgraded our NIS master from buster to bullseye. when I run cd /var/yp; make several apps fail to run and seg fault, for example /usr/lib/yp/yphelper --hostname Segmentation fault yppush -d example.com ypservers Segmentation fault makedbm does appear to make valid files when run from the cmd line -- System Information: Debian Release: 11.7 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 5.10.0-22-amd64 (SMP w/4 CPU threads) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages ypserv depends on: ii hostname 3.23 ii libc6 2.31-13+deb11u6 ii libcrypt1 1:4.4.18-4 ii libgdbm6 1.19-2 ii libnsl21.3.0-2 ii libsystemd0247.3-7+deb11u2 ii libtirpc3 1.3.1-1+deb11u1 ii lsb-base 11.1.0 ii make 4.3-4.1 ii rpcbind [portmap] 1.2.5-9 ii ucf3.0043 Versions of packages ypserv recommends: ii yp-tools 4.2.3-3 Versions of packages ypserv suggests: pn krb5-kdc ii ypbind-mt 2.7.2-2 -- no debconf information