> On Sep 13, 2022, at 3:35 PM, Graham Clinch <g.cli...@lancaster.ac.uk> wrote:
> 
> 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
> ---
> 

Nice find!!

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

Could be.  At the very least it's a behavioral difference, which affects some 
packages that depend on it.  I'll leave it to the BIND devs to determine if/how 
to handle it.

> (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

I've patched the code for nrpe_ng, and it works!

$ diff -u /usr/lib/python3/dist-packages/nrpe_ng/commands.py{.old,}
--- /usr/lib/python3/dist-packages/nrpe_ng/commands.py.old      2017-08-08 
13:05:02.000000000 -0600
+++ /usr/lib/python3/dist-packages/nrpe_ng/commands.py  2022-09-13 
17:00:36.767239885 -0600
@@ -85,6 +85,7 @@
 
         proc = tornado.process.Subprocess(
             run_args,
+            stdin=subprocess.DEVNULL,
             stdout=tornado.process.Subprocess.STREAM,
             close_fds=True,
             env=env)

I'll request that something get pushed upstream.  Many thanks for help tracking 
that down!

Casey
-- 
Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from 
this list

ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

Reply via email to