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
21653426
Commit
21653426
authored
May 14, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add panic dump facility for threads which have a busyobj rather than a req.
parent
43b4bec0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
cache.h
bin/varnishd/cache/cache.h
+2
-0
cache_main.c
bin/varnishd/cache/cache_main.c
+15
-0
cache_panic.c
bin/varnishd/cache/cache_panic.c
+6
-0
No files found.
bin/varnishd/cache/cache.h
View file @
21653426
...
@@ -913,6 +913,8 @@ uint32_t VXID_Get(struct vxid_pool *v);
...
@@ -913,6 +913,8 @@ uint32_t VXID_Get(struct vxid_pool *v);
extern
volatile
struct
params
*
cache_param
;
extern
volatile
struct
params
*
cache_param
;
void
THR_SetName
(
const
char
*
name
);
void
THR_SetName
(
const
char
*
name
);
const
char
*
THR_GetName
(
void
);
const
char
*
THR_GetName
(
void
);
void
THR_SetBusyobj
(
const
struct
busyobj
*
);
struct
busyobj
*
THR_GetBusyobj
(
void
);
void
THR_SetRequest
(
const
struct
req
*
);
void
THR_SetRequest
(
const
struct
req
*
);
struct
req
*
THR_GetRequest
(
void
);
struct
req
*
THR_GetRequest
(
void
);
...
...
bin/varnishd/cache/cache_main.c
View file @
21653426
...
@@ -52,6 +52,21 @@ volatile struct params *cache_param;
...
@@ -52,6 +52,21 @@ volatile struct params *cache_param;
*/
*/
static
pthread_key_t
req_key
;
static
pthread_key_t
req_key
;
static
pthread_key_t
bo_key
;
void
THR_SetBusyobj
(
const
struct
busyobj
*
bo
)
{
AZ
(
pthread_setspecific
(
bo_key
,
bo
));
}
struct
busyobj
*
THR_GetBusyobj
(
void
)
{
return
(
pthread_getspecific
(
bo_key
));
}
void
void
THR_SetRequest
(
const
struct
req
*
req
)
THR_SetRequest
(
const
struct
req
*
req
)
...
...
bin/varnishd/cache/cache_panic.c
View file @
21653426
...
@@ -396,6 +396,7 @@ pan_ic(const char *func, const char *file, int line, const char *cond,
...
@@ -396,6 +396,7 @@ pan_ic(const char *func, const char *file, int line, const char *cond,
{
{
const
char
*
q
;
const
char
*
q
;
struct
req
*
req
;
struct
req
*
req
;
struct
busyobj
*
bo
;
AZ
(
pthread_mutex_lock
(
&
panicstr_mtx
));
/* Won't be released,
AZ
(
pthread_mutex_lock
(
&
panicstr_mtx
));
/* Won't be released,
we're going to die
we're going to die
...
@@ -446,6 +447,11 @@ pan_ic(const char *func, const char *file, int line, const char *cond,
...
@@ -446,6 +447,11 @@ pan_ic(const char *func, const char *file, int line, const char *cond,
pan_req
(
req
);
pan_req
(
req
);
VSL_Flush
(
req
->
vsl
,
0
);
VSL_Flush
(
req
->
vsl
,
0
);
}
}
bo
=
THR_GetBusyobj
();
if
(
bo
!=
NULL
)
{
pan_busyobj
(
bo
);
VSL_Flush
(
bo
->
vsl
,
0
);
}
}
}
VSB_printf
(
pan_vsp
,
"
\n
"
);
VSB_printf
(
pan_vsp
,
"
\n
"
);
VSB_bcat
(
pan_vsp
,
""
,
1
);
/* NUL termination */
VSB_bcat
(
pan_vsp
,
""
,
1
);
/* NUL termination */
...
...
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