• Nils Goroll's avatar
    cache_http1_fetch: Add V1L_Open() error handling · f0379c85
    Nils Goroll authored
    With the added test case but without the fix, we would see the panic shown
    below.
    
    Note that I do not see any way how this could be triggered in practice with the
    current Varnish-Cache core code base.
    
    Panic at: Mon, 28 Oct 2024 09:49:57 GMT
    Assert error in V1L_Write(), http1/cache_http1_line.c line 275:
      Condition((v1l) != NULL) not true.
    version = varnish-trunk revision 1b80876384763ffef02d395258401708a814bbb9, vrt api = 20.1
    ident = Linux,6.1.0-25-amd64,x86_64,-jnone,-sdefault,-sdefault,-hcritbit,epoll
    now = 47049.788459 (mono), 1730108997.304734 (real)
    Backtrace:
      ip=0x5642a80acdc5 sp=0x7f20c5ca91d0 <VBT_format+0x35>
      ip=0x5642a7fe5c83 sp=0x7f20c5ca91f0 <pan_backtrace+0x33>
      ip=0x5642a7fe59ca sp=0x7f20c5ca9210 <pan_ic+0x37a>
      ip=0x5642a80abff5 sp=0x7f20c5ca9390 <VAS_Fail+0x55>
      ip=0x5642a80356a3 sp=0x7f20c5ca93e0 <V1L_Write+0xd3>
      ip=0x5642a803850b sp=0x7f20c5ca9420 <http1_WrTxt+0x1cb>
      ip=0x5642a8038263 sp=0x7f20c5ca9450 <HTTP1_Write+0x193>
      ip=0x5642a80314ef sp=0x7f20c5ca9480 <V1F_SendReq+0x5df>
      ip=0x5642a7fa5cc0 sp=0x7f20c5ca95b0 <vbe_dir_gethdrs+0x680>
      ip=0x5642a7fba2de sp=0x7f20c5ca9610 <VDI_GetHdr+0x16e>
      ip=0x5642a7fc9967 sp=0x7f20c5ca96d0 <vbf_stp_startfetch+0x487>
      ip=0x5642a7fc8894 sp=0x7f20c5ca9730 <vbf_fetch_thread+0x5f4>
      ip=0x5642a8023f17 sp=0x7f20c5ca9810 <Pool_Work_Thread+0x7c7>
      ip=0x5642a8023613 sp=0x7f20c5ca98a0 <WRK_Thread+0x333>
      ip=0x5642a802329b sp=0x7f20c5caa430 <pool_thread+0xcb>
      ip=0x7f20c61c9144 sp=0x7f20c5caa460 <pthread_condattr_setpshared+0x4e4>
      ip=0x7f20c62497dc sp=0x7f20c5caa500 <__xmknodat+0x23c>
    f0379c85
Name
Last commit
Last update
..
tests Loading commit data...
Makefile.am Loading commit data...
cmds.h Loading commit data...
flint.lnt Loading commit data...
flint.sh Loading commit data...
gensequences Loading commit data...
hpack.h Loading commit data...
huffman_gen.py Loading commit data...
huffman_input Loading commit data...
sequences Loading commit data...
teken.3 Loading commit data...
teken.c Loading commit data...
teken.h Loading commit data...
teken_scs.h Loading commit data...
teken_subr.h Loading commit data...
teken_subr_compat.h Loading commit data...
teken_wcwidth.h Loading commit data...
vtc.c Loading commit data...
vtc.h Loading commit data...
vtc_barrier.c Loading commit data...
vtc_client.c Loading commit data...
vtc_gzip.c Loading commit data...
vtc_h2_enctbl.h Loading commit data...
vtc_h2_hpack.c Loading commit data...
vtc_h2_priv.h Loading commit data...
vtc_h2_stattbl.h Loading commit data...
vtc_h2_tbl.c Loading commit data...
vtc_haproxy.c Loading commit data...
vtc_http.c Loading commit data...
vtc_http.h Loading commit data...
vtc_http2.c Loading commit data...
vtc_log.c Loading commit data...
vtc_log.h Loading commit data...
vtc_logexp.c Loading commit data...
vtc_main.c Loading commit data...
vtc_misc.c Loading commit data...
vtc_process.c Loading commit data...
vtc_proxy.c Loading commit data...
vtc_server.c Loading commit data...
vtc_sess.c Loading commit data...
vtc_subr.c Loading commit data...
vtc_syslog.c Loading commit data...
vtc_tunnel.c Loading commit data...
vtc_varnish.c Loading commit data...
vtc_vsm.c Loading commit data...