kmail is unresponsive (100% cpu) when editing new response, trying to access online resources

Bug #1979194 reported by Franck
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Kmail
Invalid
High
kmail (Ubuntu)
New
Undecided
Unassigned

Bug Description

When I edit a response to a mail, kmail becomes unresponsive for tens of seconds.
When this happens, htop shows /usr/bin/kontact is eating 100% of 1 cpu.

Then I eventually start to be able to type my text, _until I hit enter_ to get a new line.
Kmail then becomes unresponsive once again for several tens of seconds.

I ran strace, and it appears that it tries to read quite a lot of online resources, contained in the thread (signatures, etc...).

The mail contains a few external resources, all available, like:
<img src="https://nuage.liiib.re/s/RmQCimAJb2Jny6L/download" width="-2" height="-2">
or
<img src="https://s3.amazonaws.com/rkjha/signature-maker/icons/facebook_circle_color-20.png" width="-2" height="-2">

but loading these resources (which would by far not be mandatory on a reply) fails, I don't know why.

When it fails for some reason, it will then try to append every well known extension, as in here:

openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.ani", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.avif", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.avifs", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.bmp", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.bw", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.cur", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.eps", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.epsf", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.epsi", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.exr", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.gif", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.hdr", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.icns", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.ico", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.jpeg", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.jpg", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.kra", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.mng", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.ora", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.pbm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.pcx", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.pgm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.pic", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.png", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.ppm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.psd", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.ras", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.rgb", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.rgba", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.sgi", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.svg", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.svgz", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.tga", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.tif", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.tiff", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.wbmp", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.webp", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.xbm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.xcf", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.xpm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)

This makes kmail stall for ten of seconds...

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: kmail 4:21.12.3-0ubuntu1
ProcVersionSignature: Ubuntu 5.15.0-39.42-generic 5.15.35
Uname: Linux 5.15.0-39-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl icp
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: KDE
Date: Mon Jun 20 11:19:02 2022
InstallationDate: Installed on 2022-02-05 (134 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Alpha amd64 (20220119)
SourcePackage: kmail
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
In , ZePom (francoisprunier) wrote :

When replying to a long email with lots of messages back and forth between me and the recepient, the emails is long and the composer window freezes for a long time before I can actually edit anything, the CPU is 100% on one core. You need to painfully remove some of the replied to text to make it shorter and then it becomes usable again.

This makes kmail unusable for me at work.

Reproducible: Always

Steps to Reproduce:
1. Pick a long email to reply to
2. Hit reply
3. Wait a few minutes before you can actually edit
Actual Results:
You need to aait a few minutes before you can actually edit. The only trick that make it usable again is to chop off the end of the email to make it shorter. Then it becomes responsive again.

Expected Results:
The wait before editing a reply to a long email should be a few seconds.

That happens on the latest ubuntu and the one before that as well. I'm pretty sure it was happening on kmail 4.12 and 4.11.

I use kmail inside kontact. But I have the same issue with kmail alone.

Revision history for this message
In , Montel-3 (montel-3) wrote :

Indeed I confirm it's QTextEdit which has this problem.
=> a bug in qt not in kdepim.

Revision history for this message
In , ZePom (francoisprunier) wrote :

Thanks for the feedback Laurent.

Do you happen to know which qt version fixes it ?

Also I'm afraid users might not know that, think it's kmail fault and ditch it for a wrong reason. Is there no workaround available while this gets resolved in qt ?

Revision history for this message
In , Montel-3 (montel-3) wrote :

I don't think that it's fixed in qt
I didn't tested with qt5
For qt4 I think that it will never fix.

Revision history for this message
In , mjs (morten-7) wrote :

Still a huge problem!

5.17.2 (OpenSUSE Tumbleweed)

Revision history for this message
Franck (alci) wrote :
Franck (alci)
summary: - kmail is unresponsive (100% cpu) when editing new mails
+ kmail is unresponsive (100% cpu) when editing new response
description: updated
Franck (alci)
description: updated
description: updated
summary: - kmail is unresponsive (100% cpu) when editing new response
+ kmail is unresponsive (100% cpu) when editing new response, trying to
+ access online resources
Franck (alci)
description: updated
Revision history for this message
In , Franck (alci) wrote :

I encounter the same problem... I ran strace, and the problem occurs when kmail tries to access external resources (images in signatures in my case). I fails for some reason, then tries to append every extension it knows to the url (!!), which obviously fails. This makes kmail consume 100% cpu and stall for tens of seconds.

Opened an Ubuntu bug here : https://bugs.launchpad.net/ubuntu/+source/kmail/+bug/1979194

Revision history for this message
In , Franck (alci) wrote :

Example of strace when unresponsive:

openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.ani", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.avif", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.avifs", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.bmp", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.bw", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "https://s3.amazonaws.com/rkjha/signature-maker/icons/twitter_circle_color-20.png.cur", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)
etc...

Franck (alci)
description: updated
Changed in kmail:
importance: Unknown → High
Revision history for this message
In , 6homas (6homas) wrote :

Same issue here, this is annoying as hell.

Operating System: Arch Linux
KDE Plasma Version: 5.25.1
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5

Revision history for this message
In , domhans (domhans) wrote :

True, this annoys me for ages. To my opinion it's a quoting setting issue. Each time I reply to a mail quoted lines double. So writing back and force, email length increases exponentially... and kmail becomes unresponsive one mail is too long
There must be an easy way to fix this.

I'd be super thankful

I posted a brief text example below:

>> > > > models. One without Food intake and one including it. Here you alway
>> > > >
>> > > >
>> > > >
>> > > > have
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >

Revision history for this message
In , Louis Moureaux (louis-m-deactivatedaccount) wrote :

*** This bug has been marked as a duplicate of bug 278046 ***

Changed in kmail:
status: Unknown → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.