[trafficserver-ingress-controller] branch dependabot/pip/tests/urllib3-1.26.18 deleted (was f18a066)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/pip/tests/urllib3-1.26.18 in repository https://gitbox.apache.org/repos/asf/trafficserver-ingress-controller.git was f18a066 Bump urllib3 from 1.26.17 to 1.26.18 in /tests The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[trafficserver-ingress-controller] branch master updated: Bump urllib3 from 1.26.17 to 1.26.18 in /tests (#171)
This is an automated email from the ASF dual-hosted git repository. kichan pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver-ingress-controller.git The following commit(s) were added to refs/heads/master by this push: new d1d396f Bump urllib3 from 1.26.17 to 1.26.18 in /tests (#171) d1d396f is described below commit d1d396fd47f6bc2f45571ae786ee9a68dcac443e Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Tue Oct 17 20:19:48 2023 -0700 Bump urllib3 from 1.26.17 to 1.26.18 in /tests (#171) Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.17 to 1.26.18. - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](https://github.com/urllib3/urllib3/compare/1.26.17...1.26.18) --- updated-dependencies: - dependency-name: urllib3 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index d103310..8270d34 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,3 +1,3 @@ pytest==5.4.3 requests==2.31.0 -urllib3==1.26.17 +urllib3==1.26.18
[trafficserver-ingress-controller] branch dependabot/pip/tests/urllib3-1.26.18 created (now f18a066)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/pip/tests/urllib3-1.26.18 in repository https://gitbox.apache.org/repos/asf/trafficserver-ingress-controller.git at f18a066 Bump urllib3 from 1.26.17 to 1.26.18 in /tests No new revisions were added by this update.
[trafficserver] branch master updated: Cleanup: Move Vol implementations into Vol.cc (#10600)
This is an automated email from the ASF dual-hosted git repository. masaori pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new 8e0e9262df Cleanup: Move Vol implementations into Vol.cc (#10600) 8e0e9262df is described below commit 8e0e9262dfc082af6ed28465c91bace8348b78fa Author: Masaori Koshiba AuthorDate: Wed Oct 18 08:48:10 2023 +0900 Cleanup: Move Vol implementations into Vol.cc (#10600) --- iocore/cache/CMakeLists.txt | 1 + iocore/cache/Cache.cc | 722 +- iocore/cache/CacheDir.cc| 170 iocore/cache/Makefile.am| 3 +- iocore/cache/P_CacheDir.h | 2 +- iocore/cache/P_CacheVol.h | 6 +- iocore/cache/Vol.cc | 918 7 files changed, 927 insertions(+), 895 deletions(-) diff --git a/iocore/cache/CMakeLists.txt b/iocore/cache/CMakeLists.txt index 2a632b7439..e4180a62f1 100644 --- a/iocore/cache/CMakeLists.txt +++ b/iocore/cache/CMakeLists.txt @@ -32,6 +32,7 @@ add_library( RamCacheCLFUS.cc RamCacheLRU.cc Store.cc + Vol.cc ) add_library(ts::inkcache ALIAS inkcache) diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc index 516feab766..2a590a116d 100644 --- a/iocore/cache/Cache.cc +++ b/iocore/cache/Cache.cc @@ -21,18 +21,14 @@ limitations under the License. */ -#include "P_Cache.h" +#include "I_Cache.h" // Cache Inspector and State Pages #include "P_CacheTest.h" #include "StatPages.h" -#include "tscore/I_Layout.h" #include "tscore/Filenames.h" -#include "api/InkAPIInternal.h" - -#include "tscore/hugepages.h" #include "records/P_RecProcess.h" #ifdef AIO_FAULT_INJECTION @@ -45,9 +41,6 @@ constexpr ts::VersionNumber CACHE_DB_VERSION(CACHE_DB_MAJOR_VERSION, CACHE_DB_MI static size_t DEFAULT_RAM_CACHE_MULTIPLIER = 10; // I.e. 10x 1MB per 1GB of disk. -// This is the oldest version number that is still usable. -static short int const CACHE_DB_MAJOR_VERSION_COMPATIBLE = 21; - // Configuration int64_t cache_config_ram_cache_size= AUTO_SIZE_RAM_CACHE; @@ -112,28 +105,6 @@ DbgCtl dbg_ctl_ram_cache{"ram_cache"}; } // end anonymous namespace -struct VolInitInfo { - off_t recover_pos; - AIOCallbackInternal vol_aio[4]; - char *vol_h_f; - - VolInitInfo() - { -recover_pos = 0; -vol_h_f = static_cast(ats_memalign(ats_pagesize(), 4 * STORE_BLOCK_SIZE)); -memset(vol_h_f, 0, 4 * STORE_BLOCK_SIZE); - } - - ~VolInitInfo() - { -for (auto : vol_aio) { - i.action = nullptr; - i.mutex.clear(); -} -free(vol_h_f); - } -}; - void cplist_init(); static void cplist_update(); int cplist_reconfigure(); @@ -298,72 +269,6 @@ update_cache_config(const char * /* name ATS_UNUSED */, RecDataT /* data_type AT return 0; } -int -Vol::begin_read(CacheVC *cont) const -{ - ink_assert(cont->mutex->thread_holding == this_ethread()); - ink_assert(mutex->thread_holding == this_ethread()); -#ifdef CACHE_STAT_PAGES - ink_assert(!cont->stat_link.next && !cont->stat_link.prev); - stat_cache_vcs.enqueue(cont, cont->stat_link); -#endif - // no need for evacuation as the entire document is already in memory - if (cont->f.single_fragment) { -return 0; - } - int i = dir_evac_bucket(>earliest_dir); - EvacuationBlock *b; - for (b = evacuate[i].head; b; b = b->link.next) { -if (dir_offset(>dir) != dir_offset(>earliest_dir)) { - continue; -} -if (b->readers) { - b->readers = b->readers + 1; -} -return 0; - } - // we don't actually need to preserve this block as it is already in - // memory, but this is easier, and evacuations are rare - EThread *t= cont->mutex->thread_holding; - b = new_EvacuationBlock(t); - b->readers= 1; - b->dir= cont->earliest_dir; - b->evac_frags.key = cont->earliest_key; - evacuate[i].push(b); - return 1; -} - -int -Vol::close_read(CacheVC *cont) const -{ - EThread *t = cont->mutex->thread_holding; - ink_assert(t == this_ethread()); - ink_assert(t == mutex->thread_holding); - if (dir_is_empty(>earliest_dir)) { -return 1; - } - int i = dir_evac_bucket(>earliest_dir); - EvacuationBlock *b; - for (b = evacuate[i].head; b;) { -EvacuationBlock *next = b->link.next; -if (dir_offset(>dir) != dir_offset(>earliest_dir)) { - b = next; - continue; -} -if (b->readers && !--b->readers) { - evacuate[i].remove(b); - free_EvacuationBlock(b, t); - break; -} -b = next; - } -#ifdef CACHE_STAT_PAGES - stat_cache_vcs.remove(cont, cont->stat_link); - ink_assert(!cont->stat_link.next && !cont->stat_link.prev); -#endif - return 1; -} - // Cache Processor int @@ -938,631 +843,6 @@ CacheProcessor::IsCacheReady(CacheFragType type) return static_cast(cache_ready & (1 << type)); } -static void -vol_init_data_internal(Vol *vol)
[trafficserver] branch master updated: Fix freebsd ci build (#10632)
This is an automated email from the ASF dual-hosted git repository. cmcfarlen pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new 21b2e87a53 Fix freebsd ci build (#10632) 21b2e87a53 is described below commit 21b2e87a5301809e4a4f17f3dd0cbf111524d16f Author: Chris McFarlen AuthorDate: Tue Oct 17 15:48:40 2023 -0500 Fix freebsd ci build (#10632) * Link backtrace libraries if any are found * link libswoc even without brotli - Co-authored-by: Chris McFarlen --- CMakeLists.txt | 3 +++ plugins/compress/CMakeLists.txt | 3 ++- src/tscore/CMakeLists.txt | 4 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c339d7979..2b88568d8d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -260,6 +260,9 @@ check_include_file(endian.h HAVE_ENDIAN_H) find_package(Backtrace) if(Backtrace_FOUND) set(TS_HAS_BACKTRACE TRUE) + if(Backtrace_LIBRARIES) +message(STATUS "Backtrace found (library ${Backtrace_LIBRARIES})") + endif() endif() find_package(brotli) diff --git a/plugins/compress/CMakeLists.txt b/plugins/compress/CMakeLists.txt index 17bd8e7d97..63d80cf2e2 100644 --- a/plugins/compress/CMakeLists.txt +++ b/plugins/compress/CMakeLists.txt @@ -16,6 +16,7 @@ ### add_atsplugin(compress compress.cc configuration.cc misc.cc) +target_link_libraries(compress PRIVATE libswoc) if(HAVE_BROTLI_ENCODE_H) - target_link_libraries(compress PRIVATE brotli::brotlienc libswoc) + target_link_libraries(compress PRIVATE brotli::brotlienc) endif() diff --git a/src/tscore/CMakeLists.txt b/src/tscore/CMakeLists.txt index ea72a796d7..f77f054f36 100644 --- a/src/tscore/CMakeLists.txt +++ b/src/tscore/CMakeLists.txt @@ -120,6 +120,10 @@ if(TS_USE_HWLOC) target_link_libraries(tscore PUBLIC hwloc::hwloc) endif() +if(Backtrace_LIBRARIES) + target_link_libraries(tscore PRIVATE ${Backtrace_LIBRARIES}) +endif() + add_dependencies(tscore ParseRules) target_include_directories(tscore PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) if(TS_HAS_128BIT_CAS AND TS_NEEDS_MCX16_FOR_CAS)
[trafficserver-ci] branch main updated: freebsd: try cmake again (#243)
This is an automated email from the ASF dual-hosted git repository. bneradt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/trafficserver-ci.git The following commit(s) were added to refs/heads/main by this push: new a1f5d93 freebsd: try cmake again (#243) a1f5d93 is described below commit a1f5d93fc06fd9fb66f9aaf19f08e1ce9abe9eb7 Author: Brian Neradt AuthorDate: Tue Oct 17 13:49:11 2023 -0500 freebsd: try cmake again (#243) cmcfarlen patched freebsd cmake builds for pthread. Let's see if the freebsd build is green now. --- jenkins/github/freebsd.pipeline | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jenkins/github/freebsd.pipeline b/jenkins/github/freebsd.pipeline index 34ef138..41681fc 100644 --- a/jenkins/github/freebsd.pipeline +++ b/jenkins/github/freebsd.pipeline @@ -38,8 +38,7 @@ pipeline { set -x set -e -# `1 -eq 0`: Avoid doing cmake builds for freebsd until we install cmake on the CI boxes. -if [ 1 -eq 0 -a -d cmake ] +if [ -d cmake ] then cmake -B cmake-build-release -DBUILD_EXPERIMENTAL_PLUGINS=ON -DCMAKE_INSTALL_PREFIX=/tmp/ats cmake --build cmake-build-release -v
[trafficserver-ci] branch main updated: cmake for ubuntu 22.04 (#242)
This is an automated email from the ASF dual-hosted git repository. bneradt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/trafficserver-ci.git The following commit(s) were added to refs/heads/main by this push: new 55d1036 cmake for ubuntu 22.04 (#242) 55d1036 is described below commit 55d10368ff7e673acdbbfd8836917617212ec3e3 Author: Brian Neradt AuthorDate: Tue Oct 17 13:36:00 2023 -0500 cmake for ubuntu 22.04 (#242) Also fix up the dockerfiles for 22.04 and 23.04 --- docker/ubuntu2204/Dockerfile | 18 +++--- docker/ubuntu2304/Dockerfile | 14 +- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/docker/ubuntu2204/Dockerfile b/docker/ubuntu2204/Dockerfile index c50fd84..eccf131 100644 --- a/docker/ubuntu2204/Dockerfile +++ b/docker/ubuntu2204/Dockerfile @@ -2,17 +2,21 @@ FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update; \ -apt-get -y install build-essential llvm ccache \ +RUN <
[trafficserver] branch 9.2.x updated: Updated CHANGELOG
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.2.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.2.x by this push: new 5a72416187 Updated CHANGELOG 5a72416187 is described below commit 5a7241618778c6385b563a7195b0980a90db91b8 Author: Leif Hedstrom AuthorDate: Tue Oct 17 11:49:19 2023 -0600 Updated CHANGELOG --- CHANGELOG-9.2.4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG-9.2.4 b/CHANGELOG-9.2.4 index a099a586dc..7f4ca35302 100644 --- a/CHANGELOG-9.2.4 +++ b/CHANGELOG-9.2.4 @@ -4,9 +4,11 @@ Changes with Apache Traffic Server 9.2.4 #10507 - CID 1518601: dead code in test_log_interface.cc #10520 - CID 1513224: Cleanup dl handle while testing a plugin #10540 - LSan: Fix memory leak of Cache Unit Tests + #10543 - LSan: Fix memory leak of test_libhttp2 #10551 - Make NextHopConsistentHash unit test stable #10556 - s3_auth: Clear handling TSAction in the config_reloader #10579 - Fix typo in docs for sni.yml #10591 - Fix typo in block_errors documentation #10621 - Fixed h2spec 6.4.3 test (#10584) #10622 - Fix H2 debug message for a rate limit (#10583) + #10625 - Make bad disk detection more robust (backport for 9.2.x)
[trafficserver] branch 9.2.x updated: LSan: Fix memory leak of test_libhttp2 (#10543)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.2.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.2.x by this push: new ad13283987 LSan: Fix memory leak of test_libhttp2 (#10543) ad13283987 is described below commit ad132839878a3e6f15c13a8a162408ff991c8eaa Author: Masaori Koshiba AuthorDate: Tue Oct 17 07:27:44 2023 +0900 LSan: Fix memory leak of test_libhttp2 (#10543) * LSan: Fix memory leak of test_libhttp2 * Remove duplicated lambdas (cherry picked from commit 1882950bdcb03449c1b946d8a99981edbf323556) --- proxy/http2/unit_tests/test_HpackIndexingTable.cc | 30 +-- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/proxy/http2/unit_tests/test_HpackIndexingTable.cc b/proxy/http2/unit_tests/test_HpackIndexingTable.cc index 75ec83a061..7d72441094 100644 --- a/proxy/http2/unit_tests/test_HpackIndexingTable.cc +++ b/proxy/http2/unit_tests/test_HpackIndexingTable.cc @@ -36,6 +36,20 @@ static constexpr int MAX_TEST_FIELD_NUM = 8; static constexpr int MAX_REQUEST_HEADER_SIZE= 131072; static constexpr int MAX_TABLE_SIZE = 4096; +namespace +{ +/** + When HTTHdr::create is called, HTTPHdr::destroy needs to be called to free HdrHeap. + When Issue #10541 is fixed, we don't need this helper. +*/ +void +destroy_http_hdr(HTTPHdr *hdr) +{ + hdr->destroy(); + delete hdr; +} +} // namespace + TEST_CASE("HPACK low level APIs", "[hpack]") { SECTION("indexed_header_field") @@ -71,7 +85,7 @@ TEST_CASE("HPACK low level APIs", "[hpack]") HpackIndexingTable indexing_table(4096); for (const auto : indexed_test_case) { -std::unique_ptr headers(new HTTPHdr); +std::unique_ptr headers(new HTTPHdr, destroy_http_hdr); headers->create(HTTP_TYPE_REQUEST); MIMEField *field = mime_field_create(headers->m_heap, headers->m_http->m_fields_impl); MIMEFieldWrapper header(field, headers->m_heap, headers->m_http->m_fields_impl); @@ -224,7 +238,7 @@ TEST_CASE("HPACK low level APIs", "[hpack]") HpackIndexingTable indexing_table(4096); for (const auto : literal_test_case) { - std::unique_ptr headers(new HTTPHdr); + std::unique_ptr headers(new HTTPHdr, destroy_http_hdr); headers->create(HTTP_TYPE_REQUEST); MIMEField *field = mime_field_create(headers->m_heap, headers->m_http->m_fields_impl); MIMEFieldWrapper header(field, headers->m_heap, headers->m_http->m_fields_impl); @@ -349,7 +363,7 @@ TEST_CASE("HPACK high level APIs", "[hpack]") indexing_table.update_maximum_size(DYNAMIC_TABLE_SIZE_FOR_REGRESSION_TEST); for (unsigned int i = 0; i < sizeof(encoded_field_response_test_case) / sizeof(encoded_field_response_test_case[0]); i++) { - std::unique_ptr headers(new HTTPHdr); + std::unique_ptr headers(new HTTPHdr, destroy_http_hdr); headers->create(HTTP_TYPE_RESPONSE); for (unsigned int j = 0; j < sizeof(raw_field_response_test_case[i]) / sizeof(raw_field_response_test_case[i][0]); j++) { @@ -455,7 +469,7 @@ TEST_CASE("HPACK high level APIs", "[hpack]") HpackIndexingTable indexing_table(4096); for (unsigned int i = 0; i < sizeof(encoded_field_request_test_case) / sizeof(encoded_field_request_test_case[0]); i++) { - std::unique_ptr headers(new HTTPHdr); + std::unique_ptr headers(new HTTPHdr, destroy_http_hdr); headers->create(HTTP_TYPE_REQUEST); hpack_decode_header_block(indexing_table, headers.get(), encoded_field_request_test_case[i].encoded_field, @@ -488,7 +502,7 @@ TEST_CASE("HPACK high level APIs", "[hpack]") // add entries in dynamic table { - std::unique_ptr headers(new HTTPHdr); + std::unique_ptr headers(new HTTPHdr, destroy_http_hdr); headers->create(HTTP_TYPE_REQUEST); // C.3.1. First Request @@ -504,7 +518,7 @@ TEST_CASE("HPACK high level APIs", "[hpack]") // clear all entries by setting a maximum size of 0 { - std::unique_ptr headers(new HTTPHdr); + std::unique_ptr headers(new HTTPHdr, destroy_http_hdr); headers->create(HTTP_TYPE_REQUEST); uint8_t data[] = {0x20}; @@ -518,7 +532,7 @@ TEST_CASE("HPACK high level APIs", "[hpack]") // make the maximum size back to 4096 { - std::unique_ptr headers(new HTTPHdr); + std::unique_ptr headers(new HTTPHdr, destroy_http_hdr); headers->create(HTTP_TYPE_REQUEST); uint8_t data[] = {0x3f, 0xe1, 0x1f}; @@ -532,7 +546,7 @@ TEST_CASE("HPACK high level APIs", "[hpack]") // error with exceeding the limit (MAX_TABLE_SIZE) { - std::unique_ptr headers(new HTTPHdr); + std::unique_ptr headers(new HTTPHdr, destroy_http_hdr); headers->create(HTTP_TYPE_REQUEST); uint8_t data[] =
[trafficserver] branch 9.2.x updated: s3_auth: Clear handling TSAction in the config_reloader (#10556)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.2.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.2.x by this push: new 4afda660e7 s3_auth: Clear handling TSAction in the config_reloader (#10556) 4afda660e7 is described below commit 4afda660e72a755b59e38218bcdcbc40acb2f7ad Author: Masaori Koshiba AuthorDate: Mon Oct 16 08:03:54 2023 +0900 s3_auth: Clear handling TSAction in the config_reloader (#10556) (cherry picked from commit baeaf9a07f627a463f6fcfc0df6e0ae19e31fd0e) Conflicts: plugins/s3_auth/s3_auth.cc --- plugins/s3_auth/s3_auth.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/s3_auth/s3_auth.cc b/plugins/s3_auth/s3_auth.cc index b67c8cad11..52f56dea91 100644 --- a/plugins/s3_auth/s3_auth.cc +++ b/plugins/s3_auth/s3_auth.cc @@ -1050,7 +1050,9 @@ int config_reloader(TSCont cont, TSEvent event, void *edata) { TSDebug(PLUGIN_NAME, "reloading configs"); - S3Config *s3 = static_cast(TSContDataGet(cont)); + S3Config *s3 = static_cast(TSContDataGet(cont)); + s3->check_current_action(edata); + S3Config *file_config = gConfCache.get(s3->conf_fname()); if (!file_config || !file_config->valid()) { @@ -1061,7 +1063,6 @@ config_reloader(TSCont cont, TSEvent event, void *edata) { std::unique_lock lock(s3->reload_mutex); s3->copy_changes_from(file_config); -s3->check_current_action(edata); } if (s3->expiration() == 0) {
[trafficserver] branch 9.2.x updated: Make bad disk detection more robust (#10625)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.2.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.2.x by this push: new 3ac7beba39 Make bad disk detection more robust (#10625) 3ac7beba39 is described below commit 3ac7beba394a595f14af2c31cbe1155777acac51 Author: Mo Chen AuthorDate: Tue Oct 17 12:36:32 2023 -0500 Make bad disk detection more robust (#10625) -Report disk I/O failure synchronously. -Fix a signed/unsigned bug when checking disk I/O result. -Rename a couple of symbols for clarity. --- iocore/aio/AIO.cc | 10 +- iocore/aio/I_AIO.h| 2 +- iocore/aio/P_AIO.h| 15 +-- iocore/cache/Cache.cc | 14 +++--- iocore/cache/CacheDir.cc | 2 +- iocore/cache/CacheDisk.cc | 6 +++--- iocore/cache/CacheVol.cc | 2 +- iocore/cache/P_CacheVol.h | 4 ++-- 8 files changed, 29 insertions(+), 26 deletions(-) diff --git a/iocore/aio/AIO.cc b/iocore/aio/AIO.cc index 20a02125c7..215b250847 100644 --- a/iocore/aio/AIO.cc +++ b/iocore/aio/AIO.cc @@ -53,8 +53,8 @@ int thread_is_created = 0; RecInt cache_config_threads_per_disk = 12; RecInt api_config_threads_per_disk = 12; -RecRawStatBlock *aio_rsb = nullptr; -Continuation *aio_err_callbck = nullptr; +RecRawStatBlock *aio_rsb = nullptr; +Continuation *aio_err_callback = nullptr; // AIO Stats uint64_t aio_num_read = 0; uint64_t aio_bytes_read= 0; @@ -140,9 +140,9 @@ new_AIOCallback() } void -ink_aio_set_callback(Continuation *callback) +ink_aio_set_err_callback(Continuation *callback) { - aio_err_callbck = callback; + aio_err_callback = callback; } void @@ -401,7 +401,7 @@ cache_op(AIOCallbackInternal *op) res += err; } op->aio_result = res; -ink_assert(op->aio_result == (int64_t)a->aio_nbytes); +ink_assert(op->ok()); } return 1; } diff --git a/iocore/aio/I_AIO.h b/iocore/aio/I_AIO.h index 6144e188f6..1a21dd32e7 100644 --- a/iocore/aio/I_AIO.h +++ b/iocore/aio/I_AIO.h @@ -137,7 +137,7 @@ struct DiskHandler : public Continuation { void ink_aio_init(ts::ModuleVersion version); int ink_aio_start(); -void ink_aio_set_callback(Continuation *error_callback); +void ink_aio_set_err_callback(Continuation *error_callback); int ink_aio_read(AIOCallback *op, int fromAPI = 0); // fromAPI is a boolean to indicate if this is from a API call such as upload proxy feature diff --git a/iocore/aio/P_AIO.h b/iocore/aio/P_AIO.h index 18a8690e38..adb58e1149 100644 --- a/iocore/aio/P_AIO.h +++ b/iocore/aio/P_AIO.h @@ -41,10 +41,10 @@ static constexpr ts::ModuleVersion AIO_MODULE_INTERNAL_VERSION{AIO_MODULE_PUBLIC TS_INLINE int AIOCallback::ok() { - return (off_t)aiocb.aio_nbytes == (off_t)aio_result; + return (aiocb.aio_nbytes == static_cast(aio_result)) && (aio_result >= 0); } -extern Continuation *aio_err_callbck; +extern Continuation *aio_err_callback; #if AIO_MODE == AIO_MODE_NATIVE @@ -110,13 +110,16 @@ AIOCallbackInternal::io_complete(int event, void *data) { (void)event; (void)data; - if (aio_err_callbck && !ok()) { + if (aio_err_callback && !ok()) { AIOCallback *err_op = new AIOCallbackInternal(); err_op->aiocb.aio_fildes = this->aiocb.aio_fildes; err_op->aiocb.aio_lio_opcode = this->aiocb.aio_lio_opcode; -err_op->mutex= aio_err_callbck->mutex; -err_op->action = aio_err_callbck; -eventProcessor.schedule_imm(err_op); +err_op->mutex= aio_err_callback->mutex; +err_op->action = aio_err_callback; + +// Take this lock in-line because we want to stop other I/O operations on this disk ASAP +SCOPED_MUTEX_LOCK(lock, aio_err_callback->mutex, this_ethread()); +err_op->action.continuation->handleEvent(EVENT_NONE, err_op); } if (!action.cancelled) { action.continuation->handleEvent(AIO_EVENT_DONE, this); diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc index 20671bd780..384ee354a0 100644 --- a/iocore/cache/Cache.cc +++ b/iocore/cache/Cache.cc @@ -605,7 +605,7 @@ CacheProcessor::start_internal(int flags) memset(sds, 0, sizeof(Span *) * gndisks); gndisks = 0; - ink_aio_set_callback(new AIO_Callback_handler()); + ink_aio_set_err_callback(new AIO_failure_handler()); config_volumes.read_config_file(); @@ -1335,7 +1335,7 @@ Vol::handle_dir_clear(int event, void *data) if (event == AIO_EVENT_DONE) { op = static_cast(data); -if (static_cast(op->aio_result) != op->aiocb.aio_nbytes) { +if (!op->ok()) { Warning("unable to clear cache directory '%s'", hash_text.get()); disk->incrErrors(op); fd = -1; @@ -1364,7 +1364,7 @@ Vol::handle_dir_read(int event, void *data) AIOCallback *op = static_cast(data); if (event == AIO_EVENT_DONE) { -if (static_cast(op->aio_result) !=
[trafficserver] branch master updated: Cmake freebsd fix (#10631)
This is an automated email from the ASF dual-hosted git repository. cmcfarlen pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new d416614d02 Cmake freebsd fix (#10631) d416614d02 is described below commit d416614d026988224199d398e3cbebcec7b39efe Author: Chris McFarlen AuthorDate: Tue Oct 17 12:28:38 2023 -0500 Cmake freebsd fix (#10631) * add freebsd specific section with pthread * cleanup - Co-authored-by: Chris McFarlen --- CMakeLists.txt | 9 + 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 42236f369a..4c339d7979 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -507,6 +507,15 @@ if(HOST_OS STREQUAL "darwin") set(CMAKE_MACOSX_RPATH 1) endif(HOST_OS STREQUAL "darwin") +if(HOST_OS STREQUAL "freebsd") + set(CMAKE_THREAD_LIBS_INIT "-lpthread") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") + set(CMAKE_HAVE_THREADS_LIBRARY 1) + set(CMAKE_USE_WIN32_THREADS_INIT 0) + set(CMAKE_USE_PTHREADS_INIT 1) + set(THREADS_PREFER_PTHREAD_FLAG ON) +endif() + # Set the rpath for installed binaries set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib;${CMAKE_INSTALL_PREFIX}/lib64") set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
[trafficserver] branch master updated: Manually apply upstream fix for deprecation warning (#10630)
This is an automated email from the ASF dual-hosted git repository. cmcfarlen pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new 3114ca72db Manually apply upstream fix for deprecation warning (#10630) 3114ca72db is described below commit 3114ca72db2b987877add044cf9c15fbf01fdb5d Author: Chris McFarlen AuthorDate: Tue Oct 17 11:17:40 2023 -0500 Manually apply upstream fix for deprecation warning (#10630) --- lib/yamlcpp/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/yamlcpp/CMakeLists.txt b/lib/yamlcpp/CMakeLists.txt index c02fe28882..6275d48893 100644 --- a/lib/yamlcpp/CMakeLists.txt +++ b/lib/yamlcpp/CMakeLists.txt @@ -1,5 +1,6 @@ # 3.5 is actually available almost everywhere, but this a good minimum -cmake_minimum_required(VERSION 3.4) +# manual edit the upper version limit from upstream to avoid deprecation warning +cmake_minimum_required(VERSION 3.4...3.14) # enable MSVC_RUNTIME_LIBRARY target property # see https://cmake.org/cmake/help/latest/policy/CMP0091.html
[trafficserver-ci] branch main updated: Us -DCMAKE_CXX_STANDARD=20 to set c++20 (#241)
This is an automated email from the ASF dual-hosted git repository. bneradt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/trafficserver-ci.git The following commit(s) were added to refs/heads/main by this push: new 1129fc9 Us -DCMAKE_CXX_STANDARD=20 to set c++20 (#241) 1129fc9 is described below commit 1129fc9bf38fb30670aefba2168bdb11ecf2f2ab Author: Brian Neradt AuthorDate: Tue Oct 17 10:49:55 2023 -0500 Us -DCMAKE_CXX_STANDARD=20 to set c++20 (#241) Get rid of the ugly sed and use -DCMAKE_CXX_STANDARD=20 now that it is supported. --- jenkins/github/fedora.pipeline | 5 +++-- jenkins/github/ubuntu.pipeline | 4 +--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/jenkins/github/fedora.pipeline b/jenkins/github/fedora.pipeline index 34b8ed6..34bfbf0 100644 --- a/jenkins/github/fedora.pipeline +++ b/jenkins/github/fedora.pipeline @@ -50,8 +50,9 @@ pipeline { if [ -d cmake ] then -sed -i 's/CMAKE_CXX_STANDARD 17/CMAKE_CXX_STANDARD 20/g' CMakeLists.txt -cmake -B build --preset ci +# We don't use c++20 features yet, but we want to make +# sure we can build with the flag set. +cmake -B build --preset ci -DCMAKE_CXX_STANDARD=20 cmake --build build -v cmake --install build pushd build diff --git a/jenkins/github/ubuntu.pipeline b/jenkins/github/ubuntu.pipeline index c4844cf..219621d 100644 --- a/jenkins/github/ubuntu.pipeline +++ b/jenkins/github/ubuntu.pipeline @@ -56,9 +56,7 @@ pipeline { # We don't use c++20 features yet, but we want to make # sure we can build with the flag set. -sed -i 's/CMAKE_CXX_STANDARD 17/CMAKE_CXX_STANDARD 20/g' CMakeLists.txt - -cmake -B build --preset ci +cmake -B build --preset ci -DCMAKE_CXX_STANDARD=20 cmake --build build -v cmake --install build pushd build
[trafficserver-ci] branch main updated: cmake: preset ci-debian now runs hardening. (#240)
This is an automated email from the ASF dual-hosted git repository. bneradt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/trafficserver-ci.git The following commit(s) were added to refs/heads/main by this push: new fd87152 cmake: preset ci-debian now runs hardening. (#240) fd87152 is described below commit fd87152fe3cd5366a9f5dd56e6b2111e451bcff4 Author: Brian Neradt AuthorDate: Tue Oct 17 10:17:58 2023 -0500 cmake: preset ci-debian now runs hardening. (#240) Switch debian to cmake since there is a preset which applies hardening flags. --- jenkins/github/debian.pipeline | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jenkins/github/debian.pipeline b/jenkins/github/debian.pipeline index 99ece33..b6a2fd7 100644 --- a/jenkins/github/debian.pipeline +++ b/jenkins/github/debian.pipeline @@ -47,10 +47,9 @@ pipeline { sh '''#!/bin/bash set -x set -e -# `1 -eq 0 -a`: Always run autotools until -DENABLE_HARDENING=ON is implemented. -if [ 1 -eq 0 -a -d cmake ] +if [ -d cmake ] then -cmake -B cmake-build-release --preset ci -DOPENSSL_ROOT_DIR=/opt/openssl-quic -DENABLE_HARDENING=ON +cmake -B cmake-build-release --preset ci-debian -DOPENSSL_ROOT_DIR=/opt/openssl-quic cmake --build cmake-build-release -v cmake --install cmake-build-release pushd cmake-build-release
[trafficserver] branch master updated: Add 14 metrics for TCP connections created for tunnels. (#9403)
This is an automated email from the ASF dual-hosted git repository. wkaras pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new 124fd702ad Add 14 metrics for TCP connections created for tunnels. (#9403) 124fd702ad is described below commit 124fd702adfbd79131266e13197db432cbde78ff Author: Walt Karas AuthorDate: Tue Oct 17 09:52:10 2023 -0400 Add 14 metrics for TCP connections created for tunnels. (#9403) * Add 14 metrics for TCP connections created for tunnels. Add current and total metrics for TCP connetions towards clients for blind TCP tunnels, and TLS tunnel, forward, and partial blind tunnel SNI-based tunnels. Add current and total metrics for TCP connetions towards servers, for blind TCP tunnels and TLS tunnels. Only partial blind tunnel SNI-based tunnels are counted as TLS tunnels on the outgoing side, because they are only SNI-based tunnels where ATS termitates the TLS connection form the client and originates a new one towards the server. * VConnection::make_tunnel_endpoint() -> mark_as_tunnel_endpoint(). * Fix error in proxy.process.http.connect_requests. Due to change in usage of HttpTransact::State::method. * Rebase changes for PR 9869. * Rebase changes. iocore/net/Net.cc iocore/net/SSLNetVConnection.cc iocore/net/UnixNetVConnection.cc proxy/http/HttpTransact.cc --- .../statistics/core/http-connection.en.rst | 25 ++- .../monitoring/statistics/core/ssl.en.rst | 60 + iocore/eventsystem/I_VConnection.h | 8 ++- iocore/net/Net.cc | 77 ++ iocore/net/P_Net.h | 14 iocore/net/P_SSLNetVConnection.h | 3 + iocore/net/P_UnixNetVConnection.h | 19 ++ iocore/net/SSLNetVConnection.cc| 64 ++ iocore/net/UnixNetVConnection.cc | 52 +++ proxy/ProxyTransaction.cc | 8 +++ proxy/ProxyTransaction.h | 2 + proxy/http/HttpSM.cc | 5 ++ proxy/http/HttpTransact.h | 9 +-- tests/gold_tests/connect/connect.test.py | 37 ++- tests/gold_tests/connect/gold/metrics.gold | 21 ++ tests/gold_tests/remap/gold/remap-ws-metrics.gold | 21 ++ tests/gold_tests/remap/remap_ws.test.py| 34 ++ .../tls/gold/tls-partial-blind-tunnel-metrics.gold | 21 ++ .../tls/gold/tls-tunnel-forward-metrics.gold | 21 ++ tests/gold_tests/tls/gold/tls-tunnel-metrics.gold | 14 .../tls/tls_partial_blind_tunnel.test.py | 32 + tests/gold_tests/tls/tls_tunnel.test.py| 16 - tests/gold_tests/tls/tls_tunnel_forward.test.py| 32 + 23 files changed, 560 insertions(+), 35 deletions(-) diff --git a/doc/admin-guide/monitoring/statistics/core/http-connection.en.rst b/doc/admin-guide/monitoring/statistics/core/http-connection.en.rst index 28de812a0b..cd9a554e0b 100644 --- a/doc/admin-guide/monitoring/statistics/core/http-connection.en.rst +++ b/doc/admin-guide/monitoring/statistics/core/http-connection.en.rst @@ -164,10 +164,33 @@ HTTP Connection Counts the number of times current parent or next parent was detected +.. ts:stat:: global proxy.process.tunnel.total_client_connections_blind_tcp integer + :type: counter + + Total number of non-TLS TCP connections for tunnels where the far end is the client + initiated with an HTTP request (such as a CONNECT or WebSocket request). + +.. ts:stat:: global proxy.process.tunnel.current_client_connections_blind_tcp integer + :type: counter + + Current number of non-TLS TCP connections for tunnels where the far end is the client + initiated with an HTTP request (such as a CONNECT or WebSocket request). + +.. ts:stat:: global proxy.process.tunnel.total_server_connections_blind_tcp integer + :type: counter + + Total number of TCP connections for tunnels where the far end is the server, + except for those counted by ``proxy.process.tunnel.total_server_connections_tls`` + +.. ts:stat:: global proxy.process.tunnel.current_server_connections_blind_tcp integer + :type: counter + + Current number of TCP connections for tunnels where the far end is the server, + except for those counted by ``proxy.process.tunnel.current_server_connections_tls`` + HTTP/2 -- - .. ts:stat:: global proxy.process.http2.total_client_connections integer :type: counter diff --git a/doc/admin-guide/monitoring/statistics/core/ssl.en.rst b/doc/admin-guide/monitoring/statistics/core/ssl.en.rst index e18bae11c6..59eaa918a5 100644 ---
[trafficserver] branch master updated: Add presets for debian and ubuntu with hardening flags (#10629)
This is an automated email from the ASF dual-hosted git repository. cmcfarlen pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new bfef3a7a92 Add presets for debian and ubuntu with hardening flags (#10629) bfef3a7a92 is described below commit bfef3a7a92988119bb0c840b87eacb5d72f34a24 Author: Chris McFarlen AuthorDate: Tue Oct 17 05:49:43 2023 -0500 Add presets for debian and ubuntu with hardening flags (#10629) --- CMakePresets.json | 20 1 file changed, 20 insertions(+) diff --git a/CMakePresets.json b/CMakePresets.json index af4e200519..a087cffbe1 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -48,6 +48,14 @@ "CMAKE_C_FLAGS_DEBUG": "-g -fsanitize=address,undefined" } }, +{ + "name": "hardened", + "hidden": true, + "cacheVariables": { +"CMAKE_CXX_FLAGS": "-D_FORTIFY_SOURCE=2 -fPIE -fstack-protector", +"CMAKE_EXE_LINKER_FLAGS": "-pie -Wl,-z,relro -Wl,-z,now" + } +}, { "name": "dev-asan", "displayName": "dev with asan", @@ -106,6 +114,18 @@ "displayName": "CI Fedora Quiche Autest", "description": "CI Pipeline config for Fedora Linux (autest build)", "inherits": ["ci-fedora", "autest"] +}, +{ + "name": "ci-debian", + "displayName": "CI Debian Hardened Build", + "description": "CI Pipeline config for Debian with hardening flags", + "inherits": ["ci", "hardened"] +}, +{ + "name": "ci-ubuntu", + "displayName": "CI Ubuntu Hardened Build", + "description": "CI Pipeline config for Ubuntu with hardening flags", + "inherits": ["ci", "hardened"] } ], "buildPresets": [