Skip to content

Fix for aie_status#87

Merged
jvillarre merged 2 commits into
Xilinx:masterfrom
predutta:aieStatusFix
Jun 26, 2026
Merged

Fix for aie_status#87
jvillarre merged 2 commits into
Xilinx:masterfrom
predutta:aieStatusFix

Conversation

@predutta

Copy link
Copy Markdown
Collaborator

Fix AIE Status teardown hang when used with AIE Profile on Edge

AIEStatusPlugin::endPollforDevice performed the final status JSON write before stopping its background polling threads (pollDeadlock and writeStatus). During hw context teardown, that left concurrent AIE register/sysfs access and could hang the process on exit (observed on VEK280 with both aie_profile and aie_status enabled). Reorder teardown to call endPoll() first, then perform the final write.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reorders teardown in AIEStatusPlugin::endPollforDevice() to stop background polling threads before performing the final AIE status JSON write, preventing teardown hangs caused by concurrent AIE register/sysfs access on Edge platforms.

Changes:

  • Move “last chance” status report write to occur after endPoll() stops and joins background threads.
  • Add explanatory comments documenting the teardown hang scenario and rationale for ordering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +521 to +526
// Last chance at writing status reports
for (auto w : writers) {
mtxWriterThread.lock();
w->write(false, handle);
mtxWriterThread.unlock();
}
predutta added 2 commits June 26, 2026 11:52
Signed-off-by: predutta <predutta@amd.com>
Signed-off-by: predutta <predutta@amd.com>
@jvillarre jvillarre merged commit ac5643e into Xilinx:master Jun 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants