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
1590acee
Commit
1590acee
authored
Jun 22, 2021
by
Martin Blix Grydeland
Committed by
Dridi Boukelmoune
Aug 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve the panic output when triggered on an H2 session
parent
613036a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
6 deletions
+32
-6
cache_http2_panic.c
bin/varnishd/http2/cache_http2_panic.c
+32
-6
No files found.
bin/varnishd/http2/cache_http2_panic.c
View file @
1590acee
...
...
@@ -36,6 +36,15 @@
#include "cache/cache_transport.h"
#include "http2/cache_http2.h"
static
const
char
*
h2_panic_error
(
const
struct
h2_error_s
*
e
)
{
if
(
e
==
NULL
)
return
(
"(null)"
);
else
return
(
e
->
name
);
}
void
h2_sess_panic
(
struct
vsb
*
vsb
,
const
struct
sess
*
sp
)
{
...
...
@@ -49,21 +58,38 @@ h2_sess_panic(struct vsb *vsb, const struct sess *sp)
h2
=
(
void
*
)
*
up
;
if
(
PAN_dump_struct
(
vsb
,
h2
,
H2_SESS_MAGIC
,
"h2_sess"
))
return
;
h2
=
(
void
*
)
*
up
;
VSB_printf
(
vsb
,
"refcnt = %d, bogosity = %d, error = %s
\n
"
,
h2
->
refcnt
,
h2
->
bogosity
,
h2_panic_error
(
h2
->
error
));
VSB_printf
(
vsb
,
"open_streams = %u, highest_stream = %u,"
" goaway_last_stream = %u,
\n
"
,
h2
->
open_streams
,
h2
->
highest_stream
,
h2
->
goaway_last_stream
);
VSB_printf
(
vsb
,
"{rxf_len, rxf_type, rxf_flags, rxf_stream} ="
" {%u, %u, 0x%x, %u},
\n
"
,
h2
->
rxf_len
,
h2
->
rxf_type
,
h2
->
rxf_flags
,
h2
->
rxf_stream
);
VTAILQ_FOREACH
(
r2
,
&
h2
->
streams
,
list
)
{
if
(
PAN_dump_struct
(
vsb
,
r2
,
H2_REQ_MAGIC
,
"stream"
))
continue
;
VSB_printf
(
vsb
,
"
0x%08x
"
,
r2
->
stream
);
VSB_printf
(
vsb
,
"
id = %u, state =
"
,
r2
->
stream
);
switch
(
r2
->
state
)
{
#define H2_STREAM(U,sd,d) case H2_S_##U: VSB_printf(vsb, "
%-6
s", sd); break;
#define H2_STREAM(U,sd,d) case H2_S_##U: VSB_printf(vsb, "
%
s", sd); break;
#include <tbl/h2_stream.h>
default:
VSB_printf
(
vsb
,
"
State %d
"
,
r2
->
state
);
VSB_printf
(
vsb
,
"
0x%x
"
,
r2
->
state
);
break
;
}
VSB_cat
(
vsb
,
"},
\n
"
);
VSB_cat
(
vsb
,
",
\n
"
);
VSB_printf
(
vsb
,
"h2_sess = %p, scheduled = %d, error = %s,
\n
"
,
r2
->
h2sess
,
r2
->
scheduled
,
h2_panic_error
(
r2
->
error
));
VSB_printf
(
vsb
,
"t_send = %f, t_winupd = %f,
\n
"
,
r2
->
t_send
,
r2
->
t_winupd
);
VSB_printf
(
vsb
,
"t_window = %jd, r_window = %jd,
\n
"
,
r2
->
t_window
,
r2
->
r_window
);
VSB_indent
(
vsb
,
-
2
);
VSB_cat
(
vsb
,
"},
\n
"
);
}
VSB_cat
(
vsb
,
"},
\n
"
);
VSB_indent
(
vsb
,
-
2
);
}
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