<?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>373443</bug_id>
          
          <creation_ts>2016-12-08 22:20:56 +0000</creation_ts>
          <short_desc>Mail Dispatcher Agent spins at 100% CPU after upgrade from 4:16.08.2+p16.04+git20161117.2322-0 to 4:16.08.3+p16.04+git20161207.0319-0</short_desc>
          <delta_ts>2023-07-17 05:29:58 +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>Mail Dispatcher Agent</component>
          <version>5.3.2</version>
          <rep_platform>Neon</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>UNCONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Gunter Ohrner">mails.bugs.kde.org-2025-1</reporter>
          <assigned_to name="kdepim bugs">pim-bugs-null</assigned_to>
          <cc>criguada</cc>
    
    <cc>frapell</cc>
    
    <cc>heri+kde</cc>
    
    <cc>joseph</cc>
    
    <cc>mike</cc>
    
    <cc>montel</cc>
    
    <cc>patrizio+kde</cc>
    
    <cc>peter.fink126</cc>
    
    <cc>rewarp</cc>
    
    <cc>tlinux</cc>
    
    <cc>vkrause</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>35</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1644206</commentid>
    <comment_count>0</comment_count>
    <who name="Gunter Ohrner">mails.bugs.kde.org-2025-1</who>
    <bug_when>2016-12-08 22:20:56 +0000</bug_when>
    <thetext>After today&apos;s KDE Neon update from Akonadi 4:16.08.2+p16.04+git20161117.2007-0 to 4:16.08.3+p16.04+git20161208.0216-0, Mail Dispatcher Agent spins at 100% CPU.

It starts doing this immediately after login and also continues immediately after an &quot;akonadictl restart&quot;.

Upon &quot;akonadictl stop&quot;, Mail Dispatcher Agent crashes instead of shutting down cleanly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1644250</commentid>
    <comment_count>1</comment_count>
    <who name="Gunter Ohrner">mails.bugs.kde.org-2025-1</who>
    <bug_when>2016-12-09 09:10:53 +0000</bug_when>
    <thetext>In Akonadi console, this Agent is never displayed as running or online, but labeled with an unconnected plug icon and shown as offline. Meanwhile, it&apos;s happily spinning away, eating CPU and causing lots of noise due to the CPU fan having to run at full speed...

The only workaround I could find so far was entirely removing this Akonadi Agent using the Akonadi console.

However, obviously, I cannot send any mails any more using kMail if I do this, so this also is not really an option... :-/

I can live without the other agents which cause trouble since the update, but I clearly cannot properly work without the Mail Dispatcher Agent... :-(

What option&apos;s do I have to determine why this agent is not initialising correctly but (apparently) enters an infinite loop instead? What&apos;s it doing?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1644251</commentid>
    <comment_count>2</comment_count>
    <who name="Gunter Ohrner">mails.bugs.kde.org-2025-1</who>
    <bug_when>2016-12-09 09:12:19 +0000</bug_when>
    <thetext>BTW, I also tried removing and re-adding this agent using Akonadi console, but this also did not help / did not change anything.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1644253</commentid>
    <comment_count>3</comment_count>
    <who name="Gunter Ohrner">mails.bugs.kde.org-2025-1</who>
    <bug_when>2016-12-09 09:18:23 +0000</bug_when>
    <thetext>stracing the process shows just this:

read(10, &quot;&quot;, 16384)                     = 0
read(10, &quot;&quot;, 16384)                     = 0
read(10, &quot;&quot;, 16384)                     = 0
read(10, &quot;&quot;, 16384)                     = 0
read(10, &quot;&quot;, 16384)                     = 0
read(10, &quot;&quot;, 16384)                     = 0
read(10, &quot;&quot;, 16384)                     = 0
read(10, &quot;&quot;, 16384)                     = 0
read(10, &quot;&quot;, 16384)                     = 0
read(10, &quot;&quot;, 16384)                     = 0
read(10, &quot;&quot;, 16384)                     = 0
read(10, &quot;&quot;, 16384)                     = 0
read(10, &quot;&quot;, 16384)                     = 0
read(10, &quot;&quot;, 16384)                     = 0
read(10, &quot;&quot;, 16384)                     = 0
read(10, &quot;&quot;, 16384)                     = 0
read(10, &quot;&quot;, 16384)                     = 0
read(10, &quot;&quot;, 16384)                     = 0
read(10, &quot;&quot;, 16384)                     = 0
read(10, &quot;&quot;, 16384)                     = 0
read(10, &quot;&quot;, 16384)                     = 0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1646093</commentid>
    <comment_count>4</comment_count>
    <who name="Tomasz C.">tlinux</who>
    <bug_when>2016-12-20 05:47:39 +0000</bug_when>
    <thetext>Can you fix it:
lsof -p &lt;pid&gt;

Example return:
...
akonadi_m 3035 user   10r      REG                8,3      324 3807516 /home/user/.config/akonadi/agent_config_akonadi_migration_agent_changes.dat

- stop akonadi,
- rename file agent_config_akonadi_migration_agent_changes.dat
- start akonadi

The same for the other akonadi process (100% CPU)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1646256</commentid>
    <comment_count>5</comment_count>
    <who name="Laurent Montel">montel</who>
    <bug_when>2016-12-20 17:10:43 +0000</bug_when>
    <thetext>There is a fix for 100% CPU in akonadi master 98e72dd81f3b8d5faeb262f765cda9539d1c271f

Are you able to rebuild akonadi with this patch ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1648014</commentid>
    <comment_count>6</comment_count>
    <who name="Rewarp">rewarp</who>
    <bug_when>2016-12-28 16:29:37 +0000</bug_when>
    <thetext>I can confirm Tomasz&apos;s solution fixes the problem on openSUSE Tumbleweed. I only noticed the problem when KMail failed to send my messages in my outbox, presumably because of the saturation of the CPU processes.

Thanks for the suggestion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1649850</commentid>
    <comment_count>7</comment_count>
    <who name="Gunter Ohrner">mails.bugs.kde.org-2025-1</who>
    <bug_when>2017-01-06 10:01:23 +0000</bug_when>
    <thetext>@Laurent: Sorry for the late reply. As kMail did not work for me any more with this bug, I had to switch to Thunderbird for the meantime - and I did not notice that I had not subscribed to the IMAP folder where my KDE Bugzilla notifications end up, so I missed your question... :-(

(I configured kMail to show all folders regardless of subscription state.)

So that I&apos;ve now seen your question (and tons of others) is an indication that it&apos;s working for me again since yesterdays update. :)

Interestingly, KDE PIM Runtime which contains the mail agent was not changed during this update, but Akonadi was upgraded to 4:16.12.0+p16.04+git20170104.0343-0 (KDE Neon package).

So if this fix was contained therein, it helps. If it wasn&apos;t, the issue was caused by something else.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1650029</commentid>
    <comment_count>8</comment_count>
    <who name="Daniel Vrátil">dvratil</who>
    <bug_when>2017-01-06 21:54:55 +0000</bug_when>
    <thetext>*** Bug 373444 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1650031</commentid>
    <comment_count>9</comment_count>
    <who name="Daniel Vrátil">dvratil</who>
    <bug_when>2017-01-06 21:57:03 +0000</bug_when>
    <thetext>*** Bug 373441 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1650033</commentid>
    <comment_count>10</comment_count>
    <who name="Daniel Vrátil">dvratil</who>
    <bug_when>2017-01-06 21:57:20 +0000</bug_when>
    <thetext>*** Bug 373442 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1650042</commentid>
    <comment_count>11</comment_count>
    <who name="Daniel Vrátil">dvratil</who>
    <bug_when>2017-01-06 22:06:55 +0000</bug_when>
    <thetext>*** Bug 373989 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1653211</commentid>
    <comment_count>12</comment_count>
    <who name="Patrizio Bekerle">patrizio+kde</who>
    <bug_when>2017-01-10 05:42:22 +0000</bug_when>
    <thetext>After I was hit by https://bugs.kde.org/show_bug.cgi?id=373782 and could &quot;fix&quot; that with the sql_mode change I also got 100% CPU for these agents on KDE neon User Edition 5.8:

- Notes Agent
- Migration Agent
- Archive Mail Agent
- Mail Dispatcher Agent

Removing the corresponding /home/user/.config/akonadi/agent_config_akonadi_*_agent_changes.dat files help for me too. The 4x 100% CPU symptom is gone and mails are sent again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1655629</commentid>
    <comment_count>13</comment_count>
    <who name="Cristiano Guadagnino">criguada</who>
    <bug_when>2017-01-20 08:10:14 +0000</bug_when>
    <thetext>I had the same problem as Patrizio, and using the workaround by Tomasz (comment 4) fixed it completely on my Tumbleweed.

Cris</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1860932</commentid>
    <comment_count>14</comment_count>
    <who name="Franco Pellegrini">frapell</who>
    <bug_when>2019-06-05 14:49:11 +0000</bug_when>
    <thetext>I was bitten by this bug too. The problematic file was agent_config_akonadi_imap_resource_0_changes.dat

After applying the suggested workaround (stop akonadi, rename the file, start akonadi), the issue went away.

this is on 

Akonadi 4:19.04.1-0xneon+18.04+bionic+build25

Operating System: KDE neon 5.15
KDE Plasma Version: 5.15.5
KDE Frameworks Version: 5.58.0
Qt Version: 5.12.0
Kernel Version: 4.15.0-50-generic</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2241368</commentid>
    <comment_count>15</comment_count>
    <who name="Joseph Graham">joseph</who>
    <bug_when>2023-07-17 05:29:58 +0000</bug_when>
    <thetext>I have had a similar experience. I tried moving about 40,000 emails to a folder and aconadi imap process went to 100% CPU for the next 16 hours until I got annoyed with the fan noise. However stoppiing aconadi, moving agent_config_akonadi_imap_resource_0_changes.dat, and starting aconadi again fixed it. Though not all of the emails seems to have actually moved to the folder.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>