- 31 Oct, 2024 7 commits
-
-
Nils Goroll authored
C11 has _Static_assert and static_assert via assert.h, which we can not include. C23 has static_assert and deprecated _Static_assert
-
Nils Goroll authored
Sorry, I was looking at the wrong place. It seems the errors reported by suncc are rather related to a recent global zone update. This reverts commit 41f53eaf.
-
Nils Goroll authored
Someone(tm) needs to upgrade it seems...
-
Nils Goroll authored
-
Nils Goroll authored
-
Nils Goroll authored
Nice polish proposed by Dridi, thank you. BTW, I can no longer read 'Valid Obj' as that, it's now always and forever WALID_OBJ now. All our objects are belong to him.
-
Nils Goroll authored
-
- 28 Oct, 2024 4 commits
-
-
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>
-
Nils Goroll authored
-
Nils Goroll authored
-
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.
-
- 27 Oct, 2024 1 commit
-
-
Nils Goroll authored
We have some places in the code where the verbatim "take obj" semantics do not have setting the pointer to NULL immediately following.
-
- 24 Oct, 2024 1 commit
-
-
Nils Goroll authored
Ref 5c2a682a If the checkpoint segment is the stevedore_priv, it has already been removed from the segment list, see sml_trimstore()
-
- 17 Oct, 2024 1 commit
-
-
Yuri Astrakhan authored
`sub vcl_recv` does not have `return (lookup)`
-
- 14 Oct, 2024 1 commit
-
-
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: Asad Sajjad Ahmed <asadsa@varnish-software.com>
-
- 09 Oct, 2024 2 commits
-
-
Nils Goroll authored
-
Simon Stridsberg authored
-
- 07 Oct, 2024 5 commits
-
-
Nils Goroll authored
and flexelint
-
Nils Goroll authored
... from within varnish, which does not allow to check for issues in the transport, but is useful for validating storage and any previous VDPs in the filter list. crc32 has been added as an option with higher performance, because the algorithm already exists in-tree.
-
Walid Boudebouda authored
-
Walid Boudebouda authored
Checking the value of req.is_hitmiss in other places doesn't make sense
-
Walid Boudebouda authored
Checking the value of req.is_hitpass in other places doesn't make sense
-
- 30 Sep, 2024 18 commits
-
-
Nils Goroll authored
-
Nils Goroll authored
-
Nils Goroll authored
Fixes #4201
-
Nils Goroll authored
Previously, sml_iterator() could not free the last segment while iterating, because it could have turned out to be over-allocated at any time and be removed. With the change from the previous commit, we can now lift this limitation and take a reference to also the last segment. This is relevant because, due to of the race between the fetch and iterator site of a transient operation, the "is last segment" condition can happen at any point while an object is busy.
-
Nils Goroll authored
sml_trimstore() already delays freeing of a replaced last, smaller segment for the reallocation case at the bottom of the function: Because a concurrently running iterator might have already taken a reference on a to-be-replaced segment, it can not be freed immediately, but rather is kept around until the busy object is no more. This trivial change applies the same also for a segment which turns out to be unneeded because writing the object ended with a zero length in this segment. Simple, but consequential, see next commit
-
Nils Goroll authored
-
Nils Goroll authored
-
Nils Goroll authored
Include the socket name and make the code more readable by using struct members instead of av[]
-
Nils Goroll authored
av[0] is already passed as la->name, av[1] as la->endpoint
-
Asad Sajjad Ahmed authored
Take in use the new acceptor code, and nuke the old acceptor code to not fail the magic check. Signed-off-by: Asad Sajjad Ahmed <asadsa@varnish-software.com> Signed-off-by: Nils Goroll <slink@uplex.de
-
Asad Sajjad Ahmed authored
Signed-off-by: Asad Sajjad Ahmed <asadsa@varnish-software.com>
-
Asad Sajjad Ahmed authored
Now that each module is divided, we can limit the traversal of listen sockets to only listen sockets belonging to the respective module. This is done by keeping a local acceptor list of listen sockets in each module. Signed-off-by: Asad Sajjad Ahmed <asadsa@varnish-software.com>
-
Asad Sajjad Ahmed authored
Make the acceptor code plugable and start off with two acceptor modules TCP and UDS. Adding a new QUIC acceptor module in the future should be easy now. Signed-off-by: Asad Sajjad Ahmed <asadsa@varnish-software.com>
-
Asad Sajjad Ahmed authored
Currently, changes between TCP and UDS is inter-mixed, so split them up into their own files. This is cleaner and is needed to support HTTP/3 in the future. Signed-off-by: Asad Sajjad Ahmed <asadsa@varnish-software.com> Merged b4a09478 back in Signed-off-by: Nils Goroll <slink@uplex.de>
-
Nils Goroll authored
Currently, changes between TCP and UDS is inter-mixed when opening listen sockets, so split them up into their own files. This is cleaner and is needed to add QUIC listen endpoint in the future. Signed-off-by: Asad Sajjad Ahmed <asadsa@varnish-software.com> Conflicts: bin/varnishd/acceptor/mgt_acceptor.c Signed-off-by: Nils Goroll <slink@uplex.de>
-
Asad Sajjad Ahmed authored
Consistently name acceptor function to VCA/vca prefix, no matter if in the manager or cache worker. Signed-off-by: Asad Sajjad Ahmed <asadsa@varnish-software.com> Resolved merge conflict due to port range support. Patch edited to reflect name decision from bugswash. Signed-off-by: Nils Goroll <slink@uplex.de>
-
Asad Sajjad Ahmed authored
Copy acceptor code out from the child and the manager to a new directory called 'acceptor'. Updated to varnish-cache as of 48a2a41c (just after 7.6) Signed-off-by: Asad Sajjad Ahmed <asadsa@varnish-software.com> Signed-off-by: Nils Goroll <nils.goroll@uplex.de>
-
Martin Blix Grydeland authored
This was privously implemented in cache_acceptor.c. Move it to cache_main to be able to handle other tasks not only acceptor related during start.
-