Skip to content
Merged
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
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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 <oksana.salyk@hpe.com>

* Version 2.1.3
Expand Down
18 changes: 12 additions & 6 deletions src/common/shutdown_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -195,7 +197,8 @@ 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.");
"The pool was not opened/closed properly"
SDS_REINIT_SUFFIX);
shutdown_state_reinit(curr_sds, pool_sds, rep);
return 0;
}
Expand All @@ -204,21 +207,24 @@ shutdown_state_check(struct shutdown_state *curr_sds,
if (dirty == 0)
return 0;
/*
* the program was killed when the pool was opened
* but there wasn't an ADR failure
* the program was killed when the pool was opened 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 last time, leaving it vulnerable to ADR failures. Luckily, no ADR failure occurred this time"
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;
}
Expand Down
6 changes: 3 additions & 3 deletions src/test/core_log_max/call_all.c.generated
Original file line number Diff line number Diff line change
Expand Up @@ -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 pool was not closed last time, leaving it vulnerable to ADR failures. Luckily, no ADR failure occurred this time - 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
Expand Down
2 changes: 1 addition & 1 deletion src/test/util_sds/grep3.log.match
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<libpmem2>: <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.
<libpmem2>: <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.
2 changes: 1 addition & 1 deletion src/test/util_sds/grep5.log.match
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<libpmem2>: <2> [shutdown_state.c:$(N) shutdown_state_check] The ADR failure was detected but the pool was closed properly - reinitializing ADR failure detection.
<libpmem2>: <2> [shutdown_state.c:$(N) shutdown_state_check] The pool was not closed last time, leaving it vulnerable to ADR failures. Luckily, no ADR failure occurred this time - reinitializing the ADR failure detection state.
2 changes: 1 addition & 1 deletion src/test/util_sds_check/out1.log.match
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/test/util_sds_check/out2.log.match
Original file line number Diff line number Diff line change
Expand Up @@ -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 last time, leaving it vulnerable to ADR failures. Luckily, no ADR failure occurred this time - reinitializing the ADR failure detection state.
util_sds_check$(nW)TEST2: DONE
2 changes: 1 addition & 1 deletion src/test/util_sds_check/out3.log.match
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/test/util_sds_check/out5.log.match
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion utils/call_stacks_analysis/log_call_all_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading