Akonadi server reproducibly eats 10+ GB of memory

Szőts Ákos <[email protected]>
Newsgroups gmane.comp.kde.users.pim
Organization MorroHun Team
Message-ID <[email protected]>
Dear list members,

A memory leak is present in akonadi-server 18.08.2: whenever KMail rechecks 
all folders of my Google IMAP account, memory just grows but never shrinks.

I've created a heaptrack summary of the leak which shows that after ~10 
minutes server starts eating memory. Last time it went up to 12 GB when I 
stopped it.

You can reach the pictures showing the memory occupation (in this case with 2 
GB) and backtrace as well as the whole heaptrack file here:
https://mega.nz/#F!RQ4iBSRT!DmHq4qoDKpuVyewuAmazsA

Load it with heaptrack_gui <filename>.

One of the backtraces:

QArrayData::allocate(unsigned long, unsigned long, unsigned long, 
QFlags<QArrayData::AllocationOption>) in qarraydata.cpp:118 (libQt5Core.so.5)
QTypedArrayData<unsigned short>::allocate(unsigned long, 
QFlags<QArrayData::AllocationOption>) in qarraydata.h:222 (libQt5Core.so.5)
QString::reallocData(unsigned int, bool) in qstring.cpp:2147 (libQt5Core.so.5)
Akonadi::Server::QueryBuilder::exec() in qstring.h:1135 (akonadiserver)
Akonadi::Server::PimItem::flags() const in entities.cpp:4787 (akonadiserver)
Akonadi::Server::DataStore::setItemsFlags(QVector<Akonadi::Server::PimItem> 
const&, QVector<Akonadi::Server::Flag> const&, bool*, 
Akonadi::Server::Collection const&, bool) in datastore.cpp:260 (akonadiserver)
Akonadi::Server::AkAppend::mergeItem(Akonadi::Protocol::CreateItemCommand 
const&, Akonadi::Server::PimItem&, Akonadi::Server::PimItem&, 
Akonadi::Server::Collection const&) in akappend.cpp:218 (akonadiserver)
Akonadi::Server::AkAppend::parseStream() in akappend.cpp:431 (akonadiserver)
Akonadi::Server::Connection::handleIncomingData() in connection.cpp:287 
(akonadiserver)
QtPrivate::QSlotObjectBase::call(QObject*, void**) in qobjectdefs_impl.h:376 
(libQt5Core.so.5)
QSingleShotTimer::timerEvent(QTimerEvent*) in qtimer.cpp:318 (libQt5Core.so.5)
QObject::event(QEvent*) in qobject.cpp:1273 (libQt5Core.so.5)
doNotify in qcoreapplication.cpp:1138 (libQt5Core.so.5)
QCoreApplication::notify(QObject*, QEvent*) in qcoreapplication.cpp:1124 
(libQt5Core.so.5)
QCoreApplication::notifyInternal2(QObject*, QEvent*) in qcoreapplication.cpp:
1048 (libQt5Core.so.5)
QCoreApplication::sendEvent(QObject*, QEvent*) in qcoreapplication.h:234 
(libQt5Core.so.5)
QTimerInfoList::activateTimers() in qtimerinfo_unix.cpp:643 (libQt5Core.so.5)
timerSourceDispatch in qeventdispatcher_glib.cpp:182 (libQt5Core.so.5)
g_main_dispatch in gmain.c:3176 (libglib-2.0.so.0)
g_main_context_dispatch in gmain.c:3829 (libglib-2.0.so.0)
g_main_context_iterate in gmain.c:3902 (libglib-2.0.so.0)
g_main_context_iteration in gmain.c:3963 (libglib-2.0.so.0)
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) in 
qeventdispatcher_glib.cpp:422 (libQt5Core.so.5)
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) in qeventloop.cpp:214 
(libQt5Core.so.5)
QThread::exec() in qthread.cpp:525 (libQt5Core.so.5)
QThreadPrivate::start(void*) in qthread_unix.cpp:367 (libQt5Core.so.5)
start_thread in pthread_create.c:463 (libpthread.so.0)
__GI___clone in clone.S:95 (libc.so.6)

All the best,

Ákos
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEIHnWdYg0ffXHT9oxRbyAIRvwdy8FAlva9G4ACgkQRbyAIRvw
dy+INhAAkFxRBzH3w0PL6pXvSCSH05RzvbtKelyeKTXTC+oXdJwMcR3vGnV8Pf9w
+XXK9zkS2I+5cFNN6muzi13yKSodUVdQJYmiSlRh/W8Z8sz7yfP40rB2iB4zAqIT
A2g7dsGASrYIIZfDRBrxxI74V+fqtZDIVhaB4Cqf4+cxiMKTbFApiu8w72SH7FYg
EwuanTtcDnS8UqYTY8F3BOrcT0nZrfR5/nwCKOAIOqCuvy2IS6uGDhPrVSINNz3v
jUi/jc0+Q2QCZEQMIdnDb1Lwas4C2PgizWOJG6EExAkB/+Tvxg1eElRAyV5KLarl
unWGm5pIPqbamROdIVPmoWgoGc0dGb5qIgiJEGFnXNAIj+5bl2yKoX43ikrqklJP
lJkrOI80MLYTRNSPirJZJbGroXIE0bLPY44UYJMUCpmfmZh9ic5H9Y8qENoy3b/v
MveP5wu4uffrRKugAiRBczF4S3BvexkUVw3uhQYhFEOc5obOMwgOT+nbLWz8mc1V
kskAbQPrBhoFf86Fo3vcbL+kDbf/IzOGGptSKfUb96wSmyN5Vd1Oz37gST0/oT/j
lNP564ItjgbQcTzZ9wxSXE4dWKL3tqAprOuVIznXvkMZem3ZlFkq/zF9Gqtadxq8
Gp7OyHd6uRKmPZLvJNewipYyubkns9MYsD6F2wn7GEAyvhXkrIY=
=hP2X
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.