Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
d0e986a6
Unverified
Commit
d0e986a6
authored
Oct 05, 2020
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dump argv to panic buffer
This is solely to make bug reports more useful
parent
9210c468
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
cache_panic.c
bin/varnishd/cache/cache_panic.c
+18
-0
heritage.h
bin/varnishd/common/heritage.h
+3
-0
mgt_main.c
bin/varnishd/mgt/mgt_main.c
+3
-0
No files found.
bin/varnishd/cache/cache_panic.c
View file @
d0e986a6
...
...
@@ -713,6 +713,22 @@ pan_threadattr(struct vsb *vsb)
}
#endif
static
void
pan_argv
(
struct
vsb
*
vsb
)
{
int
i
;
VSB_printf
(
pan_vsb
,
"argv = {
\n
"
);
VSB_indent
(
vsb
,
2
);
for
(
i
=
0
;
i
<
heritage
.
argc
;
i
++
)
{
VSB_printf
(
vsb
,
"[%d] = "
,
i
);
VSB_quote
(
vsb
,
heritage
.
argv
[
i
],
-
1
,
VSB_QUOTE_CSTR
);
VSB_cat
(
vsb
,
",
\n
"
);
}
VSB_cat
(
vsb
,
"}
\n
"
);
VSB_indent
(
vsb
,
-
2
);
}
/*--------------------------------------------------------------------*/
static
void
__attribute__
((
__noreturn__
))
...
...
@@ -781,6 +797,8 @@ pan_ic(const char *func, const char *file, int line, const char *cond,
if
(
err
)
VSB_printf
(
pan_vsb
,
"errno = %d (%s)
\n
"
,
err
,
vstrerror
(
err
));
pan_argv
(
pan_vsb
);
VSB_printf
(
pan_vsb
,
"pthread.self = %p
\n
"
,
TRUST_ME
(
pthread_self
()));
q
=
THR_GetName
();
...
...
bin/varnishd/common/heritage.h
View file @
d0e986a6
...
...
@@ -89,6 +89,9 @@ struct heritage {
unsigned
min_vcl_version
;
unsigned
max_vcl_version
;
int
argc
;
char
*
const
*
argv
;
};
extern
struct
heritage
heritage
;
...
...
bin/varnishd/mgt/mgt_main.c
View file @
d0e986a6
...
...
@@ -489,6 +489,9 @@ main(int argc, char * const *argv)
struct
vsb
*
vsb
;
pid_t
pid
;
heritage
.
argc
=
argc
;
heritage
.
argv
=
argv
;
setbuf
(
stdout
,
NULL
);
setbuf
(
stderr
,
NULL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment