Fix soft hang on AQLQueue destruction with a timeout
Add timeout to AQLQueue destructor signal wait to prevent indefinite hang
Change-Id: I6c6c98a7bdd27d39569af1d667aa9aa7e9596535
Signed-off-by: Chris Freehill <cfreehil@amd.com>
[ROCm/ROCR-Runtime commit: 4e9647704d]
This commit is contained in:
کامیت شده توسط
Chris Freehill
والد
14f6875df2
کامیت
abc4fcabb5
@@ -365,8 +365,11 @@ AqlQueue::~AqlQueue() {
|
|||||||
// Remove kfd exception handler
|
// Remove kfd exception handler
|
||||||
exceptionState |= ERROR_HANDLER_TERMINATE;
|
exceptionState |= ERROR_HANDLER_TERMINATE;
|
||||||
while ((exceptionState & ERROR_HANDLER_DONE) != ERROR_HANDLER_DONE) {
|
while ((exceptionState & ERROR_HANDLER_DONE) != ERROR_HANDLER_DONE) {
|
||||||
|
const uint64_t timeout_ms = 5000;
|
||||||
|
|
||||||
exception_signal_->StoreRelease(-1ull);
|
exception_signal_->StoreRelease(-1ull);
|
||||||
exception_signal_->WaitRelaxed(HSA_SIGNAL_CONDITION_NE, -1ull, -1ull, HSA_WAIT_STATE_BLOCKED);
|
exception_signal_->WaitRelaxed(HSA_SIGNAL_CONDITION_NE, -1ull, timeout_ms,
|
||||||
|
HSA_WAIT_STATE_BLOCKED);
|
||||||
}
|
}
|
||||||
|
|
||||||
Inactivate();
|
Inactivate();
|
||||||
|
|||||||
مرجع در شماره جدید
Block a user