Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fstrm causing the process to block on a "stuck" socket #69

Open
borjam opened this issue May 31, 2022 · 1 comment · May be fixed by #72
Open

fstrm causing the process to block on a "stuck" socket #69

borjam opened this issue May 31, 2022 · 1 comment · May be fixed by #72

Comments

@borjam
Copy link

borjam commented May 31, 2022

I discovered this by testing bind 9.16 and 9.18 with dnstap.

In particular I was wondering about the scenario in which the named daemon would be feeding dnstap data to a misbehaving dnstap server process via a Unix domain socket.

So I created a dnstap server process and, after named connected to the socket, I sent it a STOP signal so that it would stop consuming data from the socket.

After running a benchark I saw it wasn't affecting named (it didn't stop serving queries, etc) but when trying to do a clean shutdown of the named process (either via rndc stop or a kill -TERM) it turns out the named process hungs until I either kill the dnstap server process or I resume it with a KILL -CONT.

I filed a bug for bind, [https://gitlab.isc.org/isc-projects/bind9/-/issues/3382] and after verifying the issue they point to a bug in fstrm. Copying from their response, "Some quick analyses show that fstrm blocks on read(2), so fstrm_iothr_destroy() hangs while waiting for pthread_join() to complete."

The bug report on ISCs Gitlaba contains a crude ktrace done on FreeBSD and a simple program they wrote to check the issue on fstrm.

@cmikk
Copy link
Contributor

cmikk commented Jun 1, 2022

Thank you for this report. We will look in to addressing this blocking issue in fstrm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants