<?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>435427</bug_id>
          
          <creation_ts>2021-04-06 14:45:46 +0000</creation_ts>
          <short_desc>akonadi_imap_resource: segfault on authentication</short_desc>
          <delta_ts>2023-04-29 09:55:10 +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>unspecified</version>
          <rep_platform>Fedora RPMs</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>drkonqi</keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Victor Mataré">vmatare+kdebug</reporter>
          <assigned_to name="kdepim bugs">pim-bugs-null</assigned_to>
          <cc>fmdefrancesco</cc>
    
    <cc>thiago.bauermann</cc>
          
          <cf_commitlink>https://invent.kde.org/pim/kdepim-runtime/commit/9cfc0f6a5c53fc3c7dbe9d25ceea1f8ec1110d59</cf_commitlink>
          <cf_versionfixedin>23.04.1</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>1</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2022872</commentid>
    <comment_count>0</comment_count>
    <who name="Victor Mataré">vmatare+kdebug</who>
    <bug_when>2021-04-06 14:45:46 +0000</bug_when>
    <thetext>Application: akonadi_imap_resource (5.15.3 (20.08.3))

Qt Version: 5.15.2
Frameworks Version: 5.79.0
Operating System: Linux 5.11.11-200.fc33.x86_64 x86_64
Windowing system: X11
Distribution: &quot;Fedora release 33 (Thirty Three)&quot;

-- Information about the crash:
The resource was working fine before and then it suddenly started crashing. Nothing really changed except that a few new emails came in. The server is a Microsoft 365 Exchange mailbox. I&apos;ll try to sort through the new emails, maybe I can identify the culprit.

The crash can be reproduced every time.

-- Backtrace:
Application: support (akonadi_imap_resource), signal: Segmentation fault

[KCrash Handler]
#4  ImapAccount::authenticationMode (this=0x0) at /usr/src/debug/kdepim-runtime-20.08.3-1.fc33.x86_64/resources/imap/imapaccount.cpp:85
#5  0x0000560dd7904a8a in SessionPool::requestPassword (this=0x560dd8f979d0) at /usr/src/debug/kdepim-runtime-20.08.3-1.fc33.x86_64/resources/imap/sessionpool.cpp:88
#6  0x00007fc12f6a0d1e in QObject::event(QEvent*) () from /lib64/libQt5Core.so.5
#7  0x00007fc1302a6ec3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#8  0x00007fc12f678bd8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#9  0x00007fc12f67b8c7 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib64/libQt5Core.so.5
#10 0x00007fc12f6c5c27 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /lib64/libQt5Core.so.5
#11 0x00007fc12d870a9f in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#12 0x00007fc12d8c2a98 in g_main_context_iterate.constprop () from /lib64/libglib-2.0.so.0
#13 0x00007fc12d86de73 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#14 0x00007fc12f6c56f3 in QEventDispatcherGlib::processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () from /lib64/libQt5Core.so.5
#15 0x00007fc12f67757b in QEventLoop::exec(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () from /lib64/libQt5Core.so.5
#16 0x00007fc12f67f1b4 in QCoreApplication::exec() () from /lib64/libQt5Core.so.5
#17 0x0000560dd78b5157 in Akonadi::ResourceBase::init&lt;ImapResource&gt; (argc=&lt;optimized out&gt;, argv=0x7ffdffff99d0) at /usr/include/KF5/AkonadiAgentBase/resourcebase.h:186
#18 0x00007fc12f0511e2 in __libc_start_main () from /lib64/libc.so.6
#19 0x0000560dd78b306e in _start ()
[Inferior 1 (process 80660) detached]

Possible duplicates by query: bug 435332, bug 434873, bug 434725, bug 434294, bug 434282.

Reported using DrKonqi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2023864</commentid>
    <comment_count>1</comment_count>
      <attachid>137453</attachid>
    <who name="Thiago Jung Bauermann">thiago.bauermann</who>
    <bug_when>2021-04-09 17:57:51 +0000</bug_when>
    <thetext>Created attachment 137453
New crash information added by DrKonqi

akonadi_kolab_resource (5.15.1 (20.08.1)) using Qt 5.14.2

- What I was doing when the application crashed:

I wasn&apos;t doing anything related to KMail or Akonadi. This just happens by itself (during periodic mail check, I would assume).
It has happened a couple of times. This last time the machine was idle for a while and it went to sleep. When I came back to it, there was this crash. On the first time, I don&apos;t remember if it was a similar situation.

-- Backtrace (Reduced):
#4  ImapAccount::authenticationMode() const (this=0x0) at ./resources/imap/imapaccount.cpp:85
#5  0x000056006d9402fa in SessionPool::requestPassword() (this=0x56006f0f0600) at ./resources/imap/sessionpool.cpp:88
#6  0x00007f4edb561651 in QObject::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f4edc4e1013 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8  0x00007f4edb5351ca in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2024078</commentid>
    <comment_count>2</comment_count>
    <who name="Victor Mataré">vmatare+kdebug</who>
    <bug_when>2021-04-10 18:42:35 +0000</bug_when>
    <thetext>This has become an intermittently recurring problem now for one particular account I have. It&apos;s not linked to anything visibly happening on the server, i.e. it&apos;s not triggered by particular emails. It&apos;ll simply start at some (apparently random) point, then the resource will go into a crash loop (sometimes for hours) and after a while it will start working again (again for no apparent reason).

Strangely, another account I have with the exact same settings on the same server is working fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2028045</commentid>
    <comment_count>3</comment_count>
    <who name="Thiago Jung Bauermann">thiago.bauermann</who>
    <bug_when>2021-04-26 22:40:57 +0000</bug_when>
    <thetext>This crash just happened again, with the exact same backtrace. The last time it happened was when I added my previous comment to this bug.

Again, the machine was idle for a long while (about 1h30m), but it didn&apos;t go to sleep this time. The common factor seems to be the machine being idle for a while. Perhaps there&apos;s a bug when periodic mail check is triggered while the screensaver is active?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2226065</commentid>
    <comment_count>4</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2023-04-27 18:48:08 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/pim/kdepim-runtime/-/merge_requests/109</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2226070</commentid>
    <comment_count>5</comment_count>
    <who name="Carl Schwan">carl</who>
    <bug_when>2023-04-27 18:57:59 +0000</bug_when>
    <thetext>*** Bug 453092 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2226637</commentid>
    <comment_count>6</comment_count>
    <who name="Christophe Marin">christophe</who>
    <bug_when>2023-04-29 08:58:53 +0000</bug_when>
    <thetext>Git commit 8344e0cc25d71267e684bf03d658b7f9d05b2d89 by Christophe Marin, on behalf of Carl Schwan.
Committed on 29/04/2023 at 08:49.
Pushed by krop into branch &apos;master&apos;.

Fix crash trying to access password of empty account

The connect method of SessionPool discard the ImapAccount if it is not
empty the requestPassword method will try to fetch the password for the
empty account and this crash due to a null pointer dereference.

M  +1    -1    resources/imap/sessionpool.cpp

https://invent.kde.org/pim/kdepim-runtime/commit/8344e0cc25d71267e684bf03d658b7f9d05b2d89</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2226664</commentid>
    <comment_count>7</comment_count>
    <who name="Christophe Marin">christophe</who>
    <bug_when>2023-04-29 09:54:55 +0000</bug_when>
    <thetext>Git commit 9cfc0f6a5c53fc3c7dbe9d25ceea1f8ec1110d59 by Christophe Marin, on behalf of Carl Schwan.
Committed on 29/04/2023 at 09:54.
Pushed by krop into branch &apos;release/23.04&apos;.

Fix crash trying to access password of empty account

The connect method of SessionPool discard the ImapAccount if it is not
empty the requestPassword method will try to fetch the password for the
empty account and this crash due to a null pointer dereference.
(cherry picked from commit 8344e0cc25d71267e684bf03d658b7f9d05b2d89)

M  +1    -1    resources/imap/sessionpool.cpp

https://invent.kde.org/pim/kdepim-runtime/commit/9cfc0f6a5c53fc3c7dbe9d25ceea1f8ec1110d59</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>137453</attachid>
            <date>2021-04-09 17:57:51 +0000</date>
            <delta_ts>2021-04-09 17:57:51 +0000</delta_ts>
            <desc>New crash information added by DrKonqi</desc>
            <filename>akonadi_kolab_resource-20210409-134459.kcrash.txt</filename>
            <type>text/plain</type>
            <size>2828</size>
            <attacher name="Thiago Jung Bauermann">thiago.bauermann</attacher>
            
              <data encoding="base64">QXBwbGljYXRpb246IGFrb25hZGlfa29sYWJfcmVzb3VyY2UgKDUuMTUuMSAoMjAuMDguMSkpCgpR
dCBWZXJzaW9uOiA1LjE0LjIKRnJhbWV3b3JrcyBWZXJzaW9uOiA1Ljc0LjAKT3BlcmF0aW5nIFN5
c3RlbTogTGludXggNS45LjE2LTA1MDkxNi1nZW5lcmljIHg4Nl82NApXaW5kb3dpbmcgc3lzdGVt
OiBYMTEKRGlzdHJpYnV0aW9uOiBVYnVudHUgMjAuMTAKCi0tIEluZm9ybWF0aW9uIGFib3V0IHRo
ZSBjcmFzaDoKLSBXaGF0IEkgd2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