-
Notifications
You must be signed in to change notification settings - Fork 245
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
fix crash when stopping/restarting with an invalid pidfile #440
Conversation
in node directory
Oh by the way, a node with an invalid PID file does not start. Is this intended behavior? |
Patch looks good to me. As far as "what to do", it does seem somewhat safer to not-start .. but by the same token, and invalid PID file could mean anything and if you just did |
Exactly, that is roughly what I considered. |
@warner any thoughts? I think we should merge this, and then also possibly merge something that just deletes a completely-invalid PID file and then keeps going. |
Codecov Report
@@ Coverage Diff @@
## master #440 +/- ##
==========================================
+ Coverage 87.91% 87.92% +0.01%
==========================================
Files 148 148
Lines 27553 27557 +4
Branches 3953 3953
==========================================
+ Hits 24222 24230 +8
+ Misses 2621 2614 -7
- Partials 710 713 +3
Continue to review full report at Codecov.
|
Add a test for the non-numeric pidfile contents case
\o/ Good job everyone |
BTW, we're planning on deprecating |
I use Tahoe as an vehicle for some fault injection experiments.
For a reason I am not interested in, a node ended up with an empty PID file in its directory (maybe due to a forced VM crash?).
When trying to stop or restart the node, it crashed since it did not handle non-numeric values in the PID file.
This PR attempts to fix this issue.
I decided to not remove the broken PID file, so operators can investigate if they wish to do so.