Skip to content
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

Avoid pending of containerized applications in case of aborting #481

Merged
merged 2 commits into from
Mar 8, 2023

Conversation

GergoTot
Copy link
Contributor

@GergoTot GergoTot commented Mar 3, 2023

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

mkdir build; cd build; cmake -DADD_G3LOG_UNIT_TEST=ON ..

// linux/osx alternative, simply run: ./scripts/buildAndRunTests.sh

step 2: use one of these alternatives to run tests:

  • Cross-Platform: ctest
  • or ctest -V for verbose output
  • Linux: make test

GergoTot added 2 commits March 3, 2023 11:28
…er with PID 1 aborted

Our service (running in Docker and PID 1) was crashed with SIGABRT signal. After SIGABRT 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. We used the similar solution mentioned this PR: KjellKod#419. We also had to restore the saved signal handlers. Without it infinte SIGSEGV signals were dropped circully and this situation also caused pending when running in Docker container with PID 1.
@GergoTot GergoTot mentioned this pull request Mar 3, 2023
@KjellKod KjellKod merged commit 5323480 into KjellKod:master Mar 8, 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