diff options
author | ulfvonbelow <strilen@tilde.club> | 2023-01-28 15:30:54 -0600 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-02-06 16:11:05 +0100 |
commit | 3f6f1fb44b6b6aa8f70e71d7a9c73ba623f8c9f7 (patch) | |
tree | 94ed2a71446dd3a8798bb8a13f4f089c713d6d50 /src/util/Makefile.am | |
parent | eabc1baaf980d8948f3fc0ac83a84446d5f1b226 (diff) | |
download | gnunet-3f6f1fb44b6b6aa8f70e71d7a9c73ba623f8c9f7.tar.gz gnunet-3f6f1fb44b6b6aa8f70e71d7a9c73ba623f8c9f7.zip |
UTIL: add test demonstrating scheduler bug, don't run it by default.
These demonstrate a bug in the scheduler by which a task can prevent any other
task from running for an arbitrarily long time despite regularly yielding to
the scheduler. It is caused by a faulty check in GNUNET_SCHEDULER_do_work
that assumes that the task that was the last in the queue when the pass began
will still be in the same relative position when the pass ends, and uses this
assumption to detect the end of the current pass. This assumption fails when
the last task of the current pass is canceled after the pass has started. It
also fails when we schedule a higher-priority task to run immediately, causing
work_priority to immediately switch such that we now process a queue that
doesn't contain the pass-ending task we're looking for.
These tests are built, but not run by 'make check' yet, since they currently
fail. You can manually verify that they do currently fail.
Signed-off-by: Christian Grothoff <christian@grothoff.org>
Diffstat (limited to 'src/util/Makefile.am')
-rw-r--r-- | src/util/Makefile.am | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/util/Makefile.am b/src/util/Makefile.am index ed01558eb..81b8a93b7 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am | |||
@@ -174,6 +174,8 @@ endif | |||
174 | noinst_PROGRAMS = \ | 174 | noinst_PROGRAMS = \ |
175 | gnunet-config-diff \ | 175 | gnunet-config-diff \ |
176 | test_common_logging_dummy \ | 176 | test_common_logging_dummy \ |
177 | test_scheduler_hogging_cancel \ | ||
178 | test_scheduler_hogging_priority \ | ||
177 | gnunet-crypto-tvg | 179 | gnunet-crypto-tvg |
178 | 180 | ||
179 | if ENABLE_TEST_RUN | 181 | if ENABLE_TEST_RUN |
@@ -587,6 +589,16 @@ test_scheduler_delay_SOURCES = \ | |||
587 | test_scheduler_delay_LDADD = \ | 589 | test_scheduler_delay_LDADD = \ |
588 | libgnunetutil.la | 590 | libgnunetutil.la |
589 | 591 | ||
592 | test_scheduler_hogging_cancel_SOURCES = \ | ||
593 | test_scheduler_hogging_cancel.c | ||
594 | test_scheduler_hogging_cancel_LDADD = \ | ||
595 | libgnunetutil.la | ||
596 | |||
597 | test_scheduler_hogging_priority_SOURCES = \ | ||
598 | test_scheduler_hogging_priority.c | ||
599 | test_scheduler_hogging_priority_LDADD = \ | ||
600 | libgnunetutil.la | ||
601 | |||
590 | test_service_SOURCES = \ | 602 | test_service_SOURCES = \ |
591 | test_service.c | 603 | test_service.c |
592 | test_service_LDADD = \ | 604 | test_service_LDADD = \ |