-
Notifications
You must be signed in to change notification settings - Fork 91
Tcp server fix #696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Tcp server fix #696
Conversation
|
Can one of the admins verify this patch? |
|
ok to test |
|
retest this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses debugger queue attachment issues by moving the attachment point earlier in the lifecycle and commenting out detachment logic. The changes work around NPU limitations in configuring active hardware contexts during debugging.
Key changes:
- Debugger queue attachment moved from
handle_attach()to constructor initialization - Detachment logic commented out to prevent premature queue removal
- Debug command submission logic improved with better synchronization and logging
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/shim/umq/tcp_server.cpp | Moves debugger queue attachment to constructor and disables dynamic attach/detach handlers |
| src/shim/umq/hwctx.h | Removes unnecessary blank line |
| src/shim/umq/dbg_hwq.cpp | Fixes command submission synchronization and adds diagnostic logging |
| src/shim/umq/dbg_cmd.h | Corrects duplicate macro value for DBG_PKT_INVALID |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| // issue ioctl to attach the dbg hsa queue | ||
| std::map<uint32_t, size_t> buf_sizes; | ||
| buf_sizes[0] = 32; //we don't care size |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after '//' comment delimiter. Should be '// we don't care size'.
| buf_sizes[0] = 32; //we don't care size | |
| buf_sizes[0] = 32; // we don't care size |
| #if 0 | ||
| // issue ioctl to attach the dbg hsa queue | ||
| std::map<uint32_t, size_t> buf_sizes; | ||
| buf_sizes[uc_index] = 0; //we don't care size | ||
|
|
||
| m_dbg_umq.get_dbg_umq_bo()->config(m_hwctx, buf_sizes); | ||
| shim_debug("TCP server ioctl: debugger attach\n"); | ||
| #endif | ||
|
|
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using #if 0 to comment out code is less maintainable than removing it entirely or using a feature flag. Consider removing this dead code or documenting why it's preserved with a TODO comment.
| #if 0 | |
| // issue ioctl to attach the dbg hsa queue | |
| std::map<uint32_t, size_t> buf_sizes; | |
| buf_sizes[uc_index] = 0; //we don't care size | |
| m_dbg_umq.get_dbg_umq_bo()->config(m_hwctx, buf_sizes); | |
| shim_debug("TCP server ioctl: debugger attach\n"); | |
| #endif |
we don't have a better solution in npu to set debugger q
before we have a better solution, we change to
this is still a good/useful feature to debug a control code hang though. better than nothing.