diff --git a/.circleci/config.yml b/.circleci/config.yml index 5858de610..b31799e07 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,7 @@ jobs: command: mkdir -p ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config - run: name: Install system dependencies - command: sudo DEBIAN_FRONTEND=noninteractive ACCEPT_EULA=Y apt-get -y update; sudo DEBIAN_FRONTEND=noninteractive ACCEPT_EULA=Y apt-get install -y curl zip unzip tar libssl-dev libcurl4-openssl-dev libunwind-dev git cmake ninja-build libutempter-dev build-essential openssh-server protobuf-compiler libsodium-dev libgflags-dev libprotobuf-dev + command: sudo DEBIAN_FRONTEND=noninteractive ACCEPT_EULA=Y apt-get -y update; sudo DEBIAN_FRONTEND=noninteractive ACCEPT_EULA=Y apt-get install -y curl zip unzip tar libssl-dev libcurl4-openssl-dev libunwind-dev git cmake ninja-build libutempter-dev build-essential openssh-server protobuf-compiler libsodium-dev libgflags-dev libprotobuf-dev libtool libtool-bin autoconf - checkout - run: name: Set up ssh & known_hosts @@ -67,7 +67,7 @@ jobs: command: mkdir -p ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config - run: name: Install system dependencies - command: sudo DEBIAN_FRONTEND=noninteractive ACCEPT_EULA=Y apt-get -y update; sudo DEBIAN_FRONTEND=noninteractive ACCEPT_EULA=Y apt-get install -y curl zip unzip tar libssl-dev libcurl4-openssl-dev libunwind-dev git cmake ninja-build libutempter-dev build-essential openssh-server + command: sudo DEBIAN_FRONTEND=noninteractive ACCEPT_EULA=Y apt-get -y update; sudo DEBIAN_FRONTEND=noninteractive ACCEPT_EULA=Y apt-get install -y curl zip unzip tar libssl-dev libcurl4-openssl-dev libunwind-dev git cmake ninja-build libutempter-dev build-essential openssh-server libtool libtool-bin autoconf - checkout - run: name: Set up ssh & known_hosts diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 67dbf9b50..32dd43949 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -18,7 +18,7 @@ jobs: mkdir -p ~/.ssh/ echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config sudo apt-get update - sudo DEBIAN_FRONTEND=noninteractive ACCEPT_EULA=Y apt-get install -y curl zip unzip tar libssl-dev libcurl4-openssl-dev libunwind-dev git cmake ninja-build gdb protobuf-compiler libsodium-dev libgflags-dev libprotobuf-dev libutempter-dev g++ lcov + sudo DEBIAN_FRONTEND=noninteractive ACCEPT_EULA=Y apt-get install -y curl zip unzip tar libssl-dev libcurl4-openssl-dev libunwind-dev git cmake ninja-build gdb protobuf-compiler libsodium-dev libgflags-dev libprotobuf-dev libutempter-dev g++ lcov libtool libtool-bin autoconf echo "Host localhost\n Port 2222\n\n" >> ~/.ssh/config @@ -50,7 +50,7 @@ jobs: # The key includes: hash of the vcpkg.json file, the hash of the vcpkg Git commit id, and the used vcpkg's triplet. The vcpkg's commit id would suffice, but computing an hash out it does not harm. # Note: given a key, the cache content is immutable. If a cache entry has been created improperly, in order the recreate the right content the key must be changed as well, and it must be brand new (i.e. not existing already). key: | - et-vcpkg-${{ hashFiles( 'vcpkg.json' ) }}-${{ hashFiles( '.git/modules/external/vcpkg/HEAD' )}}-linux-codecov + et-vcpkg-${{ hashFiles( 'vcpkg.json' ) }}-${{ hashFiles( '.git/modules/external/vcpkg/HEAD' )}}-linux-codecov-1 - name: Build run: | diff --git a/.github/workflows/linux_ci.yml b/.github/workflows/linux_ci.yml index 74687483d..bd2437658 100644 --- a/.github/workflows/linux_ci.yml +++ b/.github/workflows/linux_ci.yml @@ -21,7 +21,7 @@ jobs: mkdir -p ~/.ssh/ echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config sudo apt-get update - sudo DEBIAN_FRONTEND=noninteractive ACCEPT_EULA=Y apt-get install -y curl zip unzip tar libssl-dev libcurl4-openssl-dev libunwind-dev git cmake ninja-build gdb protobuf-compiler libsodium-dev libgflags-dev libprotobuf-dev libutempter-dev g++ + sudo DEBIAN_FRONTEND=noninteractive ACCEPT_EULA=Y apt-get install -y curl zip unzip tar libssl-dev libcurl4-openssl-dev libunwind-dev git cmake ninja-build gdb protobuf-compiler libsodium-dev libgflags-dev libprotobuf-dev libutempter-dev g++ libtool libtool-bin autoconf echo "Host localhost\n Port 2222\n\n" >> ~/.ssh/config @@ -53,7 +53,7 @@ jobs: # The key includes: hash of the vcpkg.json file, the hash of the vcpkg Git commit id, and the used vcpkg's triplet. The vcpkg's commit id would suffice, but computing an hash out it does not harm. # Note: given a key, the cache content is immutable. If a cache entry has been created improperly, in order the recreate the right content the key must be changed as well, and it must be brand new (i.e. not existing already). key: | - et-vcpkg-${{ hashFiles( 'vcpkg.json' ) }}-${{ hashFiles( '.git/modules/external/vcpkg/HEAD' )}}-linux-${{ matrix.sanitize }} + et-vcpkg-${{ hashFiles( 'vcpkg.json' ) }}-${{ hashFiles( '.git/modules/external/vcpkg/HEAD' )}}-linux-${{ matrix.sanitize }}-1 - name: Build with ubsan run: | diff --git a/.github/workflows/mac_ci.yml b/.github/workflows/mac_ci.yml index 7bdf5028f..6d739150a 100644 --- a/.github/workflows/mac_ci.yml +++ b/.github/workflows/mac_ci.yml @@ -17,7 +17,7 @@ jobs: run: | mkdir -p ~/.ssh/ echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config - brew install cmake ninja; brew install protobuf libsodium + brew install cmake ninja; brew install protobuf libsodium automake autoconf libtool auth_header="$(git config --local --get http.https://github.com/.extraheader)" git submodule sync --recursive git submodule update --init --force --recursive @@ -39,7 +39,7 @@ jobs: # The key includes: hash of the vcpkg.json file, the hash of the vcpkg Git commit id, and the used vcpkg's triplet. The vcpkg's commit id would suffice, but computing an hash out it does not harm. # Note: given a key, the cache content is immutable. If a cache entry has been created improperly, in order the recreate the right content the key must be changed as well, and it must be brand new (i.e. not existing already). key: | - et-vcpkg-${{ hashFiles( 'vcpkg.json' ) }}-${{ hashFiles( '.git/modules/external/vcpkg/HEAD' )}}-osx + et-vcpkg-${{ hashFiles( 'vcpkg.json' ) }}-${{ hashFiles( '.git/modules/external/vcpkg/HEAD' )}}-osx-1 - name: Test with ubsan @@ -65,7 +65,7 @@ jobs: git submodule update --init --force --recursive mkdir -p ~/.ssh/ echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config - brew install cmake ninja; brew install protobuf libsodium + brew install cmake ninja; brew install protobuf libsodium automake autoconf libtool # Restore both vcpkg and its artifacts from the GitHub cache service. - name: Restore vcpkg and its artifacts. @@ -84,7 +84,7 @@ jobs: # The key includes: hash of the vcpkg.json file, the hash of the vcpkg Git commit id, and the used vcpkg's triplet. The vcpkg's commit id would suffice, but computing an hash out it does not harm. # Note: given a key, the cache content is immutable. If a cache entry has been created improperly, in order the recreate the right content the key must be changed as well, and it must be brand new (i.e. not existing already). key: | - et-vcpkg-${{ hashFiles( 'vcpkg.json' ) }}-${{ hashFiles( '.git/modules/external/vcpkg/HEAD' )}}-osx + et-vcpkg-${{ hashFiles( 'vcpkg.json' ) }}-${{ hashFiles( '.git/modules/external/vcpkg/HEAD' )}}-osx-1 - name: Test with asan run: | @@ -109,7 +109,7 @@ jobs: git submodule update --init --force --recursive mkdir -p ~/.ssh/ echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config - brew install cmake ninja; brew install protobuf libsodium + brew install cmake ninja; brew install protobuf libsodium automake autoconf libtool # Restore both vcpkg and its artifacts from the GitHub cache service. - name: Restore vcpkg and its artifacts. @@ -128,7 +128,7 @@ jobs: # The key includes: hash of the vcpkg.json file, the hash of the vcpkg Git commit id, and the used vcpkg's triplet. The vcpkg's commit id would suffice, but computing an hash out it does not harm. # Note: given a key, the cache content is immutable. If a cache entry has been created improperly, in order the recreate the right content the key must be changed as well, and it must be brand new (i.e. not existing already). key: | - et-vcpkg-${{ hashFiles( 'vcpkg.json' ) }}-${{ hashFiles( '.git/modules/external/vcpkg/HEAD' )}}-osx + et-vcpkg-${{ hashFiles( 'vcpkg.json' ) }}-${{ hashFiles( '.git/modules/external/vcpkg/HEAD' )}}-osx-1 - name: Test with msan run: | @@ -153,7 +153,7 @@ jobs: git submodule update --init --force --recursive mkdir -p ~/.ssh/ echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config - brew install cmake ninja; brew install protobuf libsodium + brew install cmake ninja; brew install protobuf libsodium automake autoconf libtool # Restore both vcpkg and its artifacts from the GitHub cache service. - name: Restore vcpkg and its artifacts. @@ -172,7 +172,7 @@ jobs: # The key includes: hash of the vcpkg.json file, the hash of the vcpkg Git commit id, and the used vcpkg's triplet. The vcpkg's commit id would suffice, but computing an hash out it does not harm. # Note: given a key, the cache content is immutable. If a cache entry has been created improperly, in order the recreate the right content the key must be changed as well, and it must be brand new (i.e. not existing already). key: | - et-vcpkg-${{ hashFiles( 'vcpkg.json' ) }}-${{ hashFiles( '.git/modules/external/vcpkg/HEAD' )}}-osx + et-vcpkg-${{ hashFiles( 'vcpkg.json' ) }}-${{ hashFiles( '.git/modules/external/vcpkg/HEAD' )}}-osx-1 - name: Test with tsan run: | diff --git a/.github/workflows/novcpkg_build_master.yml b/.github/workflows/novcpkg_build_master.yml index 42429d641..02359710c 100644 --- a/.github/workflows/novcpkg_build_master.yml +++ b/.github/workflows/novcpkg_build_master.yml @@ -54,7 +54,7 @@ jobs: libunwind-dev if: matrix.os == 'ubuntu-latest' - name: Install Dependencies (macOS) - run: brew update && brew install ninja cmake pkg-config curl openssl protobuf libsodium + run: brew update && brew install ninja cmake pkg-config curl openssl protobuf libsodium automake autoconf libtool if: matrix.os == 'macos-latest' - uses: actions/checkout@v4 diff --git a/.github/workflows/novcpkg_build_release.yml b/.github/workflows/novcpkg_build_release.yml index 3abe30e70..3b6e3aa6c 100644 --- a/.github/workflows/novcpkg_build_release.yml +++ b/.github/workflows/novcpkg_build_release.yml @@ -56,7 +56,7 @@ jobs: libunwind-dev if: matrix.os == 'ubuntu-latest' - name: Install Dependencies (macOS) - run: brew update && brew install ninja cmake pkg-config curl openssl protobuf libsodium + run: brew update && brew install ninja cmake pkg-config curl openssl protobuf libsodium automake autoconf libtool if: matrix.os == 'macos-latest' - uses: actions/checkout@v4 diff --git a/.github/workflows/vcpkg_build_master.yml b/.github/workflows/vcpkg_build_master.yml index 1b5c6ac9b..c87edc2ce 100644 --- a/.github/workflows/vcpkg_build_master.yml +++ b/.github/workflows/vcpkg_build_master.yml @@ -62,7 +62,7 @@ jobs: run: choco install -y ninja if: matrix.os == 'windows-latest' - name: Install Dependencies (macOS) - run: brew update && brew install ninja cmake + run: brew update && brew install ninja cmake automake autoconf libtool if: matrix.os == 'macos-latest' - uses: actions/checkout@v4 @@ -89,7 +89,7 @@ jobs: # The key includes: hash of the vcpkg.json file, the hash of the vcpkg Git commit id, and the used vcpkg's triplet. The vcpkg's commit id would suffice, but computing an hash out it does not harm. # Note: given a key, the cache content is immutable. If a cache entry has been created improperly, in order the recreate the right content the key must be changed as well, and it must be brand new (i.e. not existing already). key: | - et-2-vcpkg-${{ hashFiles( 'vcpkg.json' ) }}-${{ hashFiles( '.git/modules/external/vcpkg/HEAD' )}}-${{ matrix.os }}-${{ matrix.gcc }}-master + et-vcpkg-${{ hashFiles( 'vcpkg.json' ) }}-${{ hashFiles( '.git/modules/external/vcpkg/HEAD' )}}-${{ matrix.os }}-${{ matrix.gcc }}-master-1 - name: Show content of workspace after cache has been restored run: find $RUNNER_WORKSPACE diff --git a/.github/workflows/vcpkg_build_release.yml b/.github/workflows/vcpkg_build_release.yml index aad7eabaa..ef92c1339 100644 --- a/.github/workflows/vcpkg_build_release.yml +++ b/.github/workflows/vcpkg_build_release.yml @@ -64,7 +64,7 @@ jobs: run: choco install -y ninja if: matrix.os == 'windows-latest' - name: Install Dependencies (macOS) - run: brew update && brew install ninja cmake + run: brew update && brew install ninja cmake automake autoconf libtool if: matrix.os == 'macos-latest' - uses: actions/checkout@v4 @@ -91,7 +91,7 @@ jobs: # The key includes: hash of the vcpkg.json file, the hash of the vcpkg Git commit id, and the used vcpkg's triplet. The vcpkg's commit id would suffice, but computing an hash out it does not harm. # Note: given a key, the cache content is immutable. If a cache entry has been created improperly, in order the recreate the right content the key must be changed as well, and it must be brand new (i.e. not existing already). key: | - et-2-vcpkg-${{ hashFiles( 'vcpkg.json' ) }}-${{ hashFiles( '.git/modules/external/vcpkg/HEAD' )}}-${{ matrix.os }}-${{ matrix.gcc }}-release + et-vcpkg-${{ hashFiles( 'vcpkg.json' ) }}-${{ hashFiles( '.git/modules/external/vcpkg/HEAD' )}}-${{ matrix.os }}-${{ matrix.gcc }}-release-1 - name: Show content of workspace after cache has been restored run: find $RUNNER_WORKSPACE diff --git a/external/vcpkg b/external/vcpkg index 3f806e04f..67cc1677c 160000 --- a/external/vcpkg +++ b/external/vcpkg @@ -1 +1 @@ -Subproject commit 3f806e04fdcf30df33c7b445590c9ac13afef946 +Subproject commit 67cc1677c3bf5c23ea14b9d2416c7422fdeac492 diff --git a/src/base/SocketHandler.cpp b/src/base/SocketHandler.cpp index 3e6473aa0..90fb0a4ba 100644 --- a/src/base/SocketHandler.cpp +++ b/src/base/SocketHandler.cpp @@ -3,7 +3,7 @@ #include "base64.h" namespace et { -#define SOCKET_DATA_TRANSFER_TIMEOUT (10) +#define SOCKET_DATA_TRANSFER_TIMEOUT (30) void SocketHandler::readAll(int fd, void* buf, size_t count, bool timeout) { time_t startTime = time(NULL); @@ -11,7 +11,7 @@ void SocketHandler::readAll(int fd, void* buf, size_t count, bool timeout) { while (pos < count) { if (!waitOnSocketData(fd)) { time_t currentTime = time(NULL); - if (timeout && currentTime > startTime + 10) { + if (timeout && currentTime > startTime + SOCKET_DATA_TRANSFER_TIMEOUT) { throw std::runtime_error("Socket Timeout"); } continue; @@ -46,7 +46,7 @@ int SocketHandler::writeAllOrReturn(int fd, const void* buf, size_t count) { time_t startTime = time(NULL); while (pos < count) { time_t currentTime = time(NULL); - if (currentTime > startTime + 10) { + if (currentTime > startTime + SOCKET_DATA_TRANSFER_TIMEOUT) { return -1; } ssize_t bytesWritten = write(fd, ((const char*)buf) + pos, count - pos); @@ -77,7 +77,7 @@ void SocketHandler::writeAllOrThrow(int fd, const void* buf, size_t count, size_t pos = 0; while (pos < count) { time_t currentTime = time(NULL); - if (timeout && currentTime > startTime + 10) { + if (timeout && currentTime > startTime + SOCKET_DATA_TRANSFER_TIMEOUT) { throw std::runtime_error("Socket Timeout"); } ssize_t bytesWritten = write(fd, ((const char*)buf) + pos, count - pos); diff --git a/src/terminal/TelemetryService.cpp b/src/terminal/TelemetryService.cpp index 75a6df790..bb616be6c 100644 --- a/src/terminal/TelemetryService.cpp +++ b/src/terminal/TelemetryService.cpp @@ -79,6 +79,7 @@ void shutdownTelemetry() { if (TelemetryService::exists()) { cerr << "Shutting down sentry" << endl; auto ts = TelemetryService::get(); + TelemetryService::destroy(); ts->shutdown(); } }