From 44060893cb953882a40ea891a2bd047edb9cd927 Mon Sep 17 00:00:00 2001 From: Jan Michalski Date: Mon, 16 Mar 2026 17:51:06 +0000 Subject: [PATCH 1/3] common: fix "The pool was not closed" message (no ADR failure) Ref: DAOS-18692 Ref: daos-stack/pmdk#1 Signed-off-by: Jan Michalski --- ChangeLog | 6 ++++++ src/common/shutdown_state.c | 2 +- src/test/util_sds/grep5.log.match | 2 +- src/test/util_sds_check/out2.log.match | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d76593894..095d7750a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +XXX + + * Version X.X.X + + - Fix "The pool was not closed" message (no ADR failure) (daos-stack/pmdk#1, DAOS-18692) + Fri Jan 16 2026 Oksana Sałyk * Version 2.1.3 diff --git a/src/common/shutdown_state.c b/src/common/shutdown_state.c index 49e9caad9..98012f14e 100644 --- a/src/common/shutdown_state.c +++ b/src/common/shutdown_state.c @@ -208,7 +208,7 @@ shutdown_state_check(struct shutdown_state *curr_sds, * but there wasn't an ADR failure */ CORE_LOG_WARNING( - "The ADR failure was detected but the pool was closed properly - reinitializing ADR failure detection."); + "The pool was not closed - reinitializing ADR failure detection."); shutdown_state_reinit(curr_sds, pool_sds, rep); return 0; } diff --git a/src/test/util_sds/grep5.log.match b/src/test/util_sds/grep5.log.match index 64f8dea76..881a6e57e 100644 --- a/src/test/util_sds/grep5.log.match +++ b/src/test/util_sds/grep5.log.match @@ -1 +1 @@ -: <2> [shutdown_state.c:$(N) shutdown_state_check] The ADR failure was detected but the pool was closed properly - reinitializing ADR failure detection. +: <2> [shutdown_state.c:$(N) shutdown_state_check] The pool was not closed - reinitializing ADR failure detection. diff --git a/src/test/util_sds_check/out2.log.match b/src/test/util_sds_check/out2.log.match index 8e878eb85..46205ce48 100644 --- a/src/test/util_sds_check/out2.log.match +++ b/src/test/util_sds_check/out2.log.match @@ -3,5 +3,5 @@ util_sds_check$(nW)TEST2: START: util_sds_check src version: $(nW) compiled with support for shutdown state compiled with libndctl $(nW) -The ADR failure was detected but the pool was closed properly - reinitializing ADR failure detection. +The pool was not closed - reinitializing ADR failure detection. util_sds_check$(nW)TEST2: DONE From 033b0cad76b41f1a24e2f28b72e3a4e76124cbca Mon Sep 17 00:00:00 2001 From: Jan Michalski Date: Tue, 17 Mar 2026 08:57:37 +0000 Subject: [PATCH 2/3] common: revamp the SDS reinit message suffix as requested Signed-off-by: Jan Michalski --- src/common/shutdown_state.c | 17 +++++++---------- src/test/core_log_max/call_all.c.generated | 6 +++--- src/test/util_sds/grep3.log.match | 2 +- src/test/util_sds/grep5.log.match | 2 +- src/test/util_sds_check/out1.log.match | 2 +- src/test/util_sds_check/out2.log.match | 2 +- src/test/util_sds_check/out3.log.match | 2 +- src/test/util_sds_check/out5.log.match | 2 +- 8 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/common/shutdown_state.c b/src/common/shutdown_state.c index 98012f14e..4bc3a67c3 100644 --- a/src/common/shutdown_state.c +++ b/src/common/shutdown_state.c @@ -157,6 +157,8 @@ shutdown_state_clear_dirty(struct shutdown_state *sds, struct pool_replica *rep) shutdown_state_checksum(sds, rep); } +#define SDS_REINIT_SUFFIX " - reinitializing the ADR failure detection state." + /* * shutdown_state_check -- compares and fixes shutdown state */ @@ -194,8 +196,7 @@ shutdown_state_check(struct shutdown_state *curr_sds, if (!is_checksum_correct) { /* the program was killed during opening or closing the pool */ - CORE_LOG_WARNING( - "The pool was not opened/closed properly - reinitializing ADR failure detection."); + CORE_LOG_WARNING("The pool was not opened/closed properly" SDS_REINIT_SUFFIX); shutdown_state_reinit(curr_sds, pool_sds, rep); return 0; } @@ -203,22 +204,18 @@ shutdown_state_check(struct shutdown_state *curr_sds, if (is_uuid_usc_correct) { if (dirty == 0) return 0; - /* - * the program was killed when the pool was opened - * but there wasn't an ADR failure - */ - CORE_LOG_WARNING( - "The pool was not closed - reinitializing ADR failure detection."); + /* the program was killed when the pool was opened but there wasn't an ADR failure */ + CORE_LOG_WARNING("The pool was not closed" SDS_REINIT_SUFFIX); shutdown_state_reinit(curr_sds, pool_sds, rep); return 0; } if (dirty == 0) { if (is_uuid_correct) CORE_LOG_WARNING( - "The ADR failure was detected but the pool was closed properly - reinitializing ADR failure detection."); + "The ADR failure was detected but the pool was closed properly" SDS_REINIT_SUFFIX); else CORE_LOG_HARK( - "The pool has moved to a new location but it was closed properly - reinitializing ADR failure detection."); + "The pool has moved to a new location but it was closed properly" SDS_REINIT_SUFFIX); shutdown_state_reinit(curr_sds, pool_sds, rep); return 0; } diff --git a/src/test/core_log_max/call_all.c.generated b/src/test/core_log_max/call_all.c.generated index 4674fad62..67d27771d 100644 --- a/src/test/core_log_max/call_all.c.generated +++ b/src/test/core_log_max/call_all.c.generated @@ -466,11 +466,11 @@ call_all_CORE_LOG_WARNING(void) // src/common/shutdown_state.c CORE_LOG_WARNING("Enabling ADR failure detection, assuming pool consistency up to this point."); // src/common/shutdown_state.c - CORE_LOG_WARNING("The pool was not opened/closed properly - reinitializing ADR failure detection."); + CORE_LOG_WARNING("The pool was not opened/closed properly - reinitializing the ADR failure detection state."); // src/common/shutdown_state.c - CORE_LOG_WARNING("The ADR failure was detected but the pool was closed properly - reinitializing ADR failure detection."); + CORE_LOG_WARNING("The ADR failure was detected but the pool was closed properly - reinitializing the ADR failure detection state."); // src/common/shutdown_state.c - CORE_LOG_WARNING("The ADR failure was detected but the pool was closed properly - reinitializing ADR failure detection."); + CORE_LOG_WARNING("The ADR failure was detected but the pool was closed properly - reinitializing the ADR failure detection state."); // src/libpmemobj/heap.c CORE_LOG_WARNING("failed to allocate memory block runtime tracking info"); // src/libpmemobj/heap.c diff --git a/src/test/util_sds/grep3.log.match b/src/test/util_sds/grep3.log.match index 65fdd3a5a..fbf264702 100644 --- a/src/test/util_sds/grep3.log.match +++ b/src/test/util_sds/grep3.log.match @@ -1 +1 @@ -: <1> [shutdown_state.c:$(N) shutdown_state_check] The pool has moved to a new location but it was closed properly - reinitializing ADR failure detection. +: <1> [shutdown_state.c:$(N) shutdown_state_check] The pool has moved to a new location but it was closed properly - reinitializing the ADR failure detection state. diff --git a/src/test/util_sds/grep5.log.match b/src/test/util_sds/grep5.log.match index 881a6e57e..253d51c7b 100644 --- a/src/test/util_sds/grep5.log.match +++ b/src/test/util_sds/grep5.log.match @@ -1 +1 @@ -: <2> [shutdown_state.c:$(N) shutdown_state_check] The pool was not closed - reinitializing ADR failure detection. +: <2> [shutdown_state.c:$(N) shutdown_state_check] The pool was not closed - reinitializing the ADR failure detection state. diff --git a/src/test/util_sds_check/out1.log.match b/src/test/util_sds_check/out1.log.match index c9575de57..ac7e5b59c 100644 --- a/src/test/util_sds_check/out1.log.match +++ b/src/test/util_sds_check/out1.log.match @@ -3,5 +3,5 @@ util_sds_check$(nW)TEST1: START: util_sds_check src version: $(nW) compiled with support for shutdown state compiled with libndctl $(nW) -The pool was not opened/closed properly - reinitializing ADR failure detection. +The pool was not opened/closed properly - reinitializing the ADR failure detection state. util_sds_check$(nW)TEST1: DONE diff --git a/src/test/util_sds_check/out2.log.match b/src/test/util_sds_check/out2.log.match index 46205ce48..50a39d123 100644 --- a/src/test/util_sds_check/out2.log.match +++ b/src/test/util_sds_check/out2.log.match @@ -3,5 +3,5 @@ util_sds_check$(nW)TEST2: START: util_sds_check src version: $(nW) compiled with support for shutdown state compiled with libndctl $(nW) -The pool was not closed - reinitializing ADR failure detection. +The pool was not closed - reinitializing the ADR failure detection state. util_sds_check$(nW)TEST2: DONE diff --git a/src/test/util_sds_check/out3.log.match b/src/test/util_sds_check/out3.log.match index 6b65326c5..dd25ebdd3 100644 --- a/src/test/util_sds_check/out3.log.match +++ b/src/test/util_sds_check/out3.log.match @@ -3,5 +3,5 @@ util_sds_check$(nW)TEST3: START: util_sds_check src version: $(nW) compiled with support for shutdown state compiled with libndctl $(nW) -The pool has moved to a new location but it was closed properly - reinitializing ADR failure detection. +The pool has moved to a new location but it was closed properly - reinitializing the ADR failure detection state. util_sds_check$(nW)TEST3: DONE diff --git a/src/test/util_sds_check/out5.log.match b/src/test/util_sds_check/out5.log.match index 7a7f21f0d..858ece451 100644 --- a/src/test/util_sds_check/out5.log.match +++ b/src/test/util_sds_check/out5.log.match @@ -3,5 +3,5 @@ util_sds_check$(nW)TEST5: START: util_sds_check src version: $(nW) compiled with support for shutdown state compiled with libndctl $(nW) -The ADR failure was detected but the pool was closed properly - reinitializing ADR failure detection. +The ADR failure was detected but the pool was closed properly - reinitializing the ADR failure detection state. util_sds_check$(nW)TEST5: DONE From 5d983c4788c6ae82e7a979eca3dc1f01522c0a33 Mon Sep 17 00:00:00 2001 From: Jan Michalski Date: Tue, 17 Mar 2026 09:04:28 +0000 Subject: [PATCH 3/3] common: revamp the SDS reinit message suffix as requested (fix) Update *call_all*. Signed-off-by: Jan Michalski --- src/test/core_log_max/call_all.c.generated | 2 +- utils/call_stacks_analysis/log_call_all_generate.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/core_log_max/call_all.c.generated b/src/test/core_log_max/call_all.c.generated index 67d27771d..78525276e 100644 --- a/src/test/core_log_max/call_all.c.generated +++ b/src/test/core_log_max/call_all.c.generated @@ -468,7 +468,7 @@ call_all_CORE_LOG_WARNING(void) // src/common/shutdown_state.c CORE_LOG_WARNING("The pool was not opened/closed properly - reinitializing the ADR failure detection state."); // src/common/shutdown_state.c - CORE_LOG_WARNING("The ADR failure was detected but the pool was closed properly - reinitializing the ADR failure detection state."); + CORE_LOG_WARNING("The pool was not closed - reinitializing the ADR failure detection state."); // src/common/shutdown_state.c CORE_LOG_WARNING("The ADR failure was detected but the pool was closed properly - reinitializing the ADR failure detection state."); // src/libpmemobj/heap.c diff --git a/utils/call_stacks_analysis/log_call_all_generate.py b/utils/call_stacks_analysis/log_call_all_generate.py index d4a2b7924..b0404da1a 100755 --- a/utils/call_stacks_analysis/log_call_all_generate.py +++ b/utils/call_stacks_analysis/log_call_all_generate.py @@ -274,7 +274,8 @@ def call_get_format_tokens(call): LITERAL_TO_STRING = { 'PRIx64': 'lx', - 'PRIu64': 'lu' + 'PRIu64': 'lu', + 'SDS_REINIT_SUFFIX': ' - reinitializing the ADR failure detection state.', } def token_stringify(token: str) -> str: