This repository was archived by the owner on Sep 30, 2026. It is now read-only.
Repository navigation
Conversation
Summary: Move cuptiActivityGetNumDroppedRecords() outside the mutex_ scope in bufferCompleted(). When VLOG_IS_ON(1), this call re-enters CUPTI and needs its internal rwlock, while bufferRequested() acquires mutex_ under that same rwlock - creating a deadlock in multi-threaded environments (free-threaded Python / no-GIL). This follows the same pattern already used in activityBuffers() and clearActivities(), which explicitly release mutex_ before CUPTI calls with the comment: "Can't hold mutex_ during this call". Reviewed By: ngimel Differential Revision: D99314699
cmcgill2
pushed a commit
to cmcgill2/kineto
that referenced
this pull request
Apr 2, 2026
…ytorch#1346) Summary: Move cuptiActivityGetNumDroppedRecords() outside the mutex_ scope in bufferCompleted(). When VLOG_IS_ON(1), this call re-enters CUPTI and needs its internal rwlock, while bufferRequested() acquires mutex_ under that same rwlock - creating a deadlock in multi-threaded environments (free-threaded Python / no-GIL). This follows the same pattern already used in activityBuffers() and clearActivities(), which explicitly release mutex_ before CUPTI calls with the comment: "Can't hold mutex_ during this call". Reviewed By: ngimel Differential Revision: D99314699
meta-codesync Bot
pushed a commit
that referenced
this pull request
Apr 3, 2026
…1347) Summary: Pull Request resolved: #1347 Pull Request resolved: #1346 Move cuptiActivityGetNumDroppedRecords() outside the mutex_ scope in bufferCompleted(). When VLOG_IS_ON(1), this call re-enters CUPTI and needs its internal rwlock, while bufferRequested() acquires mutex_ under that same rwlock - creating a deadlock in multi-threaded environments (free-threaded Python / no-GIL). This follows the same pattern already used in activityBuffers() and clearActivities(), which explicitly release mutex_ before CUPTI calls with the comment: "Can't hold mutex_ during this call". Reviewed By: ngimel Differential Revision: D99314699 fbshipit-source-id: 0f99d4bebf8eb1431b2d43ce17a00e81c3c8d631
ani300
pushed a commit
to IBM/kineto-spyre
that referenced
this pull request
Jul 28, 2026
…(#1347) Summary: Pull Request resolved: pytorch/kineto#1347 Pull Request resolved: pytorch/kineto#1346 Move cuptiActivityGetNumDroppedRecords() outside the mutex_ scope in bufferCompleted(). When VLOG_IS_ON(1), this call re-enters CUPTI and needs its internal rwlock, while bufferRequested() acquires mutex_ under that same rwlock - creating a deadlock in multi-threaded environments (free-threaded Python / no-GIL). This follows the same pattern already used in activityBuffers() and clearActivities(), which explicitly release mutex_ before CUPTI calls with the comment: "Can't hold mutex_ during this call". Reviewed By: ngimel Differential Revision: D99314699 fbshipit-source-id: 0f99d4bebf8eb1431b2d43ce17a00e81c3c8d631 Signed-off-by: Antoni Viros i Martin <[email protected]>
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary:
Move cuptiActivityGetNumDroppedRecords() outside the mutex_ scope in
bufferCompleted(). When VLOG_IS_ON(1), this call re-enters CUPTI and needs
its internal rwlock, while bufferRequested() acquires mutex_ under that same
rwlock - creating a deadlock in multi-threaded environments (free-threaded
Python / no-GIL).
This follows the same pattern already used in activityBuffers() and
clearActivities(), which explicitly release mutex_ before CUPTI calls with
the comment: "Can't hold mutex_ during this call".
Reviewed By: ngimel
Differential Revision: D99314699