<?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>415339</bug_id>
          
          <creation_ts>2019-12-19 02:14:32 +0000</creation_ts>
          <short_desc>Akonadi IMAP crashed on waking up from sleep</short_desc>
          <delta_ts>2020-09-08 10:46:25 +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>IMAP resource</component>
          <version>5.13.1</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.kde.org/show_bug.cgi?id=418593</see_also>
    
    <see_also>https://bugs.kde.org/show_bug.cgi?id=418595</see_also>
    
    <see_also>https://bugs.kde.org/show_bug.cgi?id=418912</see_also>
    
    <see_also>https://bugs.kde.org/show_bug.cgi?id=396663</see_also>
    
    <see_also>https://bugs.kde.org/show_bug.cgi?id=423675</see_also>
    
    <see_also>https://bugs.kde.org/show_bug.cgi?id=418599</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>drkonqi</keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Badwi">slamet.badwi</reporter>
          <assigned_to name="kdepim bugs">pim-bugs-null</assigned_to>
          <cc>heri+kde</cc>
    
    <cc>me</cc>
    
    <cc>philippe.roubach</cc>
          
          <cf_commitlink>https://invent.kde.org/pim/kdepim-runtime/commit/127cfcc288579b1f268326f623c7652397878b5d</cf_commitlink>
          <cf_versionfixedin>5.16.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1897191</commentid>
    <comment_count>0</comment_count>
    <who name="Badwi">slamet.badwi</who>
    <bug_when>2019-12-19 02:14:32 +0000</bug_when>
    <thetext>Application: akonadi_imap_resource (5.13.0 (19.12.0))
 (Compiled from sources)
Qt Version: 5.12.5
Frameworks Version: 5.65.0
Operating System: Linux 5.3.16-300.fc31.x86_64 x86_64
Distribution: &quot;Fedora release 31 (Thirty One)&quot;

-- Information about the crash:
- What I was doing when the application crashed:
Wake up from sleep state, it showed a DrKonqi notification about the crash.

- Unusual behavior I noticed:
There was another notification about selinux-policy that prevents &quot;tlp&quot; to search for &quot;snapd&quot; (this info may not related though)

- Custom settings of the application:
Kmail was set to Enable system tray icon to be enabled

-- Backtrace:
Application: badwi.my.id (boku) (akonadi_imap_resource), signal: Segmentation fault
Using host libthread_db library &quot;/lib64/libthread_db.so.1&quot;.
[Current thread is 1 (Thread 0x7fc98ce38940 (LWP 1565))]

Thread 7 (Thread 0x7fc95bfff700 (LWP 626426)):
#0  0x00007fc997baaa08 in g_mutex_unlock () at /lib64/libglib-2.0.so.0
#1  0x00007fc997b5dd0d in g_main_context_prepare () at /lib64/libglib-2.0.so.0
#2  0x00007fc997b5e6cb in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#3  0x00007fc997b5e8d3 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#4  0x00007fc9999c1da3 in QEventDispatcherGlib::processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () at /lib64/libQt5Core.so.5
#5  0x00007fc99996bcfb in QEventLoop::exec(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () at /lib64/libQt5Core.so.5
#6  0x00007fc9997c43a5 in QThread::exec() () at /lib64/libQt5Core.so.5
#7  0x00007fc9997c54f6 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#8  0x00007fc9989584e2 in start_thread () at /lib64/libpthread.so.0
#9  0x00007fc99942c693 in clone () at /lib64/libc.so.6

Thread 6 (Thread 0x7fc975d29700 (LWP 1693)):
#0  0x00007fc999421a6f in poll () at /lib64/libc.so.6
#1  0x00007fc997b5e79e in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#2  0x00007fc997b5e8d3 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007fc9999c1da3 in QEventDispatcherGlib::processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () at /lib64/libQt5Core.so.5
#4  0x00007fc99996bcfb in QEventLoop::exec(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () at /lib64/libQt5Core.so.5
#5  0x00007fc9997c43a5 in QThread::exec() () at /lib64/libQt5Core.so.5
#6  0x00007fc9997c54f6 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#7  0x00007fc9989584e2 in start_thread () at /lib64/libpthread.so.0
#8  0x00007fc99942c693 in clone () at /lib64/libc.so.6

Thread 5 (Thread 0x7fc976f3a700 (LWP 1651)):
#0  0x00007fc99b6adfed in __tls_get_addr_slow () at /lib64/ld-linux-x86-64.so.2
#1  0x00007fc99b6b2fbc in __tls_get_addr () at /lib64/ld-linux-x86-64.so.2
#2  0x00007fc9997c4a9a in QThreadData::current(bool) () at /lib64/libQt5Core.so.5
#3  0x00007fc9999c1c5e in postEventSourcePrepare(_GSource*, int*) () at /lib64/libQt5Core.so.5
#4  0x00007fc997b5dd1a in g_main_context_prepare () at /lib64/libglib-2.0.so.0
#5  0x00007fc997b5e6cb in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#6  0x00007fc997b5e8d3 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#7  0x00007fc9999c1da3 in QEventDispatcherGlib::processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () at /lib64/libQt5Core.so.5
#8  0x00007fc99996bcfb in QEventLoop::exec(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () at /lib64/libQt5Core.so.5
#9  0x00007fc9997c43a5 in QThread::exec() () at /lib64/libQt5Core.so.5
#10 0x00007fc9997c54f6 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#11 0x00007fc9989584e2 in start_thread () at /lib64/libpthread.so.0
#12 0x00007fc99942c693 in clone () at /lib64/libc.so.6

Thread 4 (Thread 0x7fc97c923700 (LWP 1648)):
#0  0x00007fc999421a6f in poll () at /lib64/libc.so.6
#1  0x00007fc997b5e79e in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#2  0x00007fc997b5e8d3 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007fc9999c1da3 in QEventDispatcherGlib::processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () at /lib64/libQt5Core.so.5
#4  0x00007fc99996bcfb in QEventLoop::exec(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () at /lib64/libQt5Core.so.5
#5  0x00007fc9997c43a5 in QThread::exec() () at /lib64/libQt5Core.so.5
#6  0x00007fc99aa2cf4a in QDBusConnectionManager::run() () at /lib64/libQt5DBus.so.5
#7  0x00007fc9997c54f6 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#8  0x00007fc9989584e2 in start_thread () at /lib64/libpthread.so.0
#9  0x00007fc99942c693 in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7fc97d4df700 (LWP 1637)):
#0  0x00007fc99895ed45 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007fc97e37014b in util_queue_thread_func () at /usr/lib64/dri/i965_dri.so
#2  0x00007fc97e36fd5b in impl_thrd_routine () at /usr/lib64/dri/i965_dri.so
#3  0x00007fc9989584e2 in start_thread () at /lib64/libpthread.so.0
#4  0x00007fc99942c693 in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7fc97fb92700 (LWP 1620)):
#0  0x00007fc999421a6f in poll () at /lib64/libc.so.6
#1  0x00007fc99878e38a in _xcb_conn_wait () at /lib64/libxcb.so.1
#2  0x00007fc99878ffea in xcb_wait_for_event () at /lib64/libxcb.so.1
#3  0x00007fc97fd18ac8 in QXcbEventQueue::run() () at /lib64/libQt5XcbQpa.so.5
#4  0x00007fc9997c54f6 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#5  0x00007fc9989584e2 in start_thread () at /lib64/libpthread.so.0
#6  0x00007fc99942c693 in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7fc98ce38940 (LWP 1565)):
[KCrash Handler]
#6  ImapAccount::authenticationMode() const (this=0x0) at /usr/src/debug/kdepim-runtime-19.12.0-1.fc31.x86_64/resources/imap/imapaccount.cpp:85
#7  0x00005578164ac46a in SessionPool::requestPassword() (this=0x557817607a80) at /usr/src/debug/kdepim-runtime-19.12.0-1.fc31.x86_64/resources/imap/sessionpool.cpp:88
#8  0x00005578164b0a45 in SessionPool::processPendingRequests() (this=0x557817607a80) at /usr/src/debug/kdepim-runtime-19.12.0-1.fc31.x86_64/resources/imap/sessionpool.cpp:302
#9  0x00007fc9999a3726 in QSingleShotTimer::timerEvent(QTimerEvent*) () at /lib64/libQt5Core.so.5
#10 0x00007fc999997ce5 in QObject::event(QEvent*) () at /lib64/libQt5Core.so.5
#11 0x00007fc99a491ad6 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#12 0x00007fc99a49b150 in QApplication::notify(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#13 0x00007fc99996cdf8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib64/libQt5Core.so.5
#14 0x00007fc9999c1048 in QTimerInfoList::activateTimers() () at /lib64/libQt5Core.so.5
#15 0x00007fc9999c18fc in timerSourceDispatch(_GSource*, int (*)(void*), void*) () at /lib64/libQt5Core.so.5
#16 0x00007fc997b5e4a0 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#17 0x00007fc997b5e830 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#18 0x00007fc997b5e8d3 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#19 0x00007fc9999c1d85 in QEventDispatcherGlib::processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () at /lib64/libQt5Core.so.5
#20 0x00007fc99996bcfb in QEventLoop::exec(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () at /lib64/libQt5Core.so.5
#21 0x00007fc999973a26 in QCoreApplication::exec() () at /lib64/libQt5Core.so.5
#22 0x00007fc99b3ab672 in Akonadi::ResourceBase::init(Akonadi::ResourceBase&amp;) () at /lib64/libKF5AkonadiAgentBase.so.5
#23 0x00005578164488d5 in Akonadi::ResourceBase::init&lt;ImapResource&gt;(int, char**) (argc=&lt;optimized out&gt;, argv=&lt;optimized out&gt;) at /usr/include/KF5/AkonadiAgentBase/resourcebase.h:181
#24 0x00007fc9993521a3 in __libc_start_main () at /lib64/libc.so.6
#25 0x000055781644695e in _start () at /usr/src/debug/kdepim-runtime-19.12.0-1.fc31.x86_64/resources/imap/main.cpp:22
[Inferior 1 (process 1565) detached]

The reporter indicates this bug may be a duplicate of or related to bug 361101.

Possible duplicates by query: bug 409419, bug 361101, bug 357227, bug 353442, bug 349904.

Reported using DrKonqi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1903345</commentid>
    <comment_count>1</comment_count>
    <who name="Christophe Marin">christophe</who>
    <bug_when>2020-01-17 10:00:41 +0000</bug_when>
    <thetext>*** Bug 415930 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1903347</commentid>
    <comment_count>2</comment_count>
    <who name="Christophe Marin">christophe</who>
    <bug_when>2020-01-17 10:00:49 +0000</bug_when>
    <thetext>*** Bug 415960 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1903349</commentid>
    <comment_count>3</comment_count>
    <who name="Philippe ROUBACH">philippe.roubach</who>
    <bug_when>2020-01-17 10:16:21 +0000</bug_when>
    <thetext>i confirm this.
i was using &quot;captvty&quot;.
kontact was minimized in the systray.

2 times : 2020-01-06 and 2020-01-17

kde apps 19.12.1
kde plasma : 5.17.5
kde frameworks : 5.66.0
Qt 5.14.0
kontact 5.13.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1903350</commentid>
    <comment_count>4</comment_count>
    <who name="Philippe ROUBACH">philippe.roubach</who>
    <bug_when>2020-01-17 10:17:08 +0000</bug_when>
    <thetext>i forgot : openSuse leap 15.1 Argon.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1903355</commentid>
    <comment_count>5</comment_count>
    <who name="Christophe Marin">christophe</who>
    <bug_when>2020-01-17 10:28:17 +0000</bug_when>
    <thetext>Which authentication method is selected in your IMAP accounts settings?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1903358</commentid>
    <comment_count>6</comment_count>
    <who name="Iyán M. V.">me</who>
    <bug_when>2020-01-17 10:38:04 +0000</bug_when>
    <thetext>In my case (Bug 415960) I am using the following:

Encryption: STARTTLS
Port: 143
Authentication: PLAIN

Exactly the same configuration as in a different IMAP account which never crashes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1903360</commentid>
    <comment_count>7</comment_count>
    <who name="Philippe ROUBACH">philippe.roubach</who>
    <bug_when>2020-01-17 10:39:37 +0000</bug_when>
    <thetext>(In reply to Christophe Giboudeaux from comment #5)
&gt; Which authentication method is selected in your IMAP accounts settings?

imap.free.fr
ssl/tls
993
plain

I have just received &quot;impossible de se connecter au serveur. veuillez vérifier l&apos;adresse du serveur&quot; while I&apos;m on the &quot;advanced&quot; tab.


On the other hand I remember this:

I launch for the first time kmail then this launches the account assistant then this fails because a problem about authentication.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1903361</commentid>
    <comment_count>8</comment_count>
    <who name="Philippe ROUBACH">philippe.roubach</who>
    <bug_when>2020-01-17 10:40:52 +0000</bug_when>
    <thetext>i forgot.

i manualy created my account with success.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1903377</commentid>
    <comment_count>9</comment_count>
    <who name="Iyán M. V.">me</who>
    <bug_when>2020-01-17 12:46:58 +0000</bug_when>
    <thetext>Why Bug 415960  has been marked as a duplicate of this, and Bug 414685 not? I don&apos;t think my bug is exactly same as this one (I didn&apos;t wake up from sleep state). Sometimes it crashes while using the computer, other times with the screen locked, but I never put computers into a sleep state.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1903426</commentid>
    <comment_count>10</comment_count>
    <who name="Christophe Marin">christophe</who>
    <bug_when>2020-01-17 17:00:38 +0000</bug_when>
    <thetext>(In reply to Iyán Méndez Veiga from comment #9)
&gt; Why Bug 415960  has been marked as a duplicate of this, and Bug 414685 not?

Because the backtrace in bug 414685 is lacking debug symbols and could not be found.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1903427</commentid>
    <comment_count>11</comment_count>
    <who name="Iyán M. V.">me</who>
    <bug_when>2020-01-17 17:03:30 +0000</bug_when>
    <thetext>&gt; Because the backtrace in bug 414685 is lacking debug symbols and could not
&gt; be found.

What I should do to get them? I compiled kdepim-runtime following these instructions in order to get them:
https://wiki.archlinux.org/index.php/Debug_-_Getting_Traces#CMAKE_(KDE)_applications

In particular, I used -DCMAKE_BUILD_TYPE=RelWithDebInfo. I would like to help as much as possible to get this bug fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1951804</commentid>
    <comment_count>12</comment_count>
    <who name="Ahmad Samir">a.samirh78</who>
    <bug_when>2020-08-19 18:01:52 +0000</bug_when>
    <thetext>*** Bug 418599 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1951874</commentid>
    <comment_count>13</comment_count>
    <who name="Dennis Schridde">heri+kde</who>
    <bug_when>2020-08-20 06:45:35 +0000</bug_when>
    <thetext>(In reply to Ahmad Samir from comment #12)
&gt; *** Bug 418599 has been marked as a duplicate of this bug. ***

I carried over the See-Alsos from bug #418599, which reference issues that appeared on the same systems with the same accounts and might be related to each other.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1952464</commentid>
    <comment_count>14</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2020-08-22 17:39:37 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/pim/kdepim-runtime/-/merge_requests/5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1952802</commentid>
    <comment_count>15</comment_count>
    <who name="Daniel Vrátil">dvratil</who>
    <bug_when>2020-08-24 15:28:28 +0000</bug_when>
    <thetext>Git commit 127cfcc288579b1f268326f623c7652397878b5d by Daniel Vrátil, on behalf of Ahmad Samir.
Committed on 24/08/2020 at 14:45.
Pushed by dvratil into branch &apos;master&apos;.

Fix crash in SessionPool::requestPassword

If the connection to the imap server is lost, m_account becomes null and
requestPassword would crash trying to access a nullptr. Check m_account in
processPendingRequests and bail out if the connection is lost. Note that a
similar check is used in onPasswordRequestDone.

M  +9    -0    resources/imap/sessionpool.cpp

https://invent.kde.org/pim/kdepim-runtime/commit/127cfcc288579b1f268326f623c7652397878b5d</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1952812</commentid>
    <comment_count>16</comment_count>
    <who name="Iyán M. V.">me</who>
    <bug_when>2020-08-24 16:54:36 +0000</bug_when>
    <thetext>I applied the patch, and I haven&apos;t had any crashes for almost two days. If it continues like these for a few more days, then I guess that was also my problem. One of my accounts was crashing continuously at random times (one or two times per day).

Thank you Ahmad Samir for fixing the issue!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1953178</commentid>
    <comment_count>17</comment_count>
    <who name="Iyán M. V.">me</who>
    <bug_when>2020-08-26 11:47:10 +0000</bug_when>
    <thetext>No crashes in three different computers after applying the patch. Solved for me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1955231</commentid>
    <comment_count>18</comment_count>
    <who name="Iyán M. V.">me</who>
    <bug_when>2020-09-05 06:37:34 +0000</bug_when>
    <thetext>Was the patch merged into 20.08.1? After updating with package from repos I got again a crash.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1955845</commentid>
    <comment_count>19</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2020-09-08 10:46:25 +0000</bug_when>
    <thetext>The fix was applied to master branch, and will be available with the 20.12 releases.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>