Skip to content

Commit fe3b302

Browse files
authored
Merge pull request #1326 from bratpiorka/rrudnick_enable_init_tear_test
reset BA destroy flag on BA create
2 parents 35f3c82 + 59033f9 commit fe3b302

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

.github/workflows/nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ jobs:
5858

5959
- name: Run regular tests
6060
working-directory: ${{github.workspace}}/build
61-
run: ctest -C ${{matrix.build_type}} --output-on-failure -E "fuzz|test_init_teardown"
61+
run: ctest -C ${{matrix.build_type}} --output-on-failure -E "fuzz"
6262

6363
- name: Run regular tests with proxy library
6464
working-directory: ${{env.BUILD_DIR}}
65-
run: LD_PRELOAD=./lib/libumf_proxy.so ctest -C ${{matrix.build_type}} --output-on-failure -E "fuzz|test_init_teardown"
65+
run: LD_PRELOAD=./lib/libumf_proxy.so ctest -C ${{matrix.build_type}} --output-on-failure -E "fuzz"
6666

6767
- name: Fuzz long test
6868
working-directory: ${{github.workspace}}/build

.github/workflows/reusable_multi_numa.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,11 @@ jobs:
5656
# On RHEL/SLES, hwloc version is just a little too low.
5757
# Skip some tests until we upgrade hwloc and update CMake to properly handle local hwloc installation.
5858
# TODO: fix issue #560
59-
# TODO: add issue for -E test_init_teardown - it is not clear why it fails
6059
- name: Run tests (on RHEL/SLES)
6160
if: (matrix.os == 'rhel-9.1') || (matrix.os == 'sles-15')
6261
working-directory: ${{github.workspace}}/build
6362
run: |
64-
ctest --output-on-failure --test-dir test -E "test_provider_os_memory_multiple_numa_nodes|test_init_teardown"
63+
ctest --output-on-failure --test-dir test -E "test_provider_os_memory_multiple_numa_nodes"
6564
./test/test_provider_os_memory_multiple_numa_nodes \
6665
--gtest_filter="-*checkModeLocal/*:*checkModePreferredEmptyNodeset/*:testNuma.checkModeInterleave"
6766

src/base_alloc/base_alloc_global.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ struct base_alloc_t {
4141
static struct base_alloc_t BASE_ALLOC = {.ac_sizes = ALLOCATION_CLASSES};
4242

4343
void umf_ba_destroy_global(void) {
44+
LOG_DEBUG("destroying global base allocator");
4445
ba_is_destroyed = true;
4546

4647
for (int i = 0; i < NUM_ALLOCATION_CLASSES; i++) {
@@ -73,7 +74,8 @@ static void umf_ba_create_global(void) {
7374
size_t smallestSize = BASE_ALLOC.ac_sizes[0];
7475
BASE_ALLOC.smallest_ac_size_log2 = utils_msb64(smallestSize);
7576

76-
LOG_DEBUG("UMF base allocator created");
77+
LOG_DEBUG("global base allocator created");
78+
ba_is_destroyed = false;
7779
}
7880

7981
// returns index of the allocation class for a given size

src/provider/provider_tracking.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -729,9 +729,8 @@ static umf_result_t trackingFree(void *hProvider, void *ptr, size_t size) {
729729

730730
if (umfMemoryTrackerAdd(p->hTracker, p->pool, ptr, size) !=
731731
UMF_RESULT_SUCCESS) {
732-
LOG_ERR(
733-
"cannot add memory back to the tracker, ptr = %p, size = %zu",
734-
ptr, size);
732+
LOG_ERR("cannot add memory back to the tracker, ptr=%p, size=%zu",
733+
ptr, size);
735734
}
736735
return ret;
737736
}
@@ -770,6 +769,10 @@ static void check_if_tracker_is_empty(umf_memory_tracker_handle_t hTracker,
770769
FIND_G, &rkey, (void **)&rvalue)) {
771770
if (rvalue->pool == pool || pool == NULL) {
772771
n_items++;
772+
LOG_DEBUG(
773+
"found abandoned allocation in the tracking provider: "
774+
"pool=%p, ptr=%p, size=%zu",
775+
(void *)rvalue->pool, (void *)rkey, (size_t)rvalue->size);
773776
}
774777

775778
last_key = rkey;

0 commit comments

Comments
 (0)