[master] bc28f0c92 vai: Hunting c00111 failure in vtest

Nils Goroll nils.goroll at uplex.de
Sun Jul 6 14:48:04 UTC 2025


commit bc28f0c92a02bfb1ad5b6f7a30d7ae353a79eaeb
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Sun Jul 6 14:21:33 2025 +0200

    vai: Hunting c00111 failure in vtest

diff --git a/bin/varnishd/storage/storage_simple.c b/bin/varnishd/storage/storage_simple.c
index 4a47f5560..23b6d2564 100644
--- a/bin/varnishd/storage/storage_simple.c
+++ b/bin/varnishd/storage/storage_simple.c
@@ -628,6 +628,9 @@ sml_ai_return(struct worker *wrk, vai_hdl vhdl, struct vscaret *scaret)
 
 	VSCARET_FOREACH(p, todo) {
 		CAST_OBJ_NOTNULL(st, lease2st(*p), STORAGE_MAGIC);
+#ifdef VAI_DBG
+		VSLb(wrk->vsl, SLT_Debug, "ret %p", st);
+#endif
 		sml_stv_free(hdl->stv, st);
 	}
 }
@@ -808,6 +811,11 @@ sml_iterator(struct worker *wrk, struct objcore *oc,
 			// sufficient space ensured by capacity check above
 			VSCARET_ADD(scaret, vio->lease);
 
+#ifdef VAI_DBG
+			VSLb(wrk->vsl, SLT_Debug, "len %zu scaret %u uu %u",
+			    vio->iov.iov_len, scaret->used, uu);
+#endif
+
 			// whenever we have flushed, return leases
 			if ((uu & OBJ_ITER_FLUSH) && scaret->used > 0)
 				ObjVAIreturn(wrk, hdl, scaret);
@@ -823,6 +831,11 @@ sml_iterator(struct worker *wrk, struct objcore *oc,
 		// we have now completed the scarab
 		VSCARAB_INIT(scarab, scarab->capacity);
 
+#ifdef VAI_DBG
+		VSLb(wrk->vsl, SLT_Debug, "r %d nn %d uu %u",
+		    r, nn, uu);
+#endif
+
 		// flush before blocking if we did not already
 		if (r == 0 && (nn == -ENOBUFS || nn == -EAGAIN) &&
 		    (uu & OBJ_ITER_FLUSH) == 0) {
diff --git a/bin/varnishtest/tests/c00111.vtc b/bin/varnishtest/tests/c00111.vtc
index 996d5d258..50ebd606d 100644
--- a/bin/varnishtest/tests/c00111.vtc
+++ b/bin/varnishtest/tests/c00111.vtc
@@ -23,6 +23,7 @@ varnish v1 -cliok "param.set transit_buffer 4k"
 client c2 {
 	txreq -method POST
 	rxresp
+	expect resp.bodylen == 1850000
 } -run
 
 varnish v1 -vsl_catchup


More information about the varnish-commit mailing list