-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Fix thread_local initializtion in C10 WarningHandler. #34822
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
Conversation
💊 CircleCI build failures summary and remediationsAs of commit 6ac55bc (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no CircleCI failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions on the GitHub issue tracker. This comment has been revised 21 times. |
facebook-github-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HapeMask has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
smessmer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix looks good but I think we should factor this out into a singleton-like function, i.e. make warning_handler_ private on something and have a get_warning_handler() function that returns it and initializes it before if necessary. This way, we can make sure we never access it while uninitialized.
c3567d1 to
32f6d8b
Compare
facebook-github-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HapeMask has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: The Windows + MSVC-specific bug discussed here: pytorch#19394 and fixed here: pytorch#22405 still appears in C10's warning handler class. This results in a crash if a user attempts to run code which would print a warning when that code is running inside a thread created by a DLL. This PR applies a similar fix to that of pytorch#22405. Pull Request resolved: pytorch#34822 Test Plan: * Tested locally by running CodecverseWorkbench Unity app with patched build. * CI Differential Revision: D20627971 Pulled By: HapeMask fbshipit-source-id: 64dfca531ed7eebbe9e0ecac3d3d4d025c683883
Summary: The Windows + MSVC-specific bug discussed here: #19394 and fixed here: #22405 still appears in C10's warning handler class. This results in a crash if a user attempts to run code which would print a warning when that code is running inside a thread created by a DLL. This PR applies a similar fix to that of #22405. Pull Request resolved: #34822 Test Plan: * Tested locally by running CodecverseWorkbench Unity app with patched build. * CI Differential Revision: D20627971 Pulled By: HapeMask fbshipit-source-id: 64dfca531ed7eebbe9e0ecac3d3d4d025c683883
The Windows + MSVC-specific bug discussed here: #19394 and fixed here: #22405 still appears in C10's warning handler class. This results in a crash if a user attempts to run code which would print a warning when that code is running inside a thread created by a DLL. This PR applies a similar fix to that of #22405.