hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amitkumar Ghatwal" <ghatw...@us.ibm.com>
Subject Unit test case failure (test__RunawayCleaner_StartCleanup__IgnoresCleanupInCriticalSection)
Date Thu, 13 Jul 2017 09:36:41 GMT


Hi All,

I have been able to build hawq successfully on rhel/ppc64le (
https://cwiki.apache.org/confluence/display/HAWQ/Build+and+Install )

$ hawq version
HAWQ version 2.2.0.0 incubating build dev

However failing when trying to run unit test case using below

# Unit test. To do unit test, go to the src/backend and run unittest.
cd $CODE_BASE/src/backend
make unittest-check

One test case failing - "utils/mmgr/test/runaway_cleaner_test.c"

For debugging kept -"utils/mmgr/test/Makefile " target as below
TARGETS=aset mcxt memaccounting vmem_tracker redzone_handler idle_tracker
event_version

After removing failing test remaining All tests are passing.

However one test is failing on assert error

TARGETS=runaway_cleaner

[test@p006vm11 backend]$ make unittest-check
.....
.....
./runaway_cleaner.t
[ RUN         ] test__RunawayCleaner_StartCleanup__IgnoresNonRunaway
[          OK ] test__RunawayCleaner_StartCleanup__IgnoresNonRunaway
[ RUN         ] test__RunawayCleaner_StartCleanup__IgnoresDuplicateCleanup
[          OK ] test__RunawayCleaner_StartCleanup__IgnoresDuplicateCleanup
[ RUN         ] test__RunawayCleaner_StartCleanup__StartsCleanupIfPossible
[          OK ] test__RunawayCleaner_StartCleanup__StartsCleanupIfPossible
[ RUN         ]
test__RunawayCleaner_StartCleanup__IgnoresCleanupInCriticalSection
The value of 'beginCleanupRunawayVersion': 1 and 'latestRunawayVersion' : 0
in Crit
The value of 'beginCleanupRunawayVersion': 1 and 'latestRunawayVersion' : 0
in Crit
                beginCleanupRunawayVersion == *latestRunawayVersion
                ERROR: runaway_cleaner_test.c:242 Failure!
[      FAILED ]
test__RunawayCleaner_StartCleanup__IgnoresCleanupInCriticalSection
[ RUN         ]
test__RunawayCleaner_StartCleanup__IgnoresCleanupInHoldoffInterrupt
[          OK ]
test__RunawayCleaner_StartCleanup__IgnoresCleanupInHoldoffInterrupt
[ RUN         ]
test__RunawayCleaner_RunawayCleanupDoneForProcess__IgnoresCleanupIfNotRequired
[          OK ]
test__RunawayCleaner_RunawayCleanupDoneForProcess__IgnoresCleanupIfNotRequired
[ RUN         ]
test__RunawayCleaner_RunawayCleanupDoneForProcess__IgnoresDuplicateCalls
[          OK ]
test__RunawayCleaner_RunawayCleanupDoneForProcess__IgnoresDuplicateCalls
[ RUN         ]
test__RunawayCleaner_RunawayCleanupDoneForProcess__PreventsDuplicateCleanup
[          OK ]
test__RunawayCleaner_RunawayCleanupDoneForProcess__PreventsDuplicateCleanup
[ RUN         ]
test__RunawayCleaner_RunawayCleanupDoneForProcess__UndoDeactivation
[          OK ]
test__RunawayCleaner_RunawayCleanupDoneForProcess__UndoDeactivation
[ RUN         ]
test__RunawayCleaner_RunawayCleanupDoneForProcess__ReactivatesRunawayDetection
[          OK ]
test__RunawayCleaner_RunawayCleanupDoneForProcess__ReactivatesRunawayDetection
[ RUN         ]
test__RunawayCleaner_RunawayCleanupDoneForSession__ResetsRunawayFlagAndReactivateRunawayDetector
[          OK ]
test__RunawayCleaner_RunawayCleanupDoneForSession__ResetsRunawayFlagAndReactivateRunawayDetector
[=============] 11 tests ran
[ PASSED      ] 10 tests
[ FAILED      ] 1 tests, listed below
[ FAILED      ]
test__RunawayCleaner_StartCleanup__IgnoresCleanupInCriticalSection
make[3]: *** [runaway_cleaner-check] Error 1
make[3]: Leaving directory
`/root/archa/incubator-hawq/src/backend/utils/mmgr/test'
make[2]: *** [unittest-check] Error 2
make[2]: Leaving directory
`/root/archa/incubator-hawq/src/backend/utils/mmgr'
make[1]: *** [unittest-check] Error 2
make[1]: Leaving directory `/root/archa/incubator-hawq/src/backend/utils'
make: *** [unittest-check] Error 2

snippet of the debug code change to print values which are compared.

***********************
$ git diff  utils/mmgr/test/runaway_cleaner_test.c
diff --git a/src/backend/utils/mmgr/test/runaway_cleaner_test.c
b/src/backend/utils/mmgr/test/runaway_cleaner_test.c
index b163e09..749130d 100644
--- a/src/backend/utils/mmgr/test/runaway_cleaner_test.c
+++ b/src/backend/utils/mmgr/test/runaway_cleaner_test.c
@@ -234,9 +234,11 @@
test__RunawayCleaner_StartCleanup__IgnoresCleanupInCriticalSection(void
**state)
        CritSectionCount = 1;
        InterruptHoldoffCount = 0;

+       printf("The value of 'beginCleanupRunawayVersion': %d and
'latestRunawayVersion' : %d in Crit \n\r",beginCleanupRunawayVersion,
+
        CHECK_FOR_RUNAWAY_CLEANUP_MEMORY_LOGGING();
        RunawayCleaner_StartCleanup();
-
+       printf("The value of 'beginCleanupRunawayVersion': %d and
'latestRunawayVersion' : %d in Crit \n\r",beginCleanupRunawayVersion,
        assert_true(beginCleanupRunawayVersion == *latestRunawayVersion);
        /* Cleanup is done, without ever throwing an ERROR */
        assert_true(endCleanupRunawayVersion ==
beginCleanupRunawayVersion);
@@ -278,7 +280,6 @@
test__RunawayCleaner_StartCleanup__IgnoresCleanupInHoldoffInterrupt(void
**state

        CHECK_FOR_RUNAWAY_CLEANUP_MEMORY_LOGGING();
        RunawayCleaner_StartCleanup();
-

        assert_true(beginCleanupRunawayVersion == *latestRunawayVersion);
        /* Cleanup is done, without ever throwing an ERROR */
        assert_true(endCleanupRunawayVersion ==
beginCleanupRunawayVersion);
*********************

Any pointers to resolve above error ?

Regards,
Amit

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message