[rocprofiler-sdk] users/mcao/fix_rocprofv_counter_yaml - #4760
Conversation
1e89b53 to
c8a6ab4
Compare
17c1daa to
9f886c8
Compare
fe16698 to
4f1e602
Compare
Why do we want to do this instead of aborting? Aborting signals there is a problem right away and handling gracefully here seems like it could cause someone to execute rocprofiler, run it for 2 days, then come back and see no counters and wonder why.
We want these explicitly to fail very loudly. |
I see your point that we should fail loudly for serious invalid input. My concern is that the current abort path can fail with misleading/internal error messages, which makes the real problem harder to diagnose.
|
| hsa_ven_amd_aqlprofile_id_query_t query = {metric.block().c_str(), 0, 0}; | ||
| if(aqlprofile_get_pmc_info(&profile, AQLPROFILE_INFO_BLOCK_ID, &query) != HSA_STATUS_SUCCESS) | ||
| { | ||
| ROCP_DFATAL << fmt::format("AQL failed to query info for counter {}", metric); |
4f1e602 to
fe3d983
Compare
|
This pull request has been inactive for 25 days and will be marked as stale. If you would like to keep this PR open, please:
This PR will be automatically closed in 5 days if no further activity occurs. |
|
This pull request has been automatically closed due to inactivity (30 days with no updates). If you'd like to continue working on this, feel free to reopen the PR or create a new one. |
To be closed. See new PR: #5551
Motivation
Fix SIGSEGV crash in rocprofv3 when invalid counter YAML files are provided via the
-Eflag. Invalid counter definitions should be handled gracefully with warnings rather than aborting the program.Technical Details
YAML Validation Framework:
Added comprehensive validation logic in
metrics.cppanddimensions.cppaccording to the following validation design philosophy:Crash Fix:
Changed
ROCP_DFATALtoROCP_WARNINGinhelpers.cpp:47when AQL profile queries fail. This allows exceptions to propagate properly for error handling inRelWithDebInfobuilds instead of aborting the program.Test Coverage:
Added 11 tests for extra counters. Extra Counters Test Summary:
JIRA ID
AIPROFSDK-22
Test Plan
Test Result
All YAML validation tests pass without crashes. Invalid counter definitions now produce appropriate warning messages and gracefully skip the invalid counters instead of aborting the program.
Submission Checklist