Skip to content

(PDB-5215) Don't crash on resources during sighup #304

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

Merged

Conversation

rbrw
Copy link
Contributor

@rbrw rbrw commented Feb 6, 2023

No description provided.

No reason --config <(echo something) shouldn't be allowed.
@rbrw rbrw requested a review from a team as a code owner February 6, 2023 19:55
@rbrw rbrw force-pushed the pdb-5215-dont-crash-on-resources-during-sighup branch from 1f41032 to 8be4017 Compare February 6, 2023 20:11
rbrw added 7 commits February 6, 2023 14:16
For now, just throw IllegalArgumentException to match the other
config-related errors.
Don't need it, and since we'll need others, it'd be nice to avoid the
clutter.
Allow jvm args so we can adjust the -cp, and then use it in all of the
ext tests, both for consistency and so we're closer to the real
runtime arrangement.  run-all also made it look like that was already
the case.
This can also be run this directly via ext/test/signal-handling after
a "lein uberjar".
Right now, io/resource can crash if the current thread's context class
loader is nil, which can sometimes be the case, and is the case with
current puppetdb versions after startup and before processing any
commands.

Avoid the crash by falling back to the system class loader when the
thread's is nil.

cf. https://clojure.atlassian.net/browse/CLJ-2431

Thanks to Jérôme Charaoui for coming up with the reproduction that
allowed tracking down the problem.
@rbrw rbrw force-pushed the pdb-5215-dont-crash-on-resources-during-sighup branch from 8be4017 to a640031 Compare February 6, 2023 20:16
@austb austb merged commit 0debf32 into puppetlabs:main Feb 7, 2023
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 this pull request may close these issues.

2 participants