| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…ion on numerical edge cases. - Simplify `snprintfz` logic by removing redundant null checks in cgroup cache stat handling. - Add null check in stream receiver logging to safeguard against early handshake failures.
There was a problem hiding this comment.
1 issue found across 3 files
Confidence score: 2/5
sequenceDiagram
participant SR as Stream Receiver
participant Log as Log System
participant ML as ML Training Worker
participant Dlib as Dlib KMeans
participant CG as Cgroup Ebpf Cachestat
participant Proc as /proc Filesystem
Note over SR,Proc: Runtime interaction flows for Coverity fixes
SR->>SR: stream_receiver_remove_internal()
alt rpt->host is NULL (early handshake failure)
SR->>Log: ND_LOG_FIELD_STR(NDF_NIDL_NODE, NULL)
Note over SR,Log: CHANGED: Guarded dereference - passes NULL instead of crashing
else rpt->host exists
SR->>Log: ND_LOG_FIELD_STR(NDF_NIDL_NODE, rpt->host->hostname)
end
SR->>Log: ND_LOG_FIELD_TXT(NDF_SRC_IP, rpt->remote_ip)
SR->>Log: ND_LOG_FIELD_TXT(NDF_SRC_PORT, rpt->remote_port)
Note over ML,Dlib: ML training dimension flow
ML->>ML: ml_dimension_train_model()
ML->>Dlib: ml_kmeans_init()
ML->>Dlib: ml_kmeans_train()
alt Training succeeds
Dlib-->>ML: model trained
ML->>ML: update models
else Dlib throws exception (numerical edge case)
Dlib-->>ML: std::exception (e.g. dlib::fatal_error)
Note over ML: CHANGED: Catch exception, log error, skip model for round
ML->>ML: return ML_WORKER_RESULT_NOT_ENOUGH_COLLECTED_VALUES
end
Note over CG,Proc: Cgroup ebpf cachestat flow
CG->>CG: cgroup_ebpfgo_open_nonempty_procs_file(path_buf, ...)
Note over CG: path_buf is always a stack array (caller guarantee)
CG->>Proc: try to open /proc files for cgroup
alt Non-empty proc file found
Proc-->>CG: procfile read
CG->>CG: snprintfz(best_path, ..., path_buf)
Note over CG: CHANGED: Removed redundant null checks on path_buf
CG->>CG: snprintfz(path_buf, ..., best_path)
else Empty or no file
Proc-->>CG: null or empty
CG->>CG: continue iteration
end
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Sorry, something went wrong.
There was a problem hiding this comment.
PR is working as expected. LGTM!
Sorry, something went wrong.
|
Sorry, something went wrong.
Backport of netdata#22835 to 2.10.x, excluding the cgroup_ebpfgo_cachestat.c snprintf hunk (that file does not exist in this branch). - ml.cc: guard ml_kmeans_train() with try/catch so a dlib exception on numerical edge cases skips the dimension instead of terminating netdata. - stream-receiver.c: null-check rpt->host in the log stack on early handshake failure.
Backport of #22835 to 2.10.x, excluding the cgroup_ebpfgo_cachestat.c snprintf hunk (that file does not exist in this branch). - ml.cc: guard ml_kmeans_train() with try/catch so a dlib exception on numerical edge cases skips the dimension instead of terminating netdata. - stream-receiver.c: null-check rpt->host in the log stack on early handshake failure.
| Back | FazBrowse Home | New Git URL |
Summary
Summary by cubic
Fixes three Coverity findings to improve stability: guards a potential null dereference in stream receiver logs, treats ML KMeans numerical errors as transient to avoid aborts and stuck state, and removes redundant checks in cgroup cache stat.
Written for commit dc8034e. Summary will update on new commits.