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

Do Not Cache PID/TID in Logging #994

Closed
wants to merge 1 commit into from

Conversation

sraikund16
Copy link
Contributor

Summary: S451588 was caused by the LOG macro caching values that would then be copied to other processes via forking. In general, we should probably use fork handlers to clear out said variables, but from a hygiene point of view we should also not be changing control flow based on logging. For this reason, the pid/tid retrieval in logging should get the cached variable if it exists, but never do the caching itself.

Differential Revision: D63668265

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D63668265

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D63668265

sraikund16 added a commit to sraikund16/kineto that referenced this pull request Oct 1, 2024
Summary:
Pull Request resolved: pytorch#994

S451588 was caused by the LOG macro caching values that would then be copied to other processes via forking. In general, we should probably use fork handlers to clear out said variables, but from a hygiene point of view we should also not be changing control flow based on logging. For this reason, the pid/tid retrieval in logging should get the cached variable if it exists, but never do the caching itself.

Differential Revision: D63668265
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D63668265

sraikund16 added a commit to sraikund16/kineto that referenced this pull request Oct 1, 2024
Summary:
Pull Request resolved: pytorch#994

S451588 was caused by the LOG macro caching values that would then be copied to other processes via forking. In general, we should probably use fork handlers to clear out said variables, but from a hygiene point of view we should also not be changing control flow based on logging. For this reason, the pid/tid retrieval in logging should get the cached variable if it exists, but never do the caching itself.

Differential Revision: D63668265
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D63668265

sraikund16 added a commit to sraikund16/kineto that referenced this pull request Oct 1, 2024
Summary:
Pull Request resolved: pytorch#994

S451588 was caused by the LOG macro caching values that would then be copied to other processes via forking. In general, we should probably use fork handlers to clear out said variables, but from a hygiene point of view we should also not be changing control flow based on logging. For this reason, the pid/tid retrieval in logging should get the cached variable if it exists, but never do the caching itself.

Differential Revision: D63668265
Summary:
Pull Request resolved: pytorch#994

S451588 was caused by the LOG macro caching values that would then be copied to other processes via forking. In general, we should probably use fork handlers to clear out said variables, but from a hygiene point of view we should also not be changing control flow based on logging. For this reason, the pid/tid retrieval in logging should get the cached variable if it exists, but never do the caching itself.

Differential Revision: D63668265
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D63668265

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 78737f1.

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.

3 participants