rhel8/9: host (1) and dig(1) crash if user close file descriptors in shell script
Issue
A shell script always crashes with following error, if user close file descriptor in the script.
When I execute following sample script, the dig(1) coredump.
#!/bin/bash
exec < "dummy.txt"
while read LINE
do
echo "Read line"
done
exec <&-
dig yahoo.co.jp
dig and host crash:
$ host yahoo.co.jp
host: src/unix/core.c:580: uv__close: Assertion `fd > STDERR_FILENO' failed.
$ dig yahoo.co.jp
dig: src/unix/core.c:580: uv__close: Assertion `fd > STDERR_FILENO' failed.
Questions:
(1) Can Red Hat report the symptom to libuv upstream developer and fix?
(2) Can Red Hat report the symptom to bind upstream developer and fix?
(3) Can Red Hat advice our customer how to avoid the issue by writing better script?
Root cause of this symptom is reported in upstream github.
https://github.com/libuv/libuv/issues/2962
https://github.com/libuv/libuv/issues/2062
https://bugzilla.redhat.com/show_bug.cgi?id=2233692
Environment
- Red Hat Enterprise Linux (RHEL) 8 and 9
- RHEL8:
- various bind9.16* packages
- libuv
- RHEL9:
- various bind* packages
- libuv
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.