watchdog: fix another possible watchdog timeout #619
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
dlt_daemon_process_user_message_log prior to this
commit was running without limit, meaning when a lot of messages have to be transmitted dlt-daemon might
be killed by systemd watchdog due to being busy
with sending and not updating the watchdog anymore. This commit introduces a timeout in dlt_daemon_process_user_message_log which allows this function to run at most watchdog_trigger_interval seconds.
This MR extends the logic introduced in #595 as the original commit still allowed systemd to kill dlt-daemon
To test we need the following things
Excecute the script below on your test system.
It spawns a lot of dlt-receive proceses, the goal is for dlt-daemon to survive.
The program was tested solely for our own use cases, which might differ from yours.
Licensed under Mozilla Public License Version 2.0
Alexander Mohr, alexander.m.mohr@mercedes-benz.com, Mercedes-Benz Tech Innovation GmbH, imprint