Avoid pending of containerized applications in case of aborting #481
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.
PULL REQUEST DESCRIPTION
This pull request contains the proposed solution for the issue:
#480
Similar issue was solved in PR:
#419
Our containerized application (running in Docker container PID 1) was tested with crashing due to SIGABRT signal. After SIGABRT was dropped then unfortunatlly infinite SIGSEGV signals were also started to drop. So the infinite loop stucked since the kill signal doesn't stop the infinite loop when running in Docker container with PID 1. Similar solution was happened in this PR: #419. We also had to restore the saved signal handlers. Without it infinte SIGSEGV signals were dropped circully and this situation could also cause pending when running in Docker container with PID 1.
The modification does not affect non-containerized native processes (non-PID1) as the final step after the flush is re-emitting the fatal signal (kill) and code execution for the process stops here. This solution enables the containerized process to exit and create a core-dump also in case of aborting scenarios and more generally when different signal(s) occurs after a crash but before the exit.
There are no testing or documentation activities done.
Testing
New/modified code must be backed down with unit test - preferably TDD style development)
This new/modified code was covered by unit tests.
(insight) Was all tests written using TDD (Test Driven Development) style?
The CI (Windows, Linux, OSX) are working without issues.
Was new functionality documented?
The testing steps 1 - 2 below were followed
step 1
step 2: use one of these alternatives to run tests:
ctest
ctest -V
for verbose outputmake test