[Kde-pim] QLocalSocket::connectToServer: Invalid name
Patrick Ohly
patrick.ohly at gmx.de
Thu Apr 17 12:28:37 BST 2014
On Mon, 2014-03-31 at 15:15 +0200, Patrick Ohly wrote:
> Hello!
>
> Occasionally, my nightly testing fails with libakonadi hanging in a
> process and blocking all progress until testing aborts and kills the
> processes.
>
> The error log then shows:
>
> syncevolution(15975)/libakonadi Akonadi::SessionPrivate::socketError: Socket error occurred: "QLocalSocket::connectToServer: Invalid name"
> QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
> kres-migrator: cannot connect to X server
> QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
> kres-migrator: cannot connect to X server
>
> It does not happen when I run the same test manually, therefore I don't
> have further information.
>
> There is an open bug about this:
> https://bugs.kde.org/show_bug.cgi?id=229534
With extended logging, I get additional information:
syncevolution(15445)/libakonadi Akonadi::SessionPrivate::init: ""
syncevolution(15445)/libakonadi Akonadi::Firstrun::Firstrun:
syncevolution(15445)/libakonadi Akonadi::Firstrun::Firstrun: ()
syncevolution(15445)/libakonadi Akonadi::SessionPrivate::reconnect: connectToServer "/tmp/akonadi-nightly.Fm3Py5/akonadiserver.socket"
syncevolution(15445)/libakonadi Akonadi::SessionPrivate::socketError: Socket error occurred: "QLocalSocket::connectToServer: Invalid name"
syncevolution(15445)/libakonadi Akonadi::Firstrun::~Firstrun: done
The problem in my case is probably that I have multiple, independent
Akonadi test sessions running which end up sharing this particular path
in /tmp, because it seems to be the same for each "akonadictl
start" (for me - see below).
There are two different akonadiserver processes, both with the same socket open:
$ lsof -p 11202 | grep tmp/akonadi
akonadise 11202 nightly 12u unix 0x0000000000000000 0t0 12065884 /tmp/akonadi-nightly.Fm3Py5/akonadiserver.socket
$ lsof -p 11354 | grep tmp/akonadi
akonadise 11354 nightly 12u unix 0x0000000000000000 0t0 12066062 /tmp/akonadi-nightly.Fm3Py5/akonadiserver.socket
Errors in this case are not surprising...
I noticed that "akonadictl start" indirectly creates
$XDG_CONFIG_HOME/akonadi/akonadiconnectionrc and that "akonadictl stop"
removes it. strace tells me that it is akonadiserver itself which does
that.
Is this a user-configurable file? If not, then $XDG_CACHE_HOME or (if
available) $XDG_RUNTIME_DIR seem more appropriate.
Further digging in the strace output shows that akonadiserver takes the
fixed /tmp/akonadi-nightly.Fm3Py5 from
$XDG_DATA_HOME/akonadi/socket-<hostname> which (in my case) was the same
symlink for all my tests sessions. When I remove it, it gets created by
akonadiserver pointing to a unique name => problem (probably) solved for
me.
However, why is akonadiserver leaving that symlink around and only
removes akonadiconnectionrc? Is the reuse of the previous path
intentional or accidental?
Bye, Patrick
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list