test/httpcrashtest.cpp | 3 +++ wsd/LOOLWSD.cpp | 4 ++++ 2 files changed, 7 insertions(+)
New commits: commit bffaf016190ec47b61456c180d3ef36df2013b42 Author: Michael Meeks <michael.me...@collabora.com> AuthorDate: Sat May 4 22:50:00 2019 +0100 Commit: Jan Holesovsky <ke...@collabora.com> CommitDate: Mon May 6 20:10:04 2019 +0200 test: close testCrashKit race. LOOLWSD is conservative and leaves forkit to start processes for a while. If we kill a kit before it has started and registered we can end up with LOOLWSD holding off to wait for the (now dead) kit, and the tearDown assertions that we have 1 kit failing. Change-Id: Id25e48bf55d1757d2223816293500fde6ff9df1b Reviewed-on: https://gerrit.libreoffice.org/71808 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Jan Holesovsky <ke...@collabora.com> diff --git a/test/httpcrashtest.cpp b/test/httpcrashtest.cpp index a2b1a9d2a..6fd8ee938 100644 --- a/test/httpcrashtest.cpp +++ b/test/httpcrashtest.cpp @@ -136,6 +136,9 @@ void HTTPCrashTest::testCrashKit() { std::shared_ptr<LOOLWebSocket> socket = loadDocAndGetSocket("empty.odt", _uri, testname); + TST_LOG("Allowing time for kits to spawn and connect to wsd to get cleanly killed"); + std::this_thread::sleep_for(std::chrono::milliseconds(1000)); + TST_LOG("Killing loolkit instances."); killLoKitProcesses(); diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index b520dcba7..f355e6b7b 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -363,6 +363,7 @@ void cleanupDocBrokers() /// -1 for error. static int forkChildren(const int number) { + LOG_TRC("Request forkit to spawn " << number << " new child(ren)"); Util::assertIsLocked(NewChildrenMutex); if (number > 0) @@ -1514,6 +1515,9 @@ void LOOLWSD::autoSave(const std::string& docKey) void PrisonerPoll::wakeupHook() { #if !MOBILEAPP + LOG_TRC("PrisonerPoll - wakes up with " << NewChildren.size() << + " new children and " << DocBrokers.size() << " brokers and " << + OutstandingForks << " kits forking"); if (!LOOLWSD::checkAndRestoreForKit()) { // No children have died. _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits