Skip to content
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

Unable to attach with GDB when hitting GGML_ASSERT after backend v2 changes #630

Closed
YavorGIvanov opened this issue Dec 4, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@YavorGIvanov
Copy link
Collaborator

I use VS Code to debug a program through the Remote - SSH plugin with GDB. After this change:
image

made in this PR #586 I am getting the bellow message, when I hit a ggml assert and gdb is unable to attach to the process.

GGML_ASSERT: /path/ggml/src/ggml-backend.c:56: false
Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
warning: process 30496 is already traced by process 30490
ptrace: Operation not permitted.
No stack.

If I replace ggml_print_backtrace(); with abort() it works as before (attaching with gdb as expected)

@YavorGIvanov YavorGIvanov added the bug Something isn't working label Dec 4, 2023
@slaren
Copy link
Collaborator

slaren commented Dec 4, 2023

Does this cause any issues? It's just meant to show a backtrace as a debugging aid, it is ok if in some cases it cannot be shown.

@slaren
Copy link
Collaborator

slaren commented Dec 4, 2023

The exit call was already replaced with abort in the llama.cpp repo, so that will be fixed on the next sync.

@YavorGIvanov
Copy link
Collaborator Author

YavorGIvanov commented Dec 4, 2023

The only issue was that the debugger didn't stop and let me inspect the program state due to the missing abort() call. As you mention that exit is replaced with abort in llama.cpp -> I am closing this.

@ggerganov
Copy link
Owner

Will likely sync after #625 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants