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 maximum recursion depth triggered on exception exit #3519

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

kebe7jun
Copy link

Fix #3518

Motivation

Modifications

Checklist

  • Format your code according to the Code Formatting with Pre-Commit.
  • Add unit tests as outlined in the Running Unit Tests.
  • Update documentation / docstrings / example tutorials as needed, according to Writing Documentation.
  • Provide throughput / latency benchmark results and accuracy evaluation results as needed, according to Benchmark and Profiling and Accuracy Results.
  • For reviewers: If you haven't made any contributions to this PR and are only assisting with merging the main branch, please remove yourself as a co-author when merging the PR.

@zhaochenyang20
Copy link
Collaborator

Hey I don't think this fix the error:

Your current patch only addresses scenarios where SIGKILL might not be effective by adding an additional SIGQUIT attempt. It does not prevent psutil from entering a deep recursion when invoked in a signal handler to inspect the current process’s children.

To fully resolve the RecursionError it's better to refactor the signal-handling approach—avoiding complex psutil calls inside the signal handler—and/or update how you gather and kill child processes.

@kebe7jun
Copy link
Author

Thanks, I will review it later and modify it.

@zhaochenyang20
Copy link
Collaborator

@kebe7jun Have you done it?

@kebe7jun
Copy link
Author

kebe7jun commented Feb 18, 2025

I tried reproducing locally, but without success, can you provide some inspirations?
This patch should solve the problem.

@zhaochenyang20
Copy link
Collaborator

@kebe7jun I will merge it thanks.

@kebe7jun
Copy link
Author

@zhaochenyang20 hi, can this pr be merged?

@zhaochenyang20
Copy link
Collaborator

@kebe7jun If the CI goese well. I will merge it later...

@kebe7jun
Copy link
Author

kebe7jun commented Feb 25, 2025

@zhaochenyang20 ci goes well.

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.

[Bug] maximum recursion depth exceeded
2 participants