Skip to content

Conversation

@sergey-miryanov
Copy link
Contributor

@sergey-miryanov sergey-miryanov commented Nov 1, 2025

Mostly a PoC now.

skip_current_tstate was added to prevent the modification of tests that use the check_dump_traceback_later function. The faulthandler_thread is now in the traceback and has no Python frames, so the output of those tests may change. This is okay, as the faulthandler_thread doesn't have one.

@vstinner
Copy link
Member

vstinner commented Nov 2, 2025

I don't think that this change is correct. By design, faulthandler can be called on a deadlock. It should be able to dump the Python traceback without acquiring any kind of lock since Python may already been blocked somehow.

I wrote a different fix #140921 to detect invalid/freed frame or code object.

@sergey-miryanov
Copy link
Contributor Author

Yeah, if we should avoid any locking at all costs then this fix is not correct. I will close this one and take a look at your #140921.

Thanks!

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.

3 participants