The state_store.py that is responsible for writing the checkpoint_dir under $SPLUNK_HOME/var/lib/splunk/modinputs/misp_*_input does not handle invalid JSON, including empty files.
This functionallity is for continuing partial or chunked ingestions.
When the state file is empty, due to a crash or potentially bad times restart; instead of interpreting this as "we don't have a saved state" and starting over a JSON parsing exception is not being handled.
json.load in state_store.py:get_state().
The
state_store.pythat is responsible for writing the checkpoint_dir under$SPLUNK_HOME/var/lib/splunk/modinputs/misp_*_inputdoes not handle invalid JSON, including empty files.This functionallity is for continuing partial or chunked ingestions.
When the state file is empty, due to a crash or potentially bad times restart; instead of interpreting this as "we don't have a saved state" and starting over a JSON parsing exception is not being handled.
json.loadinstate_store.py:get_state().