-
Notifications
You must be signed in to change notification settings - Fork 387
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
Backtrace improvements for utilities #4116
base: master
Are you sure you want to change the base?
Conversation
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.
The second patch is easier to review with the --ignore-all-space
option (or ?w=1
query string on github).
bugwash: we should enable back-traces outside of The developer mode should always be assumed by |
Bumping this. I assume this can be merged after a rebase? |
I think @bsdphk insisted that we do not make this the default, that it should be controlled in So I don't think it was acceptable as-is. |
I don't remember why @bsdphk didn't want VUTs to give a back-trace by default and only add them to [1] random shot fired |
I agree with "if configurable, then through environment variables". But my question remains what the worry is about having backtraces. Thinking about it I realize that being able to turn the abort handler off has in fact been helpful in the past (I am having trouble though remembering exactly why, but it had something to do with getting a proper backtrace in a debugger (might have been on Solaris?) for just the abort from a SIGSEGV and not if the handler was active). So I think that would be more important than just turning the backtrace off. |
bugwash: send to syslog (suggested by phk), enable always |
62d977e
to
47fa36d
Compare
@asadsa92 is this ready? If yes, would you please rebase+squash? |
This is useful when printing a backtrace into a fixed size buffer. Suggested-by: Dridi Boukelmoune <dridi.boukelmoune@gmail.com> Signed-off-by: Asad Sajjad Ahmed <asadsa@varnish-software.com>
Signed-off-by: Asad Sajjad Ahmed <asadsa@varnish-software.com>
Signed-off-by: Asad Sajjad Ahmed <asadsa@varnish-software.com>
Yes, thanks for the reminder, it is now done. |
VSB_printf(vsb, "Backtrace:\n"); | ||
VSB_indent(vsb, 2); | ||
VBT_format(vsb); | ||
VSB_indent(vsb, -2); |
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.
The unindent statement is a no-op.
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.
That's true, but it was kept to maintain symmetry here. If you want I can remove it.
This PR adds a default back-trace to all asserts outside of varnishd, e.g., varnishstat.
Also add back-trace to varnishtest asserts.
Example (artificially crafted asserts):
Before:
After:
Before:
After