- Jan 21, 2022
-
-
Florian Fischer authored
This function is needed to deal with worker local ressources: io_uring requests for example. Each worker now always has a MPSC inbox queue which was already used in the laws scheduling strategy. Fibers can be scheduled to a specific worker using the new Scheduler::scheduleOn method. Since the inbox queues are now always present we can use a single FiberSource enum combining AbstractWorkStealingStrategy::FiberSource and LawsStrategy::FiberSource. The laws strategy now uses the inbox queues as its priority queues. With the only differenze that when scheduling to a inbox queue using the Scheduler::scheduleOn the Fiber lifes only in the inbox queue and not also simultaneously in a WSQ. Unrelated code changes made while touching the code anyway: * Introduce FiberSource::io which hints that a Fiber comes from the worker's own CQ. * Strongly type the fiber's source in NextFiberResult. * Make all scheduler functions return std::optional<NextFiberResult> * Cleanup the identation in nextFiberResultViaWorkStealing
-
- Jan 16, 2022
-
-
Florian Fischer authored
I could not identify the commit that changes this behavior but it is reproducible on our bigboxes and my arch system.
-
- Jan 14, 2022
-
-
Florian Schmaus authored
-
- Jan 11, 2022
-
-
Florian Fischer authored
The UnblockOnMainActorTest regularly timeout in our CI which looks to be a regular timeout because I could easily reproduce the timeout on fauibig03. Hopefully this change fixes regular timeouts like https://gitlab.cs.fau.de/aj46ezos/emper/-/jobs/506757 in the CI and only leaves real faulty timeouts.
-
- Dec 25, 2021
-
-
Florian Fischer authored
* Document data races of a future's state. * Get and set a Future's state only through methods. This helps to add possibly needed atomic operations. * Use atomics to get/set cancel and prepare state in IO_SINGLE_URING vaiant * Add more IO debug messages * Use the BPS of Futures with callbacks similar to those of forgotten ones to signal their preparation. The preparation mark the last moment where the Future is used in EMPER and after that the memory can be dropped. ATTENTION: This means not that the used resources of the IO request can be dropped. The kernel may still use a supplied buffer for example. * Fix Future chain cancellation in SubmitActor
-
- Dec 24, 2021
-
-
Florian Fischer authored
Currently canceling Futures would never happen because we issued the cancel request only with the pointer of the future. This works more by coincidence than by design because the PointerTags::Future tagged onto the submitted future pointer is 0. This does not work for callbacks because they are tagged with a PointerTags != 0 and they don't use their callback pointer rather than the future pointer. Fix this by exporting the tagging from IoContext::prepareFutureChain into IoContext::createFutureTag and use this when submitting a cancel sqe. Warn the user that they have to manually take care of the memory safety of the callback because we can not await the callback in Future::cancel. Add a test case to CancelFutureTest.
-
- Dec 16, 2021
-
-
Florian Fischer authored
This makes the test closer to our echoserver.
-
- Dec 06, 2021
-
-
Florian Schmaus authored
-
- Dec 03, 2021
-
-
Florian Fischer authored
I suspect some test which scale whith the number of CPUs to timeout mostly on jenkins2. This patch reduces the load when logging is active and increases the load when logging is off. Therefore our test build with debugoptimized will do less and hopefully only timeout when they actually hung and the release test will do more.
-
- Nov 23, 2021
-
-
Florian Fischer authored
The test introduces multiple cycles of Semaphores and a Fiber for each semaphore blocking and signaling the next. Through work-stealing the fibers from a cycle should be spread across different workers and thus test concurrent use of BinaryPrivateSemaphores. Cycle of length 3: Sem A -> Sem B -> Sem C -> Sem A -> ... Algorithm: if isFirstInCycle signal next wait if not isFirstInCycle signal next
-
- Nov 10, 2021
-
-
Florian Schmaus authored
While we do not have yet LLVM 13 in the gitlab-ci, I use it on my systems. So fix the new warnings found with clang-tidy 13.
-
- Sep 24, 2021
-
-
Florian Fischer authored
The chosen amounts of echos take on my 16 core ryzen system ~5seconds. This should hopefully reduce CI timeout where we are not sure if they are bugs or legit timeouts. Furthermore this should reduce the amount of logs we write and have to store after each CI run.
-
Florian Fischer authored
Before 05dc56ed the two test cases testDiskAndNetwork, testIov where combined in one function which was terminating the runtime after the client closed its socketafter the test was done. This was already broken before 05dc56ed but after the separation of the two use cases the race between the Runtime terminating and the execution of the last parts of the test-runner's alphaFiber became bigger. When the Runtime terminates because the last worker running the testIoV code has outstanding IO the test-runner's successSem is never notified.
-
- Sep 21, 2021
-
-
Florian Fischer authored
-
Florian Fischer authored
* Use more emper io functions * Split the separate test cases into two functions * Use C++ arrays where sensible
-
Florian Fischer authored
-
- Sep 16, 2021
-
-
Florian Fischer authored
The tests may fail when repeated because the listener may bind to fast to the tcp tuple again. This is fixed by using SO_REUSEPORT instead of SO_REUSEADDR. TIL: SO_REUSEADDR is about address wildcards and SO_REUSEPORT allows binding to the same tcp tuple. https://stackoverflow.com/questions/14388706/how-do-so-reuseaddr-and-so-reuseport-differ Add a generic way to specify socket options when creating a listen socket with tcp_listener.
-
- Sep 14, 2021
-
-
Florian Fischer authored
* remove fancy but broken static LinuxVersion object. This means each usage of a EMPER_LINUX_* macro results in a syscall. But I think this is worth it when the result is a sound program. Users of those macros should store the result of the comparison anyway. * fix that we skipped parsing the last part of a version string * add a test for LinuxVersion * IO_MUST_INVALIDATE_BROKEN_CHAIN can still be const
-
- Sep 13, 2021
-
-
Florian Fischer authored
This allows use to remove the current hack that the test are always build without NDEBUG regardless of the meson buildtype. Which is fact fixes the failing io tests in release builds. Because Future.hpp and Future.cpp see the same version of NDEBUG.
-
- Aug 19, 2021
-
-
Florian Fischer authored
-
- Aug 18, 2021
-
-
Florian Fischer authored
-
- Jul 29, 2021
-
-
Florian Fischer authored
-
- Jul 07, 2021
-
-
Florian Fischer authored
This allows the examination of stats which get printed in the Runtime destructor. Also remove useless stdlib includes (Why does iwyu not catch those?).
-
- Jul 06, 2021
-
-
Florian Fischer authored
Until kernel commit cf10960426515 io_uring submitted sqe until it encountered an invalid one. Now io_uring will catch the error on subimssion and will cancel all sqe's contained in the link prior to the invalid one.
-
- May 17, 2021
-
-
Florian Fischer authored
errno was never set on error and thus the DIE_MSG_ERRNO did not properly report what happened. Found during changing Future member types.
-
Florian Fischer authored
-
Florian Fischer authored
gcc 11.1 on my arch system complains that the calls to free does not match the allocator function new[].
-
- May 04, 2021
-
-
Florian Fischer authored
-
- Apr 13, 2021
-
-
Florian Fischer authored
* Improve warn message in Future::cancel() * Don't cancel a Future in the destructor if it was already cancelled or received * Restructure CancelFutureTest into single separate test cases With this I can not reproduce the weird CancelFutureTest behavior anymore neither SIGABRT nor the timeout.
-
Florian Schmaus authored
-
- Apr 01, 2021
-
-
Florian Fischer authored
Move io and lib related tests into io/ and lib/. Our test dictionaries not must have a 'source' key with an array created with files(). This ensures we use always correct paths regardless of the actual directory we are currently in. Until https://github.com/mesonbuild/meson/issues/8608 is not solved we have to separately specify the tests name in a 'name' key.
-
- Mar 24, 2021
-
-
Florian Schmaus authored
Allocate the Actor and the BPS on the heap as otherwise Fibers may access already destructed Actor data.
-
Florian Schmaus authored
This should, at least for the EXIT_SUCCESS case, fix #14.
-
Florian Schmaus authored
The test fixture will automatically assume that the test was successful if emperTest() returns.
-
Florian Schmaus authored
Resetting the Future on the last iteration may cause the assert that the Future was never awaited to trigger (which is in the Future's destructor).
-
Florian Schmaus authored
There was no reason that invokeTest() is part of the test-runner API.
-
Florian Schmaus authored
Stack unwinding via ligbcc does not (yet) work correctly within EMPER. As result, the unwinding often causes a segfault shadowing the actual cause.
-
- Mar 23, 2021
-
-
Florian Fischer authored
Rename the macro used to build up the debug message, to better reflect its generality. It can be used anywhere to build a string with C++ stream formatting. std::string s = EMPER_BUILD_STR("foo = " << 1 " , bar = " << bar(42)); Since WDBG was the only log macro without a terminating newline, which was in fact broken according to flow, we can remove it and the new line handling code in the LOG macro.
-
- Mar 18, 2021
-
-
Florian Fischer authored
io_uring_submit does some inline error checking and consumes less cqes than prepared if an error is detected. Currently we just cancel the Futures, whose prepared sqes were not submitted. But this leaves already prepared sqes for those futures in the SQ of the io_uring which will be submitted the next time io_uring_submit is called. This results in a violation of the chain guaranty, that dependent operations are only executed if all dependencies were successful. Additionally this leads to double completions or memory corruption because the io_uring will produce cqes for already completed Futures. To prevent this from happening we track all sqes we prepared to invalidate and resubmit those which were not submitted because of a short submit. We invalidate sqes by preparing them as NOP instructions and set their user data to NULL. I took this approach instead of rewinding the ring or somethings like similar because it seemed safer for me not fiddle with io_uring internals and just be less efficient. Enable previously failing LinkFutureTest test cases.
-
Florian Fischer authored
Fix compilation error in LinkFutureTest where clsoe was used instead of closeAndWait.
-