-
Notifications
You must be signed in to change notification settings - Fork 19
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
dtprobed: force_reparse signal safety #95
Comments
Yeah, as the envvar suggests it's a pure testing feature. Nothing outside the testsuite should ever use it, and the dtprobed that is hit by this signal is running one very specific test and except on a hilariously slow (XZ81-class) system is not going to be doing a reparse_dof when the signal hits. Anyone running with _DTRACE_TESTING set is going to find much odder things going on (dtrace's very output format changes). Can we just say "don't do that then"? We could always add an extra check that dtprobed is running out of the source tree, but that means more file I/O as root... |
I'm happy to introduce some other way to say "force reparsing now so we can test it", but the only one that springs to mind is another ioctl (!) which is much harder from a shell script. |
On Wed, Aug 28, 2024 at 08:41:02AM -0700, Nick Alcock wrote:
I'm happy to introduce some other way to say "force reparsing now so we can
test it", but the only one that springs to mind is another ioctl (!) which is
much harder from a shell script.
How about compiling dtprobed without this debugging code in general, and only
compile one (perhaps a dtprobed-tst or something) with this code compiled in
that isused for the test? That renders the test development-only but I think
that might perhaps be preferable to having this code in a production version?
… |
"Don't do that then" would be OK but I think I prefer Kris' suggestion to just never install the code to begin with. I don't feel strongly. |
In
dtprobed/dtprobed.c
, we do:force_reparse
callsfuse_log
which doesn't appear guaranteed to be AS-safe (https://github.com/libfuse/libfuse/blob/d30247c36dadd386b994cd47ad84351ae68cc94c/lib/fuse_log.c#L77, it might even try to syslog), but worse, we callreparse_dof
which does bunch of I/O and more complex things.This isn't likely to be a big problem in reality, not least because it's gated by an envvar, but still.
The text was updated successfully, but these errors were encountered: