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

Restore CTRL-C handling by setting new flag in libmamba #340

Merged
merged 23 commits into from
Nov 2, 2023

Conversation

dholth
Copy link
Contributor

@dholth dholth commented Oct 28, 2023

Description

mamba-org/mamba#1594 is the issue in Mamba. Possibly for the solver only we could have a second boolean on context init that skipped mamba's pthread call entirely.

Fix #337

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Oct 28, 2023
@jaimergp
Copy link
Contributor

See for the proper fix upstream too: mamba-org/mamba#2946

@dholth dholth changed the title Call pthred_sigmask to restore CTRL-C handling Call pthread_sigmask to restore CTRL-C handling Oct 28, 2023
@dholth
Copy link
Contributor Author

dholth commented Oct 28, 2023

Haven't figured out the correct windows signal incantation yet.

@jaimergp jaimergp mentioned this pull request Oct 30, 2023
3 tasks
@jaimergp
Copy link
Contributor

libmamba 1.5.3 is out already so we might not need the workaround after all. Let's rerun things.

@jaimergp jaimergp closed this Oct 31, 2023
@jaimergp jaimergp reopened this Oct 31, 2023
@dholth
Copy link
Contributor Author

dholth commented Oct 31, 2023

Is that "skip signal handling" true, or false by default?

@jaimergp
Copy link
Contributor

jaimergp commented Nov 1, 2023

Linux and macOS are failing for unrelated reasons (fixed in #347). Windows tests fail because (I hope) the test is not sending the right signal to the subprocess. Need to debug locally.

@dholth dholth changed the title Call pthread_sigmask to restore CTRL-C handling Restore CTRL-C handling by setting new flag in libmamba Nov 1, 2023
tests/test_workarounds.py Outdated Show resolved Hide resolved
tests/test_workarounds.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@jaimergp
Copy link
Contributor

jaimergp commented Nov 2, 2023

Seems to be working now! I can't test Windows locally but I'm assuming the tests are fine.

@jezdez
Copy link
Member

jezdez commented Nov 2, 2023

Ran the tests on Windows 11 again and confirmed manually the working of CTRL+C to cancel both collecting repodata and solving.

@jakirkham
Copy link
Member

Thanks all! 🙏

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Nov 2, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed [bot] added once the contributor has signed the CLA locked [bot] locked due to inactivity
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Handle CTRL-C gracefully when using conda-libmamba-solver
5 participants