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

Inject nohup to make sure that bkill executes after ert dies #8936

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xjules
Copy link
Contributor

@xjules xjules commented Oct 10, 2024

Issue
After initiating terminate experiment a window can become unresponsive and thus user might ctrl+c / kill the main ert. nohup makes sure that the bkill will be executed.

Approach
Short description of the approach

(Screenshot of new behavior in GUI if applicable)

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure unit tests pass locally after every commit (git rebase -i main --exec 'pytest tests/ert/unit_tests -n logical -m "not integration_test"')

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Create Backport PR to latest release

@xjules xjules self-assigned this Oct 10, 2024
@@ -414,7 +414,7 @@ async def kill(self, iens: int) -> None:
return_on_msgs=(JOB_ALREADY_FINISHED_BKILL_MSG),
)
await asyncio.create_subprocess_shell(
f"sleep {self._sleep_time_between_bkills}; {self._bkill_cmd} -s SIGKILL {job_id}",
f"nohup sh -c 'sleep {self._sleep_time_between_bkills}; {self._bkill_cmd} -s SIGKILL {job_id}' &",
Copy link
Contributor

@jonathan-eq jonathan-eq Oct 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this would work as we already have start_new_session=True. Can we remove that flag with nohup?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as start_new_session works (I think it does until proven otherwise), start_new_session is the approach to go for.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't got to test it yet. If it works I'll close the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants