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

tools/trace: don't raise an exception in a ctype callback #4763

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

jeromemarchand
Copy link
Contributor

To exit the tool when the maximal number of event is reached (-M option), the tool currently call exit(), which raise a SystemExit exception. The handling of exception from ctype callback doesn't seem straightforward and dependent on python version.

This patch avoid the issue altogether by using a global variable instead.

Closes #3049

To exit the tool when the maximal number of event is reached (-M
option), the tool currently call exit(), which raise a SystemExit
exception. The handling of exception from ctype callback doesn't seem
straightforward and dependent on python version.

This patch avoid the issue altogether by using a global variable
instead.

Closes iovisor#3049

Signed-off-by: Jerome Marchand <[email protected]>
@yonghong-song
Copy link
Collaborator

I still cannot reproduce the issue in my local environment. But looks some people do hit this issue and the fix looks good to me. So I will go ahead to merge it. Thanks!

@yonghong-song yonghong-song merged commit 5e3bb28 into iovisor:master Nov 6, 2023
11 checks passed
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.

/usr/share/bcc/tools/trace cannot exit from loops
2 participants