1. 31 Oct, 2024 7 commits
  2. 28 Oct, 2024 4 commits
    • 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
    • Nils Goroll's avatar
    • Nils Goroll's avatar
      ab1eca8c
    • Nils Goroll's avatar
      vmod_vtc: Add support for thread workspace operations on the backend side · 0883512e
      Nils Goroll authored
      This is probably useless at the moment because of how the vcl method code checks
      thread workspace allocations, but at least we avoid a panic at the wrong place.
      0883512e
  3. 27 Oct, 2024 1 commit
  4. 24 Oct, 2024 1 commit
  5. 17 Oct, 2024 1 commit
  6. 14 Oct, 2024 1 commit
    • Asad Sajjad Ahmed's avatar
      varnishd: truncate thread name on Linux · 1a79fde3
      Asad Sajjad Ahmed authored
      On Linux, threads can not have name longer than 15 bytes plus a terminating
      '\0' byte:
      > PR_SET_NAME (since Linux 2.6.9)
      >     Set the name of the calling thread, using the value in the loca‐
      >     tion  pointed  to  by  (char  *) arg2.  The name can be up to 16
      >     bytes long, including the terminating null byte.  (If the length
      >     of  the  string, including the terminating null byte, exceeds 16
      >     bytes, the string is silently truncated.)  This is the same  at‐
      >     tribute  that can be set via pthread_setname_np(3) and retrieved
      >     using pthread_getname_np(3).  The attribute is likewise accessi‐
      >     ble via /proc/self/task/tid/comm (see proc(5)), where tid is the
      >     thread ID of the calling thread, as returned by gettid(2).
      
      We have until now ignored the return value from pthread_setname_np(), this
      is not great as the call then becomes a NOP:
      > The pthread_setname_np() function can be used to  set  a
      >     unique  name  for  a  thread,  which can be useful for debugging multi‐
      >     threaded applications.  The thread name  is  a  meaningful  C  language
      >     string, whose length is restricted to 16 characters, including the ter‐
      >     minating null byte ('\0').
      > [...]
      >     ERANGE The  length  of  the string specified pointed to by name exceeds
      >         the allowed limit.
      
      This patch truncates long names to 14 characters plus a tilde ('~') character.
      Signed-off-by: 's avatarAsad Sajjad Ahmed <asadsa@varnish-software.com>
      1a79fde3
  7. 09 Oct, 2024 2 commits
  8. 07 Oct, 2024 5 commits
  9. 30 Sep, 2024 18 commits