mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-25 23:15:51 +03:00
[GH-ISSUE #222] [BUG] Panics lack context #1094
Labels
No labels
CLI
bug
designing
documentation
duplicate
enhancement
good first issue
good first issue
help wanted
idea
invalid
investigate
needs-more-info
performance
pr-welcome
pull-request
question
wontfix
work in progress
work in progress
work-around-available
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asynq#1094
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bojanz on GitHub (Jan 6, 2021).
Original GitHub issue: https://github.com/hibiken/asynq/issues/222
Originally assigned to: @hibiken on GitHub.
Describe the bug
Asynq's panic handling only logs the error, without any stack trace information:
This can make it difficult to debug a panic, which is often generic (e.g. "runtime error: invalid memory address or nil pointer dereference").
Could we at least add the triggering line and file to the output? That would look something like this:
Since this is still just a suggestion, I did not test the runtime.Caller() line to see if we're skipping the right number of stacks, the numbers might need to be bumped by 1.
@hibiken commented on GitHub (Jan 6, 2021):
@bojanz Thank you for pointing this out!
I'll see if we can include more meaningful context in the error itself.
At a minimum we should be logging the panic info when we recover from a panic.