From 7e138b5a7c787797d80cef0f744193a84fc36e87 Mon Sep 17 00:00:00 2001 From: Roberto Scolaro Date: Fri, 19 Jun 2026 14:01:50 +0000 Subject: [PATCH 1/7] update(deps): bump LuaJIT to latest v2.1 (8e6520a) Signed-off-by: Roberto Scolaro --- cmake/modules/luajit.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/modules/luajit.cmake b/cmake/modules/luajit.cmake index 3359e45e68..fddd345381 100644 --- a/cmake/modules/luajit.cmake +++ b/cmake/modules/luajit.cmake @@ -72,8 +72,8 @@ else() elseif(APPLE) ExternalProject_Add(luajit PREFIX "${PROJECT_BINARY_DIR}/luajit-prefix" - URL "https://github.com/LuaJIT/LuaJIT/archive/8635cbabf3094c4d8bd00578c7d812bea87bb2d3.tar.gz" - URL_HASH "SHA256=835035b244c3dc3d3d19bdd5ac623af90b84207e6330fb78f9fa51d6e200d760" + URL "https://github.com/LuaJIT/LuaJIT/archive/8e6520a7aecd0517e792b359afbbfd7274791f5f.tar.gz" + URL_HASH "SHA256=9c4c370559352e0622231d5a1f28e95ff56e2dce6308238e6588b0943aac5e63" CONFIGURE_COMMAND "" BUILD_COMMAND make MACOSX_DEPLOYMENT_TARGET=10.14 BUILD_IN_SOURCE 1 @@ -83,7 +83,7 @@ else() ExternalProject_Add(luajit PREFIX "${PROJECT_BINARY_DIR}/luajit-prefix" GIT_REPOSITORY "https://github.com/LuaJIT/LuaJIT" - GIT_TAG "f3c856915b4ce7ccd24341e8ac73e8a9fd934171" + GIT_TAG "8e6520a7aecd0517e792b359afbbfd7274791f5f" CONFIGURE_COMMAND "" BUILD_COMMAND make BUILD_IN_SOURCE 1 @@ -100,7 +100,7 @@ else() ExternalProject_Add(luajit PREFIX "${PROJECT_BINARY_DIR}/luajit-prefix" GIT_REPOSITORY "https://github.com/LuaJIT/LuaJIT" - GIT_TAG "f3c856915b4ce7ccd24341e8ac73e8a9fd934171" + GIT_TAG "8e6520a7aecd0517e792b359afbbfd7274791f5f" CONFIGURE_COMMAND "" BUILD_COMMAND msvcbuild.bat static BUILD_BYPRODUCTS ${LUAJIT_LIB} From 3279e0c5fc1d0a5e24ba0b29ba71c351ade18876 Mon Sep 17 00:00:00 2001 From: Roberto Scolaro Date: Fri, 19 Jun 2026 14:05:07 +0000 Subject: [PATCH 2/7] fix(sysdig): handle Windows plugin paths and improve error reporting - CMakeLists: use the $ generator expression instead of the MSBuild-only $(Configuration) placeholder when copying chisels/binaries - sysdig: don't mistake a Windows drive-letter colon ("C:\path") for the name:config separator when parsing -H plugins and inputs - plugin_utils: accept backslash and drive-letter plugin paths on Windows, and reuse the canonical plugin name to avoid duplicate entries - sysdig: print std::exception messages (and a note for unknown exceptions) instead of swallowing them silently Signed-off-by: Roberto Scolaro --- userspace/sysdig/CMakeLists.txt | 6 +++--- userspace/sysdig/sysdig.cpp | 28 +++++++++++++++++++++++-- userspace/sysdig/utils/plugin_utils.cpp | 27 +++++++++++++++++++++--- 3 files changed, 53 insertions(+), 8 deletions(-) diff --git a/userspace/sysdig/CMakeLists.txt b/userspace/sysdig/CMakeLists.txt index 4acbb0300c..a534bd84ad 100644 --- a/userspace/sysdig/CMakeLists.txt +++ b/userspace/sysdig/CMakeLists.txt @@ -164,17 +164,17 @@ else() add_custom_command(TARGET sysdig POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_directory "${PROJECT_SOURCE_DIR}/userspace/sysdig/chisels" - "${PROJECT_BINARY_DIR}/$(Configuration)/chisels") + "${PROJECT_BINARY_DIR}/$/chisels") add_custom_command(TARGET sysdig POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_if_different $ - "${PROJECT_BINARY_DIR}/$(Configuration)/sysdig.exe") + "${PROJECT_BINARY_DIR}/$/sysdig.exe") add_custom_command(TARGET csysdig POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_if_different $ - "${PROJECT_BINARY_DIR}/$(Configuration)/csysdig.exe") + "${PROJECT_BINARY_DIR}/$/csysdig.exe") install(TARGETS sysdig DESTINATION programs diff --git a/userspace/sysdig/sysdig.cpp b/userspace/sysdig/sysdig.cpp index 8c87d32723..7d6265ebd1 100644 --- a/userspace/sysdig/sysdig.cpp +++ b/userspace/sysdig/sysdig.cpp @@ -976,6 +976,23 @@ std::string escape_output_format(const std::string& s) return ss.str(); } +// +// Find the ':' separating a plugin/input name from its trailing +// config/params (e.g. "name:config"). On Windows, a leading drive-letter +// colon ("C:\path") must not be mistaken for that separator. +// +static size_t find_name_config_separator(const std::string& s) +{ + size_t start = 0; +#ifdef _WIN32 + if(s.size() >= 2 && s[1] == ':') + { + start = 2; + } +#endif + return s.find(':', start); +} + // // ARGUMENT PARSING AND PROGRAM SETUP // @@ -1230,7 +1247,7 @@ sysdig_init_res sysdig_init(int argc, char **argv) case 'H': { std::string pluginname = optarg; - size_t cpos = pluginname.find(':'); + size_t cpos = find_name_config_separator(pluginname); std::string pgname = pluginname; std::string pginitconf; // Extract init config from string if present @@ -1252,7 +1269,7 @@ sysdig_init_res sysdig_init(int argc, char **argv) break; } - size_t cpos = inputname.find(':'); + size_t cpos = find_name_config_separator(inputname); std::string pgname = inputname; std::string pgpars; // Extract open params from string if present @@ -1976,8 +1993,15 @@ sysdig_init_res sysdig_init(int argc, char **argv) handle_end_of_file(NULL, opener.options.print_progress, reset_colors); res.m_res = EXIT_FAILURE; } + catch(const std::exception& e) + { + std::cerr << e.what() << std::endl; + handle_end_of_file(NULL, opener.options.print_progress, reset_colors); + res.m_res = EXIT_FAILURE; + } catch(...) { + std::cerr << "unknown exception" << std::endl; handle_end_of_file(NULL, opener.options.print_progress, reset_colors); res.m_res = EXIT_FAILURE; } diff --git a/userspace/sysdig/utils/plugin_utils.cpp b/userspace/sysdig/utils/plugin_utils.cpp index e419e73a8c..f7502fbbbf 100644 --- a/userspace/sysdig/utils/plugin_utils.cpp +++ b/userspace/sysdig/utils/plugin_utils.cpp @@ -279,15 +279,36 @@ void plugin_utils::load_plugin(sinsp *inspector, const std::string& name) } } - // If it is a path, register it - if (name.find('/') != std::string::npos) + // If it is a path, register it. + if (name.find('/') != std::string::npos +#ifdef _WIN32 + // On Windows, also accept backslash separators and drive-letter + // paths like "C:\path\plugin.dll". + || name.find('\\') != std::string::npos + || (name.size() >= 2 && name[1] == ':') +#endif + ) { + // Load the plugin to get its canonical name, then check if an existing + // entry (e.g., from read_plugins_from_dirs) already represents it. + // If so, update that entry rather than creating a duplicate. + std::string canonical_name = inspector->register_plugin(name)->name(); + for (auto &existing : m_plugins) + { + if (existing.names.find(canonical_name) != existing.names.end()) + { + existing.used = true; + existing.libpath = name; + existing.names.insert(name); + return; + } + } plugin_entry p; p.used = true; p.inited = false; p.libpath = name; p.names.insert(name); - p.names.insert(p.get_plugin(inspector)->name()); + p.names.insert(canonical_name); m_plugins.push_back(p); return; } From 6fdaf8ddb8a37b08e4df805a0fe9b384600a61f4 Mon Sep 17 00:00:00 2001 From: Roberto Scolaro Date: Fri, 19 Jun 2026 14:31:36 +0000 Subject: [PATCH 3/7] fix(ci): quote CMAKE_POLICY_VERSION_MINIMUM to prevent value truncation On the newer windows-latest image the unquoted -DCMAKE_POLICY_VERSION_MINIMUM=3.5 was being split so CMake only saw "3", failing configure with "Invalid CMAKE_POLICY_VERSION_MINIMUM value '3'". Quote it to keep 3.5 intact. Signed-off-by: Roberto Scolaro --- .github/workflows/ci.yaml | 2 +- .github/workflows/release-draft.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5089c38295..f9f66cb937 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -134,7 +134,7 @@ jobs: choco install nsis -y - name: Build run: | - cmake -Wno-dev -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -S . -B build + cmake -Wno-dev "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" -S . -B build cmake --build build --target package --config Release - name: Upload Artifacts uses: actions/upload-artifact@v4 diff --git a/.github/workflows/release-draft.yaml b/.github/workflows/release-draft.yaml index 37a539a0e0..d1ecfe8685 100644 --- a/.github/workflows/release-draft.yaml +++ b/.github/workflows/release-draft.yaml @@ -129,7 +129,7 @@ jobs: choco install nsis -y - name: Build run: | - cmake -Wno-dev -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DBUILD_DRIVER=OFF -DSYSDIG_VERSION="${{ env.BUILD_VERSION }}" -S . -B build + cmake -Wno-dev "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" -DBUILD_DRIVER=OFF -DSYSDIG_VERSION="${{ env.BUILD_VERSION }}" -S . -B build cmake --build build --target package --config Release - name: Upload Artifacts uses: actions/upload-artifact@v4 From 2e546d59307ab152048fc48f1b377e8ea0ccc29e Mon Sep 17 00:00:00 2001 From: Roberto Scolaro Date: Fri, 19 Jun 2026 14:45:46 +0000 Subject: [PATCH 4/7] feat(ci): build sysdig for Windows arm64 Add a windows-11-arm/arm64 entry to both the CI and release-draft build matrices, and broaden the NSIS install step to run on any Windows runner. Signed-off-by: Roberto Scolaro --- .github/workflows/ci.yaml | 8 ++++++-- .github/workflows/release-draft.yaml | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f9f66cb937..15e34f117f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -110,12 +110,16 @@ jobs: name: build-sysdig-${{ matrix.os }}-${{ matrix.arch }} strategy: matrix: - os: [windows-latest, macos-15-intel, macos-14] + os: [windows-latest, windows-11-arm, macos-15-intel, macos-14] include: - os: windows-latest artifact_name: win artifact_ext: exe arch: x86_64 + - os: windows-11-arm + artifact_name: win + artifact_ext: exe + arch: arm64 - os: macos-15-intel artifact_name: osx artifact_ext: dmg @@ -129,7 +133,7 @@ jobs: - name: Checkout Sysdig uses: actions/checkout@v4 - name: Install NSIS - if: matrix.os == 'windows-latest' + if: startsWith(matrix.os, 'windows') run: | choco install nsis -y - name: Build diff --git a/.github/workflows/release-draft.yaml b/.github/workflows/release-draft.yaml index d1ecfe8685..b0bd7c7f4f 100644 --- a/.github/workflows/release-draft.yaml +++ b/.github/workflows/release-draft.yaml @@ -105,12 +105,16 @@ jobs: name: build-release-others strategy: matrix: - os: [windows-latest, macos-15-intel, macos-14] + os: [windows-latest, windows-11-arm, macos-15-intel, macos-14] include: - os: windows-latest artifact_name: win artifact_ext: exe arch: x86_64 + - os: windows-11-arm + artifact_name: win + artifact_ext: exe + arch: arm64 - os: macos-15-intel artifact_name: osx artifact_ext: dmg @@ -124,7 +128,7 @@ jobs: - name: Checkout Sysdig uses: actions/checkout@v4 - name: Install NSIS - if: matrix.os == 'windows-latest' + if: startsWith(matrix.os, 'windows') run: | choco install nsis -y - name: Build From bacf21b1f3cc6474b843f9e503bef4e6058d8002 Mon Sep 17 00:00:00 2001 From: Roberto Scolaro Date: Fri, 19 Jun 2026 15:26:26 +0000 Subject: [PATCH 5/7] fix(ci): prevent MSBuild node-reuse hang on Windows arm64 The container plugin is built from source on Windows, and its nested cmake configure runs a try_compile. On the windows-11-arm runner a leftover MSBuild node deadlocks that try_compile, hanging the whole build until the 6h timeout. Set MSBUILDDISABLENODEREUSE=1 for the Build step so each MSBuild invocation (including the nested try_compile) exits cleanly, and add a 45m job timeout so any future hang fails fast instead of blocking a runner for hours. Signed-off-by: Roberto Scolaro --- .github/workflows/ci.yaml | 6 ++++++ .github/workflows/release-draft.yaml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 15e34f117f..5ad3c7ba0e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -108,6 +108,7 @@ jobs: build-sysdig-others: name: build-sysdig-${{ matrix.os }}-${{ matrix.arch }} + timeout-minutes: 45 strategy: matrix: os: [windows-latest, windows-11-arm, macos-15-intel, macos-14] @@ -137,6 +138,11 @@ jobs: run: | choco install nsis -y - name: Build + # Disable MSBuild node reuse: on the windows-11-arm runner a leftover + # MSBuild node deadlocks the nested try_compile of the container plugin + # configure step, hanging the whole build. + env: + MSBUILDDISABLENODEREUSE: 1 run: | cmake -Wno-dev "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" -S . -B build cmake --build build --target package --config Release diff --git a/.github/workflows/release-draft.yaml b/.github/workflows/release-draft.yaml index b0bd7c7f4f..09e37ceddc 100644 --- a/.github/workflows/release-draft.yaml +++ b/.github/workflows/release-draft.yaml @@ -103,6 +103,7 @@ jobs: build-release-others: name: build-release-others + timeout-minutes: 45 strategy: matrix: os: [windows-latest, windows-11-arm, macos-15-intel, macos-14] @@ -132,6 +133,11 @@ jobs: run: | choco install nsis -y - name: Build + # Disable MSBuild node reuse: on the windows-11-arm runner a leftover + # MSBuild node deadlocks the nested try_compile of the container plugin + # configure step, hanging the whole build. + env: + MSBUILDDISABLENODEREUSE: 1 run: | cmake -Wno-dev "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" -DBUILD_DRIVER=OFF -DSYSDIG_VERSION="${{ env.BUILD_VERSION }}" -S . -B build cmake --build build --target package --config Release From 09133d1b86190e82ad11c4a4a569ce8e68695002 Mon Sep 17 00:00:00 2001 From: Roberto Scolaro Date: Fri, 19 Jun 2026 16:42:52 +0000 Subject: [PATCH 6/7] fix(cmake): disable RE-flex NEON run-test in container plugin on Windows arm64 On Windows we build the container plugin from source. It FetchContent's RE-flex v5.3.0, whose SIMDTestAndSetup.cmake uses check_cxx_source_runs() to detect NEON. On the windows-11-arm runner that test compiles and then *runs* a scratch executable, which hangs the build until the job timeout. Pass -DUSE_NEON=OFF to the plugin's configure so RE-flex skips the NEON run-test (scalar fallback). It's correctness-safe and a no-op on Windows x86_64, where the NEON intrinsics wouldn't compile anyway. Signed-off-by: Roberto Scolaro --- cmake/modules/container_plugin.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/modules/container_plugin.cmake b/cmake/modules/container_plugin.cmake index 790f7f4bbb..3d39c7b7fe 100644 --- a/cmake/modules/container_plugin.cmake +++ b/cmake/modules/container_plugin.cmake @@ -79,8 +79,13 @@ else() SOURCE_SUBDIR plugins/container BUILD_IN_SOURCE 1 BUILD_BYPRODUCTS "${CONTAINER_LIBRARY}" + # USE_NEON=OFF: the plugin pulls in RE-flex, whose SIMD detection uses + # check_cxx_source_runs() for NEON. On Windows arm64 the NEON test + # compiles and then *runs* a scratch executable, which hangs the build + # on the windows-11-arm runner. Disabling NEON skips that run-test + # (scalar fallback) and is a no-op on Windows x86_64. CONFIGURE_COMMAND - ${CMAKE_COMMAND} . -DENABLE_ASYNC=OFF -G "${CMAKE_GENERATOR}" + ${CMAKE_COMMAND} . -DENABLE_ASYNC=OFF -DUSE_NEON=OFF -G "${CMAKE_GENERATOR}" BUILD_COMMAND ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} INSTALL_COMMAND "" ) From ad451c882c7529889236535666e4bfa1a8d7ef2b Mon Sep 17 00:00:00 2001 From: Roberto Scolaro Date: Fri, 19 Jun 2026 18:47:35 +0000 Subject: [PATCH 7/7] fix(luajit): pass VS target arch to msvcbuild.bat for Windows arm64 msvcbuild.bat picks its DynASM source from %VSCMD_ARG_TGT_ARCH%. That variable is set by a VS developer prompt but is absent inside CMake's MSBuild custom build step, so the script defaulted to the x64 source (vm_x64.dasc) regardless of the real compiler. On the windows-11-arm runner this generated a buildvm_arch.h referencing CCallState.nfpr (an x64-only field), and the arm64 build failed with 'error C2039: nfpr is not a member of CCallState'. Derive the target arch from CMAKE_VS_PLATFORM_NAME and pass it through so the generated DynASM source matches the compiler. No change for x64 builds. Signed-off-by: Roberto Scolaro --- cmake/modules/luajit.cmake | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/cmake/modules/luajit.cmake b/cmake/modules/luajit.cmake index fddd345381..1bf4ac91be 100644 --- a/cmake/modules/luajit.cmake +++ b/cmake/modules/luajit.cmake @@ -97,12 +97,26 @@ else() COMPONENT "libs-deps" FILES_MATCHING PATTERN "*.h") else() + # msvcbuild.bat selects its DynASM target from %VSCMD_ARG_TGT_ARCH%, + # which a VS dev prompt sets but which is absent inside CMake's MSBuild + # custom build step. Without it the script defaults to the x64 source + # (vm_x64.dasc) regardless of the real compiler, so on arm64 the + # generated buildvm_arch.h references CCallState.nfpr (an x64-only + # field) and the arm64 build fails with C2039. Pass the actual VS + # target platform through so the DynASM source matches the compiler. + if(CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64") + set(LUAJIT_MSVC_TGT_ARCH "arm64") + elseif(CMAKE_VS_PLATFORM_NAME STREQUAL "Win32") + set(LUAJIT_MSVC_TGT_ARCH "x86") + else() + set(LUAJIT_MSVC_TGT_ARCH "x64") + endif() ExternalProject_Add(luajit PREFIX "${PROJECT_BINARY_DIR}/luajit-prefix" GIT_REPOSITORY "https://github.com/LuaJIT/LuaJIT" GIT_TAG "8e6520a7aecd0517e792b359afbbfd7274791f5f" CONFIGURE_COMMAND "" - BUILD_COMMAND msvcbuild.bat static + BUILD_COMMAND cmd /c "set VSCMD_ARG_TGT_ARCH=${LUAJIT_MSVC_TGT_ARCH}&& msvcbuild.bat static" BUILD_BYPRODUCTS ${LUAJIT_LIB} BINARY_DIR "${LUAJIT_SRC}" INSTALL_COMMAND "")