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
8dfa782a
Commit
8dfa782a
authored
Feb 10, 2017
by
Federico G. Schwindt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dump loaded VMODs and related details under panic
parent
95d8b34e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
1 deletion
+25
-1
cache_panic.c
bin/varnishd/cache/cache_panic.c
+4
-1
cache_priv.h
bin/varnishd/cache/cache_priv.h
+1
-0
cache_vrt_vmod.c
bin/varnishd/cache/cache_vrt_vmod.c
+20
-0
No files found.
bin/varnishd/cache/cache_panic.c
View file @
8dfa782a
...
...
@@ -398,6 +398,7 @@ pan_busyobj(struct vsb *vsb, const struct busyobj *bo)
if
(
bo
->
stale_oc
)
pan_objcore
(
vsb
,
"ims"
,
bo
->
stale_oc
);
VCL_Panic
(
vsb
,
bo
->
vcl
);
VMOD_Panic
(
vsb
);
VSB_indent
(
vsb
,
-
2
);
VSB_printf
(
vsb
,
"},
\n
"
);
}
...
...
@@ -462,6 +463,7 @@ pan_req(struct vsb *vsb, const struct req *req)
pan_http
(
vsb
,
"resp"
,
req
->
resp
);
VCL_Panic
(
vsb
,
req
->
vcl
);
VMOD_Panic
(
vsb
);
if
(
req
->
body_oc
!=
NULL
)
pan_objcore
(
vsb
,
"BODY"
,
req
->
body_oc
);
...
...
@@ -622,7 +624,8 @@ pan_ic(const char *func, const char *file, int line, const char *cond,
if
(
q
!=
NULL
)
VSB_printf
(
pan_vsb
,
"thread = (%s)
\n
"
,
q
);
VSB_printf
(
pan_vsb
,
"version = %s
\n
"
,
VCS_version
);
VSB_printf
(
pan_vsb
,
"version = %s, vrt api = %d.%d
\n
"
,
VCS_version
,
VRT_MAJOR_VERSION
,
VRT_MINOR_VERSION
);
VSB_printf
(
pan_vsb
,
"ident = %s,%s
\n
"
,
VSB_data
(
vident
)
+
1
,
Waiter_GetName
());
VSB_printf
(
pan_vsb
,
"now = %f (mono), %f (real)
\n
"
,
...
...
bin/varnishd/cache/cache_priv.h
View file @
8dfa782a
...
...
@@ -120,6 +120,7 @@ void VRTPRIV_dynamic_kill(struct vrt_privs *privs, uintptr_t id);
/* cache_vrt_vmod.c */
void
VMOD_Init
(
void
);
void
VMOD_Panic
(
struct
vsb
*
);
/* http1/cache_http1_pipe.c */
void
V1P_Init
(
void
);
...
...
bin/varnishd/cache/cache_vrt_vmod.c
View file @
8dfa782a
...
...
@@ -61,6 +61,9 @@ struct vmod {
void
*
hdl
;
const
void
*
funcs
;
int
funclen
;
const
char
*
abi
;
int
vrt_major
;
int
vrt_minor
;
};
static
VTAILQ_HEAD
(,
vmod
)
vmods
=
VTAILQ_HEAD_INITIALIZER
(
vmods
);
...
...
@@ -179,6 +182,9 @@ VRT_Vmod_Init(VRT_CTX, struct vmod **hdl, void *ptr, int len, const char *nm,
v
->
funclen
=
d
->
func_len
;
v
->
funcs
=
d
->
func
;
v
->
abi
=
d
->
abi
;
v
->
vrt_major
=
d
->
vrt_major
;
v
->
vrt_minor
=
d
->
vrt_minor
;
REPLACE
(
v
->
nm
,
nm
);
REPLACE
(
v
->
path
,
path
);
...
...
@@ -223,6 +229,20 @@ VRT_Vmod_Fini(struct vmod **hdl)
FREE_OBJ
(
v
);
}
void
VMOD_Panic
(
struct
vsb
*
vsb
)
{
struct
vmod
*
v
;
VSB_printf
(
vsb
,
"vmods = {
\n
"
);
VSB_indent
(
vsb
,
2
);
VTAILQ_FOREACH
(
v
,
&
vmods
,
list
)
VSB_printf
(
vsb
,
"%s = {%s, %d.%d},
\n
"
,
v
->
nm
,
v
->
abi
,
v
->
vrt_major
,
v
->
vrt_minor
);
VSB_indent
(
vsb
,
-
2
);
VSB_printf
(
vsb
,
"},
\n
"
);
}
/*---------------------------------------------------------------------*/
static
void
...
...
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