[External] nslookup issues

Graham Clinch g.clinch at lancaster.ac.uk
Tue Sep 13 21:35:44 UTC 2022


On 13/09/2022 21:09, Casey Deccio wrote:

> After rerunning nrpe-ng with the following:
> sudo strace --read=4 -F /usr/bin/python3 /usr/sbin/nrpe-ng --debug -f --config /etc/nagios/nrpe-ng.cfg
> 
> I see the following in the debug output on Host B:
> 
> [pid 1390861] read(4, "nslookup: ./src/unix/core.c:570:"..., 4096) = 83
>  | 00000  6e 73 6c 6f 6f 6b 75 70  3a 20 2e 2f 73 72 63 2f  nslookup: ./src/ |
>  | 00010  75 6e 69 78 2f 63 6f 72  65 2e 63 3a 35 37 30 3a  unix/core.c:570: |
>  | 00020  20 75 76 5f 5f 63 6c 6f  73 65 3a 20 41 73 73 65   uv__close: Asse |
>  | 00030  72 74 69 6f 6e 20 60 66  64 20 3e 20 53 54 44 45  rtion `fd > STDE |
>  | 00040  52 52 5f 46 49 4c 45 4e  4f 27 20 66 61 69 6c 65  RR_FILENO' faile |
>  | 00050  64 2e 0a                                          d..              |

I suspect nrpe-ng is closing stdin before launching nslookup.


With mac homebrew's build of bind 9.18.6 and a bit of shell redirection to close stdin, I get:

---
$ /opt/homebrew/bin/nslookup -version
nslookup 9.18.6

$ /opt/homebrew/bin/nslookup example.net 0<&-
[... usual output snipped ...]

Assertion failed: (fd > STDERR_FILENO), function uv__close, file core.c, line 602.
Abort trap: 6

$ echo $?
134
---


This might count as a regression of sorts from the migration to libuv, as older nslookup doesn't fail in the same way:

---
$ /usr/bin/nslookup -version
nslookup 9.10.6

$ /usr/bin/nslookup example.net 0<&-
[... usual output snipped ...]

$ echo $?
0
---


(dig & delv are also affected in the same way)

The cmake group came across the same situation with libuv and open missing standard fds against /dev/null to compensate:
https://gitlab.kitware.com/cmake/cmake/-/merge_requests/3282


Graham


More information about the bind-users mailing list