-
Notifications
You must be signed in to change notification settings - Fork 802
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 stack getter segfault caused by is_shutting_down and gil #9681
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: daquexian <[email protected]>
BBuf
approved these changes
Jan 3, 2023
Signed-off-by: daquexian <[email protected]>
liujuncheng
approved these changes
Jan 4, 2023
Speed stats:
|
CI failed when running job: cuda-misc. PR label automerge has been removed |
Speed stats:
|
View latest API docs preview at: https://staging.oneflow.info/docs/Oneflow-Inc/oneflow/pr/9681/ |
mergify bot
added a commit
that referenced
this pull request
Mar 22, 2023
1. <del>#4737 这个很早之前的 PR 在 python 退出后会跳过 tensor 的析构,导致 oom,当时这么做的原因已经不记得了,现在来看不跳过也想不到会有什么问题,所以本 PR 恢复为正常执行析构。</del> 更新:CI 遇到问题,待进一步定位,这个 PR 先不包含这部分改动了。 原 oom 问题可能和 #9681 这个 PR 把设置 is_shutting_down 的时机提前了有关 3. 修复线程不安全导致的 python stack getter 偶发 segfault 的 bug --------- Signed-off-by: daquexian <[email protected]> Co-authored-by: oneflow-ci-bot <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes https://github.com/Oneflow-Inc/OneTeam/issues/1861 ,在 TryCloseDefaultSession 之前设置 is_shutting_down 为 true(#9502 这个 PR 在 TryCloseDefaultSession 里引入了 Sync 操作),并把 python c 对象的指针保存在 PyFrame 对象里,GetCurrentFrame 里不再需要重复获取,修复因为没有拿到 gil 锁导致的 segfault