Do not generate coredump on VM fault signal event
Skip coredump generation when receiving HSA_STATUS_ERROR_MEMORY_FAULT. We also receive a system error of type HSA_EVENTTYPE_MEMORY and generate the coredump there. Trying to generate coredump from 2 places sometimes causes unnecessary error message because both places try to create a coredump file with the same name. Change-Id: If3f03bab2c24ad71dfeff39ab411bb9ac08b337e Signed-off-by: David Yat Sin <David.YatSin@amd.com>
Cette révision appartient à :
@@ -1290,21 +1290,6 @@ bool AqlQueue::ExceptionHandler(hsa_signal_value_t error_code, void* arg) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Fallback if KFD does not support GPU core dump. In this case, there core dump is
|
||||
// generated by hsa-runtime.
|
||||
if (!core::Runtime::runtime_singleton_->KfdVersion().supports_core_dump &&
|
||||
queue->agent_->isa()->GetMajorVersion() != 11) {
|
||||
|
||||
if (pcs::PcsRuntime::instance()->SessionsActive())
|
||||
fprintf(stderr, "GPU core dump skipped because PC Sampling active\n");
|
||||
else if (amd::coredump::dump_gpu_core())
|
||||
fprintf(stderr, "GPU core dump failed\n");
|
||||
// supports_core_dump flag is overwritten to avoid generate core dump file again
|
||||
// caught by a different exception handler. Such as VMFaultHandler.
|
||||
core::Runtime::runtime_singleton_->KfdVersion(
|
||||
core::Runtime::runtime_singleton_->KfdVersion().supports_exception_debugging, true);
|
||||
}
|
||||
|
||||
for (auto& error : QueueErrors) {
|
||||
if (error_code & (1 << (error.code - 1))) {
|
||||
errorCode = error.status;
|
||||
@@ -1322,6 +1307,21 @@ bool AqlQueue::ExceptionHandler(hsa_signal_value_t error_code, void* arg) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Fallback if KFD does not support GPU core dump. In this case, there core dump is
|
||||
// generated by hsa-runtime.
|
||||
if (!core::Runtime::runtime_singleton_->KfdVersion().supports_core_dump &&
|
||||
queue->agent_->isa()->GetMajorVersion() != 11) {
|
||||
|
||||
if (pcs::PcsRuntime::instance()->SessionsActive())
|
||||
fprintf(stderr, "GPU core dump skipped because PC Sampling active\n");
|
||||
else if (amd::coredump::dump_gpu_core())
|
||||
fprintf(stderr, "GPU core dump failed\n");
|
||||
// supports_core_dump flag is overwritten to avoid generate core dump file again
|
||||
// caught by a different exception handler. Such as VMFaultHandler.
|
||||
core::Runtime::runtime_singleton_->KfdVersion(
|
||||
core::Runtime::runtime_singleton_->KfdVersion().supports_exception_debugging, true);
|
||||
}
|
||||
|
||||
queue->Suspend();
|
||||
if (queue->errors_callback_ != nullptr) {
|
||||
queue->errors_callback_(errorCode, queue->public_handle(), queue->errors_data_);
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur