Conversation
Properly init found variable (cherry picked from commit a0f79da)
Due to a typo in the CPack configuration, the main `netdata` package control files were being included in any package that did not explicitly define own control files, causing uninstallation of those packages to mask the netdata service. Fix this so that we set the control files for the main package itself instead of specifying them as the default for any package that doesn’t define it’s own control files. (cherry picked from commit 1bec654)
…CMake (netdata#21862) * Support FETCHCONTENT_SOURCE_DIR for IBM MQ libs. This allows us to handle fetching them as a separate step in CI, letting us better handle the errors resulting from IBM’s questioanble infrastructure. * Pre-fetch IBM MQ libraries in package build CI jobs. This lets us better handle infrastructure issues when trying to fetch the libraries. * Fix duplicate CONFIGURE_COMMAND. * Address review comments from copilot. * Fix additional bugs. * Don’t use loop for file handling. (cherry picked from commit 15ffa4f)
Expected release date is 2026-04-23. (cherry picked from commit 5bc4512)
Expected release date is 2026-04-14. (cherry picked from commit cd8d489)
There was a problem hiding this comment.
1 issue found across 1 file
Confidence score: 3/5
- There is a concrete correctness risk in
src/database/sqlite/sqlite_aclk_alert.c: initializingfoundtotruecan cause SQLite bind failures to be interpreted as a successful transition check. - Given the reported severity (7/10) and high confidence (10/10), this is more than a minor code-quality issue and could mask real database errors with user-visible alert-state behavior.
- Pay close attention to
src/database/sqlite/sqlite_aclk_alert.c- transition-check logic may return success on bind failure paths.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/database/sqlite/sqlite_aclk_alert.c">
<violation number="1" location="src/database/sqlite/sqlite_aclk_alert.c:780">
P1: Initializing `found` to `true` makes bind failures look like a successful transition check.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
(cherry picked from commit cb974ac)
(cherry picked from commit 6d6e522)
Prevent concurrent ML activity during host reset and improve thread safety in k-means dimension handling (cherry picked from commit cee7787)
* cache uuid in mem_metric_handle to avoid dereferencing potentially freed RRDDIM during metric release (ram mode) * release rrddim metrics after querying oldest and latest times to prevent potential resource leaks (ram mode) (cherry picked from commit c21e5ce)
Fix check and some formatting (cherry picked from commit d3831c4)
Fix incorrect calculation of `max_size` in journal transaction replay logic (cherry picked from commit ee4fd63)
…netdata#21793) * Prevent potential race conditions by revalidating page status after acquiring the clean lock. * Handle inconsistent states by logging and updating flags appropriately. (cherry picked from commit 2733e6f)
* Refactor double formatting in eval-utils.c: replace custom logic with `print_netdata_double` for clarity and maintainability. * Add null checks for `dst` and `fmt` in `vsnprintfz` to prevent potential issues * Add null check for `fmt` in `vsnprintfz` and ensure `dst` is properly initialized (cherry picked from commit 22962fc)
…ata#21864) Refactor UID/GID cache updates in aggregation logic - Relocate `update_cached_host_users()` and `update_cached_host_groups()` calls outside per-PID loops to optimize and simplify code structure. - Remove redundant updates within conditional blocks. (cherry picked from commit b88a35c)
) - Add checks for uninitialized `cpus` and `cpus_lock` in `netdata_loop_cpu_chart` to prevent potential issues. - Introduce `init_failed` flag to handle initialization failures gracefully and prevent redundant attempts. (cherry picked from commit 1024b69)
There was a problem hiding this comment.
8 issues found across 31 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packaging/windows/generate-driver-catalog.ps1">
<violation number="1" location="packaging/windows/generate-driver-catalog.ps1:34">
P1: Add the x64 match to `$candidates`; otherwise the normal Windows Kits layout is treated as "not found" and catalog generation fails.</violation>
</file>
<file name="src/collectors/windows.plugin/driver/netdata_driver.inf">
<violation number="1" location="src/collectors/windows.plugin/driver/netdata_driver.inf:24">
P2: Add a `DefaultUninstall.NTamd64.Services`/`DelService` entry. Right now the uninstall path removes the `.sys` file but leaves the `NetdataDriver` service registered on the legacy uninstall path.</violation>
</file>
<file name="packaging/windows/package-windows.sh">
<violation number="1" location="packaging/windows/package-windows.sh:48">
P2: This file-existence check is inverted, so the Windows package will skip writing `EDITOR` to the installed profile in the normal case.</violation>
</file>
<file name="src/collectors/windows.plugin/metadata.yaml">
<violation number="1" location="src/collectors/windows.plugin/metadata.yaml:46">
P1: Use `title` instead of `name` for prerequisite items; `name` is not valid for `setup.prerequisites.list[]` and makes these new metadata entries schema-invalid.</violation>
</file>
<file name=".github/workflows/packaging.yml">
<violation number="1" location=".github/workflows/packaging.yml:251">
P1: This condition misses the `amd64` x64 package jobs, so Debian/Ubuntu builds won't use the pre-fetched IBM MQ libs.</violation>
</file>
<file name="src/collectors/windows.plugin/GetHardwareInfo.c">
<violation number="1" location="src/collectors/windows.plugin/GetHardwareInfo.c:393">
P2: `device_lock` is initialized and destroyed but never actually entered/left anywhere. The `msr_device` handle—which this lock was presumably introduced to protect—is accessed unsynchronized from the hardware-info thread (`netdata_reopen_device_if_needed`, `netdata_read_msr`) and closed on the main thread in cleanup. If the thread join fails, this is a use-after-close race.</violation>
</file>
<file name="packaging/windows/netdata.wxs.in">
<violation number="1" location="packaging/windows/netdata.wxs.in:271">
P1: The driver package is incomplete here: the INF references `netdata_driver.cat`, but the MSI only installs the `.sys` and `.inf` files.</violation>
<violation number="2" location="packaging/windows/netdata.wxs.in:271">
P1: Copying the INF into `%windir%\\INF` is not enough to install or stage the driver package. Use `PnPUtil`/SetupAPI to add the package to the driver store instead of treating the INF as a normal file.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| # Prefer the typical WDK/SDK layout: Windows Kits\10\bin\<version>\x64\Inf2Cat.exe | ||
| $patternX64 = Join-Path $root '*\x64\Inf2Cat.exe' | ||
| $found = Get-ChildItem -Path $patternX64 -File -ErrorAction SilentlyContinue | ||
| if (-not $found) { |
There was a problem hiding this comment.
P1: Add the x64 match to $candidates; otherwise the normal Windows Kits layout is treated as "not found" and catalog generation fails.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packaging/windows/generate-driver-catalog.ps1, line 34:
<comment>Add the x64 match to `$candidates`; otherwise the normal Windows Kits layout is treated as "not found" and catalog generation fails.</comment>
<file context>
@@ -0,0 +1,95 @@
+ # Prefer the typical WDK/SDK layout: Windows Kits\10\bin\<version>\x64\Inf2Cat.exe
+ $patternX64 = Join-Path $root '*\x64\Inf2Cat.exe'
+ $found = Get-ChildItem -Path $patternX64 -File -ErrorAction SilentlyContinue
+ if (-not $found) {
+ # Fallback: any versioned subfolder directly under bin containing Inf2Cat.exe
+ $patternAnyArch = Join-Path $root '*\Inf2Cat.exe'
</file context>
| prerequisites: | ||
| list: [] | ||
| list: | ||
| - name: Netdata installation |
There was a problem hiding this comment.
P1: Use title instead of name for prerequisite items; name is not valid for setup.prerequisites.list[] and makes these new metadata entries schema-invalid.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/collectors/windows.plugin/metadata.yaml, line 46:
<comment>Use `title` instead of `name` for prerequisite items; `name` is not valid for `setup.prerequisites.list[]` and makes these new metadata entries schema-invalid.</comment>
<file context>
@@ -42,7 +42,13 @@ modules:
prerequisites:
- list: []
+ list:
+ - name: Netdata installation
+ description: |
+ When Netdata is installed on Windows, it automatically registers as a Windows Service
</file context>
| <File Id="NetdataDrv" Name="netdata_driver.sys" Directory="System64Folder" Source="C:\msys64\opt\netdata\usr\bin\netdata_driver.sys" Condition="NDDRVINST=1"> | ||
| <File Id="NetdataDrv" Name="netdata_driver.sys" Directory="DRIVERDIR" Source="C:\msys64\opt\netdata\usr\bin\netdata_driver.sys" Condition="NDDRVINST=1"> | ||
| </File> | ||
| <File Id="NetdataDrvInf" Name="netdata_driver.inf" Directory="INFDIR" Source="C:\msys64\opt\netdata\usr\bin\netdata_driver.inf" Condition="NDDRVINST=1"> |
There was a problem hiding this comment.
P1: The driver package is incomplete here: the INF references netdata_driver.cat, but the MSI only installs the .sys and .inf files.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packaging/windows/netdata.wxs.in, line 271:
<comment>The driver package is incomplete here: the INF references `netdata_driver.cat`, but the MSI only installs the `.sys` and `.inf` files.</comment>
<file context>
@@ -254,7 +266,9 @@
- <File Id="NetdataDrv" Name="netdata_driver.sys" Directory="System64Folder" Source="C:\msys64\opt\netdata\usr\bin\netdata_driver.sys" Condition="NDDRVINST=1">
+ <File Id="NetdataDrv" Name="netdata_driver.sys" Directory="DRIVERDIR" Source="C:\msys64\opt\netdata\usr\bin\netdata_driver.sys" Condition="NDDRVINST=1">
+ </File>
+ <File Id="NetdataDrvInf" Name="netdata_driver.inf" Directory="INFDIR" Source="C:\msys64\opt\netdata\usr\bin\netdata_driver.inf" Condition="NDDRVINST=1">
</File>
</FeatureGroup>
</file context>
| <File Id="NetdataDrv" Name="netdata_driver.sys" Directory="System64Folder" Source="C:\msys64\opt\netdata\usr\bin\netdata_driver.sys" Condition="NDDRVINST=1"> | ||
| <File Id="NetdataDrv" Name="netdata_driver.sys" Directory="DRIVERDIR" Source="C:\msys64\opt\netdata\usr\bin\netdata_driver.sys" Condition="NDDRVINST=1"> | ||
| </File> | ||
| <File Id="NetdataDrvInf" Name="netdata_driver.inf" Directory="INFDIR" Source="C:\msys64\opt\netdata\usr\bin\netdata_driver.inf" Condition="NDDRVINST=1"> |
There was a problem hiding this comment.
P1: Copying the INF into %windir%\\INF is not enough to install or stage the driver package. Use PnPUtil/SetupAPI to add the package to the driver store instead of treating the INF as a normal file.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packaging/windows/netdata.wxs.in, line 271:
<comment>Copying the INF into `%windir%\\INF` is not enough to install or stage the driver package. Use `PnPUtil`/SetupAPI to add the package to the driver store instead of treating the INF as a normal file.</comment>
<file context>
@@ -254,7 +266,9 @@
- <File Id="NetdataDrv" Name="netdata_driver.sys" Directory="System64Folder" Source="C:\msys64\opt\netdata\usr\bin\netdata_driver.sys" Condition="NDDRVINST=1">
+ <File Id="NetdataDrv" Name="netdata_driver.sys" Directory="DRIVERDIR" Source="C:\msys64\opt\netdata\usr\bin\netdata_driver.sys" Condition="NDDRVINST=1">
+ </File>
+ <File Id="NetdataDrvInf" Name="netdata_driver.inf" Directory="INFDIR" Source="C:\msys64\opt\netdata\usr\bin\netdata_driver.inf" Condition="NDDRVINST=1">
</File>
</FeatureGroup>
</file context>
|
|
||
| [DefaultUninstall.NTamd64] | ||
| LegacyUninstall=1 | ||
| DelFiles = DriverCopyFiles |
There was a problem hiding this comment.
P2: Add a DefaultUninstall.NTamd64.Services/DelService entry. Right now the uninstall path removes the .sys file but leaves the NetdataDriver service registered on the legacy uninstall path.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/collectors/windows.plugin/driver/netdata_driver.inf, line 24:
<comment>Add a `DefaultUninstall.NTamd64.Services`/`DelService` entry. Right now the uninstall path removes the `.sys` file but leaves the `NetdataDriver` service registered on the legacy uninstall path.</comment>
<file context>
@@ -0,0 +1,45 @@
+
+[DefaultUninstall.NTamd64]
+LegacyUninstall=1
+DelFiles = DriverCopyFiles
+
+[DriverCopyFiles]
</file context>
- Add proper acquire / release logic for instances (cherry picked from commit 7bbee1f)
…#21958) * Ensure thread safety and proper cleanup in `GetHardwareInfo` - Add critical section locks for MSR device operations to prevent race conditions. - Improve error handling during thread join and hardware info cleanup. - Refine resource lifecycle management to avoid teardown races. * Simplify `do_GetHardwareInfo_cleanup` by removing redundant thread join checks and refining resource teardown logic. * Further improvements * Address review comments * Address comments, add retry count * Add `THREAD_JOIN_FALLBACK_WAIT_MS` and align retry logic in `GetHardwareInfo` (cherry picked from commit e4aeead)
Fix conditional check for editor configuration in Windows packaging script (cherry picked from commit dfbf1a5)
…tdata#21959) (cherry picked from commit 69423cc)
If the otel-signal-viewer plugin starts before the otel plugin, the journal directory (e.g. /var/log/netdata/otel/v1) might not yet exist. This causes inotify watch setup to fail, and the viewer never picks up logs even after the otel plugin creates the directory and starts writing. Create the directory with create_dir_all before setting up the watch. This is safe because the otel plugin also uses create_dir_all (to create a machine-id subdirectory inside it), which is idempotent. (cherry picked from commit 6851d51)
Summary
GetHardwareInfo(Ensure thread safety and proper cleanup inGetHardwareInfo#21958).infextension from file filter in build workflow (Remove.infextension from file filter in build workflow #21941)GetHardwareInfofunction (Fix initialization handling inGetHardwareInfofunction #21885)Summary by cubic
Patch release 2.9.1 updates packaging and CI (adds Fedora 44 and Ubuntu 26.04), pre-fetches IBM MQ libs in CI to improve builds, and fixes DEB control files so only the
netdatapackage includes its scripts. It also updates the Windows plugin/installer (driver INF packaging, better service handling,GetHardwareInfoenabled), fixes the Windows config editor check, and includes stability fixes across ML, RAM mode, journal replay, page cache, URL handling, and a Coverity issue.GetHardwareInfo: add MSR device locking, safer thread shutdown, self-heal driver install, and clearer signature error logging.systemd-journal.plugin(trysetcapbefore SUID).node_stale_after_secondsto avoid uninitialized reads.Written for commit f39d9a9. Summary will update on new commits.