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

Fix: interruption signal not terminating the process when spamming <C-c> #478

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

teocns
Copy link
Contributor

@teocns teocns commented Oct 31, 2024

Fixes #477

agentops/client.py Outdated Show resolved Hide resolved
@teocns
Copy link
Contributor Author

teocns commented Nov 1, 2024

After further consideration, addressing this at the root is essential. While this fix works, it only addresses the surface issue.

Looking at the Session implementation everything made more sense; threading components are being used, indicating that somewhere the Session state is left in an inconsistent state, specifically and presumably happening as Control+C will initiate re-entry into a circuit whose state was left "open"; this is very common side effects caused by improper threading.Lock implementation, like in this case.

…sing atexit and signal

refactor(session.py): streamline end_session logic to improve readability and maintainability
@areibman
Copy link
Contributor

areibman commented Nov 1, 2024

Cool fix. I've had this issue a number of times but hard to replicate and pin down when/why. A test script that's able to replicate + show the fix would be much appreciated

@teocns
Copy link
Contributor Author

teocns commented Nov 3, 2024

Closing in favor of #486

@teocns teocns closed this Nov 3, 2024
@teocns teocns reopened this Nov 14, 2024
@teocns
Copy link
Contributor Author

teocns commented Nov 14, 2024

Let's merge this for now until core refactoring is ready

Copy link
Contributor

@areibman areibman left a comment

Choose a reason for hiding this comment

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

Merge for now

@teocns
Copy link
Contributor Author

teocns commented Nov 18, 2024

Not convincing, need to review

@teocns teocns marked this pull request as draft November 18, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: inconsistent SIGINT behavior
2 participants