Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ void rpm_test_post(String stageName, String node) {
script: 'hostname; ssh -i ci_key jenkins@' + firstNode +
' ls -ltar /tmp; mkdir -p "' + env.STAGE_NAME + '/" && ' +
'scp -i ci_key jenkins@' + firstNode +
':/tmp/{{suite_dmg,daos_{server_helper,{control,agent}}}.log,daos_server.log.*} "' +
':/tmp/{{libdaos_control,daos_{server_helper,{control,agent}}}.log,daos_server.log.*} "' +
stageName + '/"'
archiveArtifacts artifacts: env.STAGE_NAME + '/**'
job_status_update()
Expand Down Expand Up @@ -1125,6 +1125,10 @@ pipeline {
label cachedCommitPragma(pragma: 'VM1-label', def_val: params.CI_UNIT_VM1_LABEL)
}
steps {
// Memcheck the valgrind-tagged build so the Go runtime's
// valgrind client requests suppress the resident-runtime
// noise from libdaos_control.so, like the NLT stage does.
unstash 'opt-daos-valgrind'
job_step_update(
unitTest(timeout_time: 160,
unstash_opt: true,
Expand All @@ -1151,6 +1155,8 @@ pipeline {
label params.CI_UNIT_VM1_NVME_LABEL
}
steps {
// Memcheck the valgrind-tagged build (see 'Unit Test with memcheck').
unstash 'opt-daos-valgrind'
job_step_update(
unitTest(timeout_time: 180,
unstash_opt: true,
Expand Down
7 changes: 6 additions & 1 deletion ci/unit/test_main_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ fi
cd "${SL_SRC_DIR}"
mkdir new_dir
sudo cp -a new_dir /opt/daos
tar --strip-components=2 --directory /opt/daos -xf opt-daos.tar
# The memcheck stages ship the valgrind-tagged build (opt-daos-valgrind.tar) so
# the Go runtime's valgrind client requests suppress the resident-runtime noise;
# other stages ship the standard opt-daos.tar. Use whichever was unstashed.
opt_tar=opt-daos.tar
[ -f opt-daos-valgrind.tar ] && opt_tar=opt-daos-valgrind.tar
tar --strip-components=2 --directory /opt/daos -xf "$opt_tar"

sudo bash -c ". ./utils/sl/setup_local.sh; ./utils/setup_daos_server_helper.sh"

Expand Down
6 changes: 5 additions & 1 deletion site_scons/site_tools/go_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ def _scan_go_file(node, env, _path):
if dep[-1] == '"':
includes.append(File(os.path.join(src_dir, header)))
else:
includes.append(f'../../../include/{header}')
# For angle-bracket includes, only track DAOS headers (in src/include/).
# Skip system headers like <stdlib.h>, <stdint.h>, etc.
daos_hdr = os.path.join(Dir('#').abspath, 'src', 'include', header)
if os.path.exists(daos_hdr):
includes.append(daos_hdr)

return includes

Expand Down
1 change: 1 addition & 0 deletions src/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def scons():
# Generate common libraries used by multiple components
SConscript('gurt/SConscript')
SConscript('cart/SConscript')
SConscript('control/lib/control/c/SConscript')
SConscript('common/SConscript')
SConscript('bio/SConscript')
SConscript('vea/SConscript')
Expand Down
3 changes: 2 additions & 1 deletion src/cart/utils/SConscript
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# (C) Copyright 2021-2023 Intel Corporation.
# (C) Copyright 2026 Hewlett Packard Enterprise Development LP
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
Expand All @@ -22,7 +23,7 @@ def scons():
cart_utils_objs = cenv.SharedObject(['crt_utils.c'], SHOBJPREFIX='s_')
Export('cart_utils_objs')

env.Install(conf_dir, ['memcheck-cart.supp', 'fault-inject-cart.yaml'])
env.Install(conf_dir, ['memcheck-cart.supp', 'memcheck-go.supp', 'fault-inject-cart.yaml'])


if __name__ == "SCons.Script":
Expand Down
136 changes: 2 additions & 134 deletions src/cart/utils/memcheck-cart.supp
Original file line number Diff line number Diff line change
@@ -1,137 +1,5 @@
# Go runtime
{
Go runtime: GC memory (valgrind integration entry point)
Memcheck:Leak
match-leak-kinds: definite,indirect,possible,reachable
fun:runtime.valgrindClientRequest*
...
}
{
Go runtime: persistentalloc (cgo malloc, never freed)
Memcheck:Leak
match-leak-kinds: reachable
fun:malloc
fun:_cgo_*_Cfunc__Cmalloc
fun:runtime.asmcgocall.abi0
...
fun:runtime.persistentalloc
}
{
Go runtime: newproc (cgo malloc, never freed)
Memcheck:Leak
match-leak-kinds: reachable
fun:malloc
fun:_cgo_*_Cfunc__Cmalloc
fun:runtime.asmcgocall.abi0
...
fun:runtime.newproc.abi0
}
{
Go runtime: bootstrap (cgo malloc, never freed)
Memcheck:Leak
match-leak-kinds: reachable
fun:malloc
...
fun:runtime.asmcgocall.abi0
...
fun:runtime.rt0_go.abi0
}
# bytealg over-reads buffer ends by design; golang/go#27610
# recommends this suppression
{
golang/go#27610: bytealg indexbytebody over-read
Memcheck:Addr8
...
fun:indexbytebody
}
{
golang/go#27610: bytealg indexbytebody over-read
Memcheck:Addr16
...
fun:indexbytebody
}
{
golang/go#27610: bytealg indexbytebody over-read
Memcheck:Addr32
...
fun:indexbytebody
}
{
golang/go#27610: bytealg indexbytebody over-read
Memcheck:Cond
...
fun:indexbytebody
}

# glibc / loader / NSS
{
glibc: per-thread TLS (dtv)
Memcheck:Leak
match-leak-kinds: possible,reachable
fun:calloc
...
fun:_dl_allocate_tls
...
fun:pthread_create*
...
}
{
glibc: dl_init
Memcheck:Leak
...
fun:_dl_init
}
{
glibc: dl_open
Memcheck:Leak
...
fun:_dl_open
}
{
glibc: dl_fini
Memcheck:Leak
match-leak-kinds: reachable
...
fun:_dl_fini
...
}
{
glibc: dlerror_run
Memcheck:Leak
match-leak-kinds: reachable
...
fun:_dlerror_run
...
}
{
glibc: dl_fixup
Memcheck:Leak
match-leak-kinds: reachable
...
fun:_dl_fixup
...
}
{
glibc: getpwnam_r (NSS)
Memcheck:Leak
fun:*alloc
...
fun:getpwnam_r*
}
{
glibc: getpwuid_r (NSS)
Memcheck:Leak
fun:calloc
...
fun:getpwuid_r*
}
{
glibc: localtime / tz data
Memcheck:Leak
fun:malloc
...
fun:__tz_convert
}
# Go-runtime, bytealg, and glibc/loader rules have moved to memcheck-go.supp.
# Load that file alongside this one for any valgrind-tagged Go binary.

# libfabric (OFI)
{
Expand Down
149 changes: 149 additions & 0 deletions src/cart/utils/memcheck-go.supp
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# (C) Copyright 2026 Hewlett Packard Enterprise Development LP
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
# Shared Go-runtime memcheck suppressions for binaries and c-shared libraries
# built with the Go "valgrind" tag (BUILD_GO_VALGRIND=1). These rules are
# consumed by both NLT (node_local_test.py) and run_utest.py so that any Go
# binary or c-shared library (e.g. libdaos_control.so) tagged for valgrind
# gets the same baseline set of suppressions without duplicating them.
#
# Rules here cover:
# - Go runtime GC / cgo malloc patterns
# - bytealg over-reads (golang/go#27610)
# - glibc / loader / NSS patterns triggered by Go cgo-TLS startup

# Go runtime
{
Go runtime: GC memory (valgrind integration entry point)
Memcheck:Leak
match-leak-kinds: definite,indirect,possible,reachable
fun:runtime.valgrindClientRequest*
...
}
{
Go runtime: persistentalloc (cgo malloc, never freed)
Memcheck:Leak
match-leak-kinds: reachable
fun:malloc
fun:_cgo_*_Cfunc__Cmalloc
fun:runtime.asmcgocall.abi0
...
fun:runtime.persistentalloc
}
{
Go runtime: newproc (cgo malloc, never freed)
Memcheck:Leak
match-leak-kinds: reachable
fun:malloc
fun:_cgo_*_Cfunc__Cmalloc
fun:runtime.asmcgocall.abi0
...
fun:runtime.newproc.abi0
}
{
Go runtime: bootstrap (cgo malloc, never freed)
Memcheck:Leak
match-leak-kinds: reachable
fun:malloc
...
fun:runtime.asmcgocall.abi0
...
fun:runtime.rt0_go.abi0
}
# bytealg over-reads buffer ends by design; golang/go#27610
# recommends this suppression
{
golang/go#27610: bytealg indexbytebody over-read
Memcheck:Addr8
...
fun:indexbytebody
}
{
golang/go#27610: bytealg indexbytebody over-read
Memcheck:Addr16
...
fun:indexbytebody
}
{
golang/go#27610: bytealg indexbytebody over-read
Memcheck:Addr32
...
fun:indexbytebody
}
{
golang/go#27610: bytealg indexbytebody over-read
Memcheck:Cond
...
fun:indexbytebody
}

# glibc / loader / NSS
{
glibc: per-thread TLS (dtv)
Memcheck:Leak
match-leak-kinds: possible,reachable
fun:calloc
...
fun:_dl_allocate_tls
...
fun:pthread_create*
...
}
{
glibc: dl_init
Memcheck:Leak
...
fun:_dl_init
}
{
glibc: dl_open
Memcheck:Leak
...
fun:_dl_open
}
{
glibc: dl_fini
Memcheck:Leak
match-leak-kinds: reachable
...
fun:_dl_fini
...
}
{
glibc: dlerror_run
Memcheck:Leak
match-leak-kinds: reachable
...
fun:_dlerror_run
...
}
{
glibc: dl_fixup
Memcheck:Leak
match-leak-kinds: reachable
...
fun:_dl_fixup
...
}
{
glibc: getpwnam_r (NSS)
Memcheck:Leak
fun:*alloc
...
fun:getpwnam_r*
}
{
glibc: getpwuid_r (NSS)
Memcheck:Leak
fun:calloc
...
fun:getpwuid_r*
}
{
glibc: localtime / tz data
Memcheck:Leak
fun:malloc
...
fun:__tz_convert
}
3 changes: 2 additions & 1 deletion src/chk/chk_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <daos/btree.h>
#include <daos/object.h>
#include <daos/sys_db.h>
#include <daos/control_types.h>
#include <daos_srv/iv.h>
#include <daos_srv/rsvc.h>
#include <daos_srv/pool.h>
Expand Down Expand Up @@ -328,7 +329,7 @@ CRT_RPC_DECLARE(chk_set_policy, DAOS_ISEQ_CHK_SET_POLICY, DAOS_OSEQ_CHK_SET_POLI

#define CHK_MSG_BUFLEN 320

#define CHK_INTERACT_OPTION_MAX 3
#define CHK_INTERACT_OPTION_MAX DAOS_CHECK_INTERACT_OPTION_MAX

/*
* NOTE: Please be careful when change CHK__CHECK_INCONSIST_CLASS__CIC_UNKNOWN
Expand Down
Loading
Loading