varnish-cache
varnish-cache copied to clipboard
"Assert error in Req_New(), cache/cache_req.c line 146" when running test that sets "vtc.workspace_alloc(client, -5);"
Commit : 8869801544c52b59812ff7272fe753cc4569cd91 and the following test
varnishtest "Test out of workspace"
server s1 { } -start
varnish v1 -arg "-p workspace_client=9k" -vcl+backend {
import vtc;
sub vcl_recv {
vtc.workspace_alloc(client, -5);
}
} -start
client c1 {
txreq -url "/"
rxresp
} -run
Makes varnish assert with :
debug|Assert error in Req_New(), cache/cache_req.c line 146:
debug| Condition(p < e) not true.
debug|version = varnish-trunk revision a33ea4015bb87ae42252e0f42c8d01b23e081675, vrt api = 13.0
debug|ident = Linux,5.13.4-arch2-1,x86_64,-jnone,-sdefault,-sdefault,-hcritbit,epoll
debug|now = 682314.802592 (mono), 1628527964.806738 (real)
debug|Backtrace:
debug| 0x5571a80d03f1: varnishd(+0x573f1) [0x5571a80d03f1]
debug| 0x5571a81474a5: varnishd(VAS_Fail+0x45) [0x5571a81474a5]
debug| 0x5571a80d26d9: varnishd(Req_New+0x2c9) [0x5571a80d26d9]
debug| 0x5571a80a3edb: varnishd(+0x2aedb) [0x5571a80a3edb]
debug| 0x5571a80f5947: varnishd(+0x7c947) [0x5571a80f5947]
debug| 0x5571a80f5ea4: varnishd(+0x7cea4) [0x5571a80f5ea4]
debug| 0x7ffbab2e6259: /usr/lib/libpthread.so.0(+0x9259) [0x7ffbab2e6259]
debug| 0x7ffbab20f5e3: /usr/lib/libc.so.6(clone+0x43) [0x7ffbab20f5e3]
I hit this error when trying to run https://github.com/varnish/libvmod-digest/blob/master/src/tests/test02.vtc
If you also set the vsl_buffer to 4k in the same test case, then this test should pass. We need to fail much earlier if the workspace is smaller than vsl_buffer, in my humble opinion.
I think this is another instance of #3101