<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>377656</bug_id>
          
          <creation_ts>2017-03-15 17:31:00 +0000</creation_ts>
          <short_desc>akonadiserver has an unhandled protocol exception</short_desc>
          <delta_ts>2018-02-14 14:30:30 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>Frameworks and Libraries</classification>
          <product>Akonadi</product>
          <component>server</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Steve">sgrubb</reporter>
          <assigned_to name="kdepim bugs">pim-bugs-null</assigned_to>
          <cc>bgodusky</cc>
    
    <cc>dennis.schridde</cc>
    
    <cc>dvratil</cc>
    
    <cc>kde</cc>
    
    <cc>mark</cc>
    
    <cc>micuintus</cc>
    
    <cc>mikemol</cc>
    
    <cc>rdieter</cc>
          
          <cf_commitlink>https://commits.kde.org/akonadi/da7070a7facb3c2f91c03b28c36ba5b929b89a42</cf_commitlink>
          <cf_versionfixedin>5.6.1</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1666443</commentid>
    <comment_count>0</comment_count>
    <who name="Steve">sgrubb</who>
    <bug_when>2017-03-15 17:31:00 +0000</bug_when>
    <thetext>Kontact was in the process of checking my mail box and then akonadiserver crashed. This is the back trace from the core dump:

#0  0x00007fbbd3405765 in __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:54
        resultvar = 0
        pid = 3597
        selftid = 3757
#1  0x00007fbbd4aa94fe in KCrash::defaultCrashHandler(int) () at /lib64/libKF5Crash.so.5
#2  0x00007fbbd34057e0 in &lt;signal handler called&gt; () at /usr/lib64/libc-2.23.so
#3  0x00007fbbd3405765 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
        resultvar = 0
        pid = 3597
        selftid = 3757
#4  0x00007fbbd340736a in __GI_abort () at abort.c:89
        save_stage = 2
        act = 
          {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = {0, 0, 140444680092703, 140444683527456, 1, 140444683527587, 0, 18446744073709551615, 140444692594536, 140442175780560, 140442175780560, 1, 140444157013744, 140440800154128, 140444520413392, 140442175780608}}, sa_flags = -741075808, sa_restorer = 0x7fbaec001918}
        sigs = {__val = {32, 0 &lt;repeats 15 times&gt;}}
#5  0x00007fbbd3d4452d in __gnu_cxx::__verbose_terminate_handler() () at ../../../../libstdc++-v3/libsupc++/vterminate.cc:95
        terminating = true
        t = &lt;optimized out&gt;
#6  0x00007fbbd3d422d6 in __cxxabiv1::__terminate(void (*)()) (handler=&lt;optimized out&gt;) at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:47
#7  0x00007fbbd3d42321 in std::terminate() () at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:57
#8  0x00007fbbd3d42539 in __cxxabiv1::__cxa_throw(void*, std::type_info*, void (*)(void*)) (obj=obj@entry=0x7fbaec015280, tinfo=0x55b315d71bc8 &lt;typeinfo for Akonadi::ProtocolException&gt;, 
    tinfo@entry=0x7fbbd480dc28 &lt;typeinfo for Akonadi::ProtocolException&gt;, dest=dest@entry=0x7fbbd45af7b0 &lt;Akonadi::ProtocolException::~ProtocolException()&gt;)
    at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:87
        globals = &lt;optimized out&gt;
#9  0x00007fbbd45cae42 in Akonadi::Protocol::DataStream::operator&lt;&lt; &lt;unsigned char&gt;(unsigned char) (this=&lt;optimized out&gt;, val=&lt;optimized out&gt;)
    at /usr/src/debug/akonadi-16.12.2/src/private/datastream_p_p.h:92
#10 0x00007fbbd45ce57f in Akonadi::Protocol::FetchItemsResponsePrivate::serialize(Akonadi::Protocol::DataStream&amp;) const (stream=..., this=0x7fbaec021920)
    at /usr/src/debug/akonadi-16.12.2/src/private/protocol.cpp:266
#11 0x00007fbbd45ce57f in Akonadi::Protocol::FetchItemsResponsePrivate::serialize(Akonadi::Protocol::DataStream&amp;) const (stream=..., this=0x7fbaec021920)
    at /usr/src/debug/akonadi-16.12.2/src/private/protocol.cpp:425
#12 0x00007fbbd45ce57f in Akonadi::Protocol::FetchItemsResponsePrivate::serialize(Akonadi::Protocol::DataStream&amp;) const (this=0x7fbaec021920, stream=...)
    at /usr/src/debug/akonadi-16.12.2/src/private/protocol.cpp:3344
#13 0x00007fbbd45b5b14 in Akonadi::Protocol::serialize(QIODevice*, Akonadi::Protocol::Command const&amp;) (command=..., stream=...)
    at /usr/src/debug/akonadi-16.12.2/src/private/protocol.cpp:383
        stream = {mDev = 0x7fbb140030d0, mWaitTimeout = 30000}
#14 0x00007fbbd45b5b14 in Akonadi::Protocol::serialize(QIODevice*, Akonadi::Protocol::Command const&amp;) (device=&lt;optimized out&gt;, command=...)
    at /usr/src/debug/akonadi-16.12.2/src/private/protocol.cpp:636
        stream = {mDev = 0x7fbb140030d0, mWaitTimeout = 30000}
#15 0x000055b3159b2f33 in Akonadi::Server::Connection::sendResponse(long long, Akonadi::Protocol::Command const&amp;) (this=0x55b317374a50, tag=1000, response=...) at /usr/src/debug/akonadi-16.12.2/src/server/connection.cpp:404
        stream = 
          {d = {d = 0x0}, dev = 0x7fbb140030d0, owndev = false, noswap = false, byteorder = QDataStream::BigEndian, ver = 17, q_status = QDataStream::WriteFailed}
#16 0x000055b3159b7412 in Akonadi::Server::Handler::failureResponse(QString const&amp;) (response=..., this=0x7fbaec0151d0)
    at /usr/src/debug/akonadi-16.12.2/src/server/handler.cpp:268
        r = {&lt;Akonadi::Protocol::Command&gt; = {d_ptr = {d = 0x7fbaec021920}}, &lt;No data fields&gt;}
#17 0x000055b3159b7412 in Akonadi::Server::Handler::failureResponse(QString const&amp;) (this=0x7fbaec0151d0, response=...)
    at /usr/src/debug/akonadi-16.12.2/src/server/handler.h:152
        r = {&lt;Akonadi::Protocol::Command&gt; = {d_ptr = {d = 0x7fbaec021920}}, &lt;No data fields&gt;}
#18 0x000055b3159b7412 in Akonadi::Server::Handler::failureResponse(QString const&amp;) (this=this@entry=0x7fbaec0151d0, failureMessage=...)
    at /usr/src/debug/akonadi-16.12.2/src/server/handler.cpp:261
        r = {&lt;Akonadi::Protocol::Command&gt; = {d_ptr = {d = 0x7fbaec021920}}, &lt;No data fields&gt;}
#19 0x000055b3159b75cf in Akonadi::Server::Handler::failureResponse(char const*) (this=0x7fbaec0151d0, failureMessage=&lt;optimized out&gt;)
    at /usr/src/debug/akonadi-16.12.2/src/server/handler.cpp:252
#20 0x000055b3159b4f33 in Akonadi::Server::Connection::slotNewData() (this=0x55b317374a50) at /usr/src/debug/akonadi-16.12.2/src/server/connection.cpp:252
        e = &lt;optimized out&gt;
        stream = 
          {d = {d = 0x0}, dev = 0x7fbb140030d0, owndev = false, noswap = false, byteorder = QDataStream::BigEndian, ver = 17, q_status = QDataStream::Ok}
        tag = 1000
        cmd = {d_ptr = {d = 0x7fbb14010180}}
        currentCommand = {static null = {&lt;No data fields&gt;}, d = 0x7fbbd433c620 &lt;QArrayData::shared_null&gt;}
#21 0x00007fbbd42a715c in QMetaObject::activate(QObject*, int, int, void**) (a=0x7fbb3dffa8a0, r=0x55b317374a50, this=&lt;optimized out&gt;)
    at ../../src/corelib/kernel/qobject_impl.h:124
        obj = {d = 0x7fbb14003c90}
        receiverInSameThread = &lt;optimized out&gt;
        sw = {receiver = 0x55b317374a50, previousSender = 0x0, currentSender = {sender = 0x7fbb140030d0, signal = 3, ref = 1}, switched = true}
        callFunction = &lt;optimized out&gt;
        receiver = 0x55b317374a50
        method_relative = &lt;optimized out&gt;
        c = 0x7fbb14003cc0
        last = 0x7fbb14003cc0
        locker = {val = 140444697358024}
        connectionLists = {connectionLists = 0x7fbb14003d10}
        list = 0x7fbb14003e08
        signal_index = 3
        empty_argv = {0x0}
        currentThreadId = 0x7fbb3dffb700

The version is kf5-akonadi-server-16.12.2-1.fc24.x86_64</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1667298</commentid>
    <comment_count>1</comment_count>
    <who name="Dennis Schridde">dennis.schridde</who>
    <bug_when>2017-03-20 13:33:37 +0000</bug_when>
    <thetext>Duplicate of bug #374734?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1667339</commentid>
    <comment_count>2</comment_count>
    <who name="Steve">sgrubb</who>
    <bug_when>2017-03-20 18:28:54 +0000</bug_when>
    <thetext>I think this is different because its dying via an abort() call. They are usually placed in code to stop a program when its doing something that violates some expectation. The idea is to force a coredump to collect a backtrace to get an idea of what&apos;s wrong.

At line 8 the code throws a protocol exception and this probably comes near the code mentioned in line 9. So, something unexpected in the imap protocol is probably causing the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1667418</commentid>
    <comment_count>3</comment_count>
    <who name="Dennis Schridde">dennis.schridde</who>
    <bug_when>2017-03-21 09:06:16 +0000</bug_when>
    <thetext>DrKonqi suggested both bugs, this and duplicates of the other, as possible duplicates of a crash that I was experiencing. I assumed that was because the backtrace was the same.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1667517</commentid>
    <comment_count>4</comment_count>
    <who name="Steve">sgrubb</who>
    <bug_when>2017-03-21 18:23:35 +0000</bug_when>
    <thetext>In src/server/connection.cpp at line 404, there should probably be a try/catch around the Protocol::serialize() call:

void Connection::sendResponse(qint64 tag, const Protocol::Command &amp;response)
{
    if (Tracer::self()-&gt;currentTracer() != QLatin1String(&quot;null&quot;)) {
        Tracer::self()-&gt;connectionOutput(m_identifier, QByteArray::number(tag) + &apos; &apos; + response.debugString().toUtf8());
    }
    QDataStream stream(m_socket);
    stream &lt;&lt; tag;
    Protocol::serialize(m_socket, response);
}

because way down at the bottom in src/private/datastream_p_p.h at line 92, we find:

    if (mDev-&gt;write((char *)&amp;val, sizeof(T)) != sizeof(T)) {
        throw Akonadi::ProtocolException(&quot;Failed to write data to stream&quot;);
    }

Does this help?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1667578</commentid>
    <comment_count>5</comment_count>
    <who name="Daniel Vrátil">dvratil</who>
    <bug_when>2017-03-22 00:43:51 +0000</bug_when>
    <thetext>*** Bug 377871 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1667582</commentid>
    <comment_count>6</comment_count>
    <who name="Steve">sgrubb</who>
    <bug_when>2017-03-22 01:36:24 +0000</bug_when>
    <thetext>Some information printed to the console around the time of another abort:

org.kde.pim.akonadicore: Got a stale notification for an item which was already removed. 2061954 &quot;&quot;
org.kde.pim.akonadicore: Got a stale notification for an item which was already removed. 2061955 &quot;&quot;
org.kde.pim.akonadicore: &quot;QLocalSocket: Remote closed&quot; &quot;/tmp/akonadi-sgrubb.jJx32f/akonadiserver-cmd.socket&quot;
org.kde.pim.akonadicore: Socket error occurred: &quot;QLocalSocket: Remote closed&quot;
org.kde.pim.akonadicore: Error on fetching collection statistics:  &quot;&quot;
org.kde.pim.akonadicore: &quot;QLocalSocket: Remote closed&quot; &quot;/tmp/akonadi-sgrubb.jJx32f/akonadiserver-cmd.socket&quot;
org.kde.pim.akonadicore: Socket error occurred: &quot;QLocalSocket: Remote closed&quot;
org.kde.pim.akonadicore: &quot;QLocalSocket: Remote closed&quot; &quot;/tmp/akonadi-sgrubb.jJx32f/akonadiserver-ntf.socket&quot;
org.kde.pim.akonadicore: &quot;QLocalSocket: Remote closed&quot; &quot;/tmp/akonadi-sgrubb.jJx32f/akonadiserver-ntf.socket&quot;
org.kde.pim.akonadicore: &quot;QLocalSocket: Remote closed&quot; &quot;/tmp/akonadi-sgrubb.jJx32f/akonadiserver-ntf.socket&quot;
org.kde.pim.akonadicore: &quot;QLocalSocket: Remote closed&quot; &quot;/tmp/akonadi-sgrubb.jJx32f/akonadiserver-ntf.socket&quot;
org.kde.pim.akonadicore: &quot;QLocalSocket: Remote closed&quot; &quot;/tmp/akonadi-sgrubb.jJx32f/akonadiserver-ntf.socket&quot;
org.kde.pim.akonadicore: &quot;QLocalSocket: Remote closed&quot; &quot;/tmp/akonadi-sgrubb.jJx32f/akonadiserver-ntf.socket&quot;
org.kde.pim.akonadicore: &quot;QLocalSocket: Remote closed&quot; &quot;/tmp/akonadi-sgrubb.jJx32f/akonadiserver-ntf.socket&quot;
&quot;Unknown error.&quot;
org.kde.pim.akonadicore: Error on fetching collection statistics:  &quot;&quot;
&quot;Unknown error.&quot;
org.kde.pim.akonadicore: Error on fetching collection statistics:  &quot;&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1669497</commentid>
    <comment_count>7</comment_count>
    <who name="Daniel Vrátil">dvratil</who>
    <bug_when>2017-04-01 10:32:09 +0000</bug_when>
    <thetext>Git commit da7070a7facb3c2f91c03b28c36ba5b929b89a42 by Daniel Vrátil.
Committed on 01/04/2017 at 10:31.
Pushed by dvratil into branch &apos;Applications/17.04&apos;.

Handle nested exceptions during error handling
FIXED-IN: 5.6.1

M  +30   -4    src/server/connection.cpp

https://commits.kde.org/akonadi/da7070a7facb3c2f91c03b28c36ba5b929b89a42</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1672111</commentid>
    <comment_count>8</comment_count>
    <who name="Daniel Vrátil">dvratil</who>
    <bug_when>2017-04-18 22:10:43 +0000</bug_when>
    <thetext>*** Bug 378766 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1682261</commentid>
    <comment_count>9</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2017-06-13 16:19:31 +0000</bug_when>
    <thetext>*** Bug 380394 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1730268</commentid>
    <comment_count>10</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2018-02-14 14:30:20 +0000</bug_when>
    <thetext>*** Bug 382439 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1730270</commentid>
    <comment_count>11</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2018-02-14 14:30:30 +0000</bug_when>
    <thetext>*** Bug 389500 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>