[Varnish] #1620: ESI asserts when no threads are available
Varnish
varnish-bugs at varnish-cache.org
Wed Oct 29 10:19:05 CET 2014
#1620: ESI asserts when no threads are available
--------------------+---------------------
Reporter: martin | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: build | Version: unknown
Severity: normal | Keywords:
--------------------+---------------------
Creating a varnishtest case for this situation doesn't seem possible to
me, because the thread min is 100 and the test case would need to occupy
100 threads.
To test this situation, one can apply the following patch to Varnish:
{{{
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -956,7 +956,7 @@ VBF_Fetch(struct worker *wrk, struct req *req, struct
objcore *oc,
bo->fetch_task.priv = bo;
bo->fetch_task.func = vbf_fetch_thread;
- if (Pool_Task(wrk->pool, &bo->fetch_task, POOL_QUEUE_FRONT))
+ /* if (Pool_Task(wrk->pool, &bo->fetch_task, POOL_QUEUE_FRONT)) */
vbf_fetch_thread(wrk, bo);
if (mode == VBF_BACKGROUND) {
VBO_waitstate(bo, BOS_REQ_DONE);
}}}
Then any of the ESI test cases will assert:
{{{
$ ./varnishtest -iv tests/e00003.vtc
...
*** v1 1.4 debug| Child (27306) died signal=6\n
*** v1 1.4 debug| Child (27306) Panic message:\n
*** v1 1.4 debug| Assert error in V1L_Reserve(),
http1/cache_http1_line.c line 78:\n
*** v1 1.4 debug| Condition((wrk->v1l) == 0) not true.\n
*** v1 1.4 debug| thread = (cache-worker)\n
*** v1 1.4 debug| version = varnish-trunk revision 389c050\n
*** v1 1.4 debug| ident =
Linux,3.14-2-amd64,x86_64,-smalloc,-smalloc,-hcritbit,epoll\n
*** v1 1.4 debug| Backtrace:\n
*** v1 1.4 debug| 0x44db69: pan_backtrace+0x19\n
*** v1 1.4 debug| 0x44da62: pan_ic+0x282\n
*** v1 1.4 debug| 0x47f2fa: V1L_Reserve+0x12a\n
*** v1 1.4 debug| 0x47c2ac: V1F_fetch_hdr+0x4cc\n
*** v1 1.4 debug| 0x4121e1: vbe_dir_gethdrs+0x2f1\n
*** v1 1.4 debug| 0x4212ef: VDI_GetHdr+0x22f\n
*** v1 1.4 debug| 0x42feb3: vbf_stp_startfetch+0x503\n
*** v1 1.4 debug| 0x42ebfc: vbf_fetch_thread+0x6dc\n
*** v1 1.4 debug| 0x42e391: VBF_Fetch+0x7b1\n
*** v1 1.4 debug| 0x4578ec: cnt_miss+0x39c\n
*** v1 1.4 debug| req = 0x7ff4f5c44020 {\n
*** v1 1.4 debug| sp = 0x7ff4f5c0e1e0, vxid = 1003, step =
R_STP_MISS,\n
*** v1 1.4 debug| req_body = R_BODY_NONE,\n
*** v1 1.4 debug| restarts = 0, esi_level = 1\n
*** v1 1.4 debug| sp = 0x7ff4f5c0e1e0 {\n
*** v1 1.4 debug| fd = 11, vxid = 1000,\n
*** v1 1.4 debug| client = 127.0.0.1 45867,\n
*** v1 1.4 debug| step = S_STP_WORKING,\n
*** v1 1.4 debug| },\n
*** v1 1.4 debug| worker = 0x7ff5039f5c50 {\n
*** v1 1.4 debug| stack = {0x7ff5039f6000 -> 0x7ff5039ea000}\n
*** v1 1.4 debug| ws = 0x7ff5039f5e68 {\n
*** v1 1.4 debug| id = "wrk",\n
*** v1 1.4 debug| {s,f,r,e} =
{0x7ff5039f5400,0x7ff5039f5400,(nil),+2040},\n
*** v1 1.4 debug| },\n
*** v1 1.4 debug| VCL::method = BACKEND_FETCH,\n
*** v1 1.4 debug| VCL::return = fetch,\n
*** v1 1.4 debug| VCL::methods = {RECV, HASH, MISS, DELIVER,
BACKEND_FETCH, BACKEND_RESPONSE},\n
*** v1 1.4 debug| },\n
*** v1 1.4 debug| ws = 0x7ff4f5c441d0 {\n
*** v1 1.4 debug| id = "req",\n
*** v1 1.4 debug| {s,f,r,e} =
{0x7ff4f5c45ff0,+104,(nil),+57384},\n
*** v1 1.4 debug| },\n
*** v1 1.4 debug| http[req] = {\n
*** v1 1.4 debug| ws = 0x7ff4f5c441d0[req]\n
*** v1 1.4 debug| "GET",\n
*** v1 1.4 debug| "/body1",\n
*** v1 1.4 debug| "HTTP/1.1",\n
*** v1 1.4 debug| "X-Forwarded-For: 127.0.0.1",\n
*** v1 1.4 debug| },\n
*** v1 1.4 debug| vcl = {\n
*** v1 1.4 debug| srcname = {\n
*** v1 1.4 debug| "input",\n
*** v1 1.4 debug| "Builtin",\n
*** v1 1.4 debug| },\n
*** v1 1.4 debug| },\n
*** v1 1.4 debug| objcore (REQ) = 0x7ff4f5c2a240 {\n
*** v1 1.4 debug| refcnt = 2\n
*** v1 1.4 debug| flags = 0x2\n
*** v1 1.4 debug| objhead = 0x7ff4f5c151a0\n
*** v1 1.4 debug| stevedore = (nil)\n
*** v1 1.4 debug| }\n
*** v1 1.4 debug| busyobj = 0x7ff4f5c2e020 {\n
*** v1 1.4 debug| ws = 0x7ff4f5c2e0e0 {\n
*** v1 1.4 debug| id = "bo",\n
*** v1 1.4 debug| {s,f,r,e} =
{0x7ff4f5c2ff88,+280,(nil),+57488},\n
*** v1 1.4 debug| },\n
*** v1 1.4 debug| refcnt = 2\n
*** v1 1.4 debug| retries = 0\n
*** v1 1.4 debug| failed = 0\n
*** v1 1.4 debug| state = 1\n
*** v1 1.4 debug| is_do_stream\n
*** v1 1.4 debug| bodystatus = 0 (none),\n
*** v1 1.4 debug| },\n
*** v1 1.4 debug| http[bereq] = {\n
*** v1 1.4 debug| ws = 0x7ff4f5c2e0e0[bo]\n
*** v1 1.4 debug| "GET",\n
*** v1 1.4 debug| "/body1",\n
*** v1 1.4 debug| "HTTP/1.1",\n
*** v1 1.4 debug| "X-Forwarded-For: 127.0.0.1",\n
*** v1 1.4 debug| "Accept-Encoding: gzip",\n
*** v1 1.4 debug| "X-Varnish: 1004",\n
*** v1 1.4 debug| "Host: 127.0.0.1",\n
*** v1 1.4 debug| },\n
*** v1 1.4 debug| http[beresp] = {\n
*** v1 1.4 debug| ws = 0x7ff4f5c2e0e0[bo]\n
*** v1 1.4 debug| },\n
*** v1 1.4 debug| objcore (FETCH) = 0x7ff4f5c2a240 {\n
*** v1 1.4 debug| refcnt = 2\n
*** v1 1.4 debug| flags = 0x2\n
*** v1 1.4 debug| objhead = 0x7ff4f5c151a0\n
*** v1 1.4 debug| stevedore = (nil)\n
*** v1 1.4 debug| }\n
*** v1 1.4 debug| }\n
*** v1 1.4 debug| },\n
*** v1 1.4 debug| busyobj = 0x7ff4f5c2e020 {\n
*** v1 1.4 debug| ws = 0x7ff4f5c2e0e0 {\n
*** v1 1.4 debug| id = "bo",\n
*** v1 1.4 debug| {s,f,r,e} =
{0x7ff4f5c2ff88,+280,(nil),+57488},\n
*** v1 1.4 debug| },\n
*** v1 1.4 debug| refcnt = 2\n
*** v1 1.4 debug| retries = 0\n
*** v1 1.4 debug| failed = 0\n
*** v1 1.4 debug| state = 1\n
*** v1 1.4 debug| is_do_stream\n
*** v1 1.4 debug| bodystatus = 0 (none),\n
*** v1 1.4 debug| },\n
*** v1 1.4 debug| http[bereq] = {\n
*** v1 1.4 debug| ws = 0x7ff4f5c2e0e0[bo]\n
*** v1 1.4 debug| "GET",\n
*** v1 1.4 debug| "/body1",\n
*** v1 1.4 debug| "HTTP/1.1",\n
*** v1 1.4 debug| "X-Forwarded-For: 127.0.0.1",\n
*** v1 1.4 debug| "Accept-Encoding: gzip",\n
*** v1 1.4 debug| "X-Varnish: 1004",\n
*** v1 1.4 debug| "Host: 127.0.0.1",\n
*** v1 1.4 debug| },\n
*** v1 1.4 debug| http[beresp] = {\n
*** v1 1.4 debug| ws = 0x7ff4f5c2e0e0[bo]\n
*** v1 1.4 debug| },\n
*** v1 1.4 debug| objcore (FETCH) = 0x7ff4f5c2a240 {\n
*** v1 1.4 debug| refcnt = 2\n
*** v1 1.4 debug| flags = 0x2\n
*** v1 1.4 debug| objhead = 0x7ff4f5c151a0\n
*** v1 1.4 debug| stevedore = (nil)\n
*** v1 1.4 debug| }\n
*** v1 1.4 debug| }\n
*** v1 1.4 debug| \n
*** v1 1.4 debug| \n
*** v1 1.4 debug| Child cleanup complete\n
*** v1 1.5 CLI RX 101
**** v1 1.5 CLI RX| Unknown request in manager process (child not
running).\n
**** v1 1.5 CLI RX| Type 'help' for more info.
** v1 1.5 Wait
**** v1 1.5 STDOUT poll 0x10
** v1 1.5 R 27283 Status: 0000 (u 0.048000 s 0.048000)
** l1 1.5 Waiting for logexp
** l2 1.5 Waiting for logexp
** l3 1.5 Waiting for logexp
** l4 1.5 Waiting for logexp
** l5 1.5 Waiting for logexp
* top 1.5 TEST tests/e00003.vtc FAILED
# top TEST tests/e00003.vtc FAILED (1.523) exit=1
}}}
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1620>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list