<div dir="ltr"><div>FYI: The new assert triggers a panic in test p00000.vtc:<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">**** v1    CLI RX|Child (3894826) Panic at: Mon, 04 Aug 2025 14:35:13 GMT<br>**** v1    CLI RX|Assert error in sml_ai_lease_boc(), storage/storage_simple.c line 460:<br>**** v1    CLI RX|  Condition(hdl->oc->stobj->priv == hdl->obj) not true.<br>**** v1    CLI RX|version = varnish-trunk revision 5f93af1c618d0e4214cc7de967a0077efa8e4b5c, vrt api = 21.0<br>**** v1    CLI RX|ident = Linux,6.8.0-64-generic,x86_64,-jnone,-sdeprecated_persistent,-sdefault,-hcritbit,epoll<br>**** v1    CLI RX|now = 156813.822665 (mono), 1754318112.863334 (real)<br>**** v1    CLI RX|Backtrace:<br>**** v1    CLI RX|  ip=0x55d5e7e7f415 sp=0x74e297ef8070 <VBT_format+0x35><br>**** v1    CLI RX|  ip=0x55d5e7dae4f3 sp=0x74e297ef8090 <pan_backtrace+0x33><br>**** v1    CLI RX|  ip=0x55d5e7dae237 sp=0x74e297ef80b0 <pan_ic+0x377><br>**** v1    CLI RX|  ip=0x55d5e7e7e48b sp=0x74e297ef8230 <VAS_Fail+0x4b><br>**** v1    CLI RX|  ip=0x55d5e7e420a7 sp=0x74e297ef8270 <sml_ai_lease_boc+0x277><br>**** v1    CLI RX|  ip=0x55d5e7daa4d9 sp=0x74e297ef82f0 <ObjVAIlease+0xf9><br>**** v1    CLI RX|  ip=0x55d5e7e3d6fe sp=0x74e297ef8320 <sml_iterator+0x20e><br>**** v1    CLI RX|  ip=0x55d5e7daa161 sp=0x74e297ef8660 <ObjIterate+0x151><br>**** v1    CLI RX|  ip=0x55d5e7d7f5ff sp=0x74e297ef86a0 <VDP_DeliverObj+0x27f><br>**** v1    CLI RX|  ip=0x55d5e7dfd6ff sp=0x74e297ef86d0 <V1D_Deliver+0x6bf><br>**** v1    CLI RX|  ip=0x55d5e7dba3d7 sp=0x74e297ef87e0 <cnt_transmit+0x707><br>**** v1    CLI RX|  ip=0x55d5e7db8a7c sp=0x74e297ef8820 <CNT_Request+0x73c><br>**** v1    CLI RX|  ip=0x55d5e7e007de sp=0x74e297ef88e0 <HTTP1_Session+0xa7e><br>**** v1    CLI RX|  ip=0x55d5e7dffd21 sp=0x74e297ef8960 <http1_req+0x181><br>**** v1    CLI RX|  ip=0x55d5e7df0887 sp=0x74e297ef8990 <Pool_Work_Thread+0x7c7><br>**** v1    CLI RX|  ip=0x55d5e7deff83 sp=0x74e297ef8a20 <WRK_Thread+0x333><br>**** v1    CLI RX|  ip=0x55d5e7defc0b sp=0x74e297ef95b0 <pool_thread+0xcb><br>**** v1    CLI RX|  ip=0x74e298094ac3 sp=0x74e297ef95e0 <pthread_condattr_setpshared+0x513><br>**** v1    CLI RX|  ip=0x74e298126850 sp=0x74e297ef9680 <__xmknodat+0x230></blockquote></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><br><font color="#888888"></font></div></div></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Aug 4, 2025 at 12:56 PM Nils Goroll <<a href="mailto:nils.goroll@uplex.de">nils.goroll@uplex.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
commit 5f93af1c618d0e4214cc7de967a0077efa8e4b5c<br>
Author: Nils Goroll <<a href="mailto:nils.goroll@uplex.de" target="_blank">nils.goroll@uplex.de</a>><br>
Date:   Mon Aug 4 12:44:32 2025 +0200<br>
<br>
    vai: Consistency assertions<br>
<br>
    Assert that the oc/boc pair remains the same throughout iteration<br>
<br>
    Motivated by #4371<br>
<br>
diff --git a/bin/varnishd/storage/storage_simple.c b/bin/varnishd/storage/storage_simple.c<br>
index 608533193..42ab4bf70 100644<br>
--- a/bin/varnishd/storage/storage_simple.c<br>
+++ b/bin/varnishd/storage/storage_simple.c<br>
@@ -456,10 +456,13 @@ sml_ai_lease_boc(struct worker *wrk, vai_hdl vhdl, struct vscarab *scarab)<br>
<br>
        CAST_VAI_HDL_NOTNULL(hdl, vhdl, SML_HDL_MAGIC);<br>
        VSCARAB_CHECK_NOTNULL(scarab);<br>
+       assert(hdl->boc == hdl->oc->boc);<br>
+       assert(hdl->oc->stobj->priv == hdl->obj);<br>
<br>
        if (hdl->avail == hdl->returned) {<br>
                hdl->avail = ObjVAIGetExtend(wrk, hdl->oc, hdl->returned,<br>
                    &state, &hdl->qe);<br>
+               assert(state >= BOS_STREAM);<br>
                if (state == BOS_FAILED) {<br>
                        hdl->last = NULL;<br>
                        return (-EPIPE);<br>
@@ -497,6 +500,7 @@ sml_ai_lease_boc(struct worker *wrk, vai_hdl vhdl, struct vscarab *scarab)<br>
<br>
        while (hdl->avail > hdl->returned && (viov = VSCARAB_GET(scarab)) != NULL) {<br>
                CHECK_OBJ_NOTNULL(hdl->st, STORAGE_MAGIC); // ObjVAIGetExtend ensures<br>
+               assert(hdl->boc == hdl->oc->boc);<br>
                assert(hdl->st_off <= hdl->st->space);<br>
                size_t av = hdl->avail - hdl->returned;<br>
                size_t l = hdl->st->space - hdl->st_off;<br>
_______________________________________________<br>
varnish-commit mailing list<br>
<a href="mailto:varnish-commit@varnish-cache.org" target="_blank">varnish-commit@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit" rel="noreferrer" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit</a><br>
</blockquote></div>