Test runtime for Akonadi

Ben Cooksley bcooksley at kde.org
Wed Aug 29 12:10:24 BST 2018


On Wed, Aug 29, 2018 at 8:49 PM Daniel Vrátil <dvratil at kde.org> wrote:
>
> On Tuesday, 28 August 2018 21:15:12 CEST Ben Cooksley wrote:
> > On Tue, 28 Aug 2018, 23:20 Daniel Vrátil, <dvratil at kde.org> wrote:
> > > Hi Ben,
> >
> > Hi Daniel,
> >
> > > I noticed that the CI tooling script seems to start kdeinit5 automatically
> > > before executing the tests. Is this a recent change? I cannot think of any
> > > change in Akonadi that could've caused this.
> >
> > The CI tests have started kdeinit5 for a very long time (back in the KDE 4
> > days we would start kdeinit4 and nepomukserver) so this change shouldn't be
> > the cause.
>
> Hmm, I see. I could swear I started seeing the "kf5.kinit.klauncher: new app"
> log messages in CI test runs only recently, but then again my memory sucks.

https://cgit.kde.org/sysadmin/ci-tooling.git/tree/helpers/run-tests.py#n154

>
> > It is virtually a hard requirement we start kdeinit5 due to the limitation
> > of CTest not allowing processes from tests to remain running.
> >
> > > I wonder if running the isolated tests inside its own DBus session would
> > > help
> > > - not only improving the isolation but also getting us full control over
> > > the
> > > test session...
> >
> > Is there any way of easily telling why Akonadi isn't exiting, before we
> > start looking into full isolation?
>
> Hmm, hard to tell: looking at the last time it got stuck [0] the "klauncher"
> messages indicate that Akonadi is up and running and that the "testrunner" has
> started - whether the actual test executable has been launched I cannot tell.
> It may have even successfully passed and exited (because on success we don't
> see its stdout) and either the Akonadi test utility is stuck and not exiting,
> or it exited and only Akonadi remained running, preventing ctest from exiting.
>
> I'll try looping the Akonadi test suite in my docker locally to see if maybe I
> can reproduce it getting stuck. Otherwise I think the only way to find out
> what's stuck is to SSH into the Docker container when this happens again and
> see which components are left running and what state the whole thing is in :(

Okay. I'll see if I can find you on IRC next time this happens...

>
> Btw doesn't ctest have some form of a timeout after which it would kill all
> children mercilessly? It may cause the mysql sever to remain running in the
> background afterwards (because it's launched indirectly), but that should go
> away automatically at the end of the test run when the Docker container is
> stopped, shouldn't it?

CTest does have a timeout option yes. Unfortunately it doesn't work
well when it comes to processes that daemonize themselves.
As a consequence CTest will just sit there forever when there is a
daemonized process that hasn't exited.

Cheers,
Ben

>
> [0] https://build.kde.org/job/Applications%20akonadi%20kf5-qt5%20SUSEQt5.9/242/consoleFull
>
> >
> > Cheers,
> > Ben
> >
> > > On Tuesday, 28 August 2018 12:25:52 CEST Ben Cooksley wrote:
> > > > On Mon, Aug 27, 2018 at 6:15 AM Ben Cooksley <bcooksley at kde.org> wrote:
> > > > > On Thu, Aug 23, 2018 at 11:16 PM Daniel Vrátil <dvratil at kde.org>
> > >
> > > wrote:
> > > > > > On Tuesday, 21 August 2018 15:16:55 CEST Ben Cooksley wrote:
> > > > > > > Hi all,
> > > > > > >
> > > > > > > Currently it looks like execution of tests for Akonadi take an
> > > > > > > excessively long amount of time, at least in the most recent
> > >
> > > version.
> > >
> > > > > > > I've taken a look and it seems that this failure is caused by
> > >
> > > Akonadi
> > >
> > > > > > > Server being left running by the akonadi-mysql-entitycachetest
> > >
> > > test.
> > >
> > > > > > > Could someone take a look please?
> > > > > >
> > > > > > Can't say for sure which test caused this, but looks like the
> > > > > > akonadiserver
> > > > > > remained running even after the akonaditest has finished - probably
> > >
> > > some
> > >
> > > > > > race condition.
> > > > >
> > > > > Unfortunately this race condition just triggered again, this time with
> > > > > test akonadi-sqlite-subscriptiontest :(
> > > >
> > > > It is unfortunately also triggered by KMail, which was blocked this
> > >
> > > evening.
> > >
> > > > Please see
> > >
> > > https://build.kde.org/job/Applications%20kmail%20stable-kf5-qt5%20SUSEQt5.
> > > 9
> > >
> > > > /workflow-stage/
> > > >
> > > > > > I started another build manually and everything went fine all the
> > >
> > > tests
> > >
> > > > > > finished in couple minutes, so I think this was an one-off incident,
> > > > > > but I'll keep an eye on it and investigate it deeper if it should
> > > > > > started to happen more often.
> > > > > >
> > > > > > Dan
> > > > >
> > > > > Cheers,
> > > > > Ben
> > > >
> > > > Regards,
> > > > Ben
> > > >
> > > > > > > Cheers,
> > > > > > > Ben
> > > > > >
> > > > > > --
> > > > > > Daniel Vrátil
> > > > > > www.dvratil.cz | dvratil at kde.org
> > > > > > IRC: dvratil on Freenode (#kde, #kontact, #akonadi, #fedora-kde)
> > > > > >
> > > > > > GPG Key: 0x4D69557AECB13683
> > > > > > Fingerprint: 0ABD FA55 A4E6 BEA9 9A83 EA97 4D69 557A ECB1 3683
> > >
> > > --
> > > Daniel Vrátil
> > > www.dvratil.cz | dvratil at kde.org
> > > IRC: dvratil on Freenode (#kde, #kontact, #akonadi, #fedora-kde)
> > >
> > > GPG Key: 0x4D69557AECB13683
> > > Fingerprint: 0ABD FA55 A4E6 BEA9 9A83 EA97 4D69 557A ECB1 3683
>
>
> --
> Daniel Vrátil
> www.dvratil.cz | dvratil at kde.org
> IRC: dvratil on Freenode (#kde, #kontact, #akonadi, #fedora-kde)
>
> GPG Key: 0x4D69557AECB13683
> Fingerprint: 0ABD FA55 A4E6 BEA9 9A83 EA97 4D69 557A ECB1 3683



More information about the kde-pim mailing list