Bug 398222 - 100% CPU usage when trying to open a mailto link
Summary: 100% CPU usage when trying to open a mailto link
Status: RESOLVED WORKSFORME
Alias: None
Product: Falkon
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: David Rosca
URL: https://bugs.launchpad.net/ubuntu/+so...
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-04 05:23 UTC by Walter Lapchynski
Modified: 2020-12-12 04:34 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
backtrace (5.39 KB, text/plain)
2018-09-15 16:51 UTC, Walter Lapchynski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Lapchynski 2018-09-04 05:23:39 UTC
To see the problem, simply run `falkon mailto:wxl@ubuntu.com`. It will, along with other QtWebEngine browsers, lead to a blank chrome-error://chromewebdata/ page. Qutebrowser doesn't load any further. With Falkon, it seems to keep trying to access that page for whatever reason and that's likely leading to the 100% usage. Note that neither browser will load a mail client. That said, it's probably a combination of QtWebEngine not properly dealing with mailtos and Falkon not properly dealing with the chrome-error page.

This is Falkon 3.0.1-0ubuntu1 on Lubuntu 18.10, FWIW.
Comment 1 David Rosca 2018-09-14 07:48:26 UTC
I can't reproduce it anymore.

This usually happens when "xdg-open" opens some url in falkon that falkon cannot handle, which then forwards it to "xdg-open" again and there you have the loop.
Falkon desktop file doesn't announce "mailto" support, so "xdg-open" should not try to open it in Falkon.
Comment 2 Walter Lapchynski 2018-09-14 18:03:24 UTC
While that makes sense, I think it's kind of missing the mark. Here's the results of various actions:

 * `xdg-open mailto:wxl@ubuntu.com` → opens email client with normal CPU usage
 * `firefox mailto:wxl@ubuntu.com` → opens firefox, then email client with normal CPU usage
 * `qutebrowser mailto:wxl@ubuntu.com` → opens qutebrowser with normal CPU usage
 * `falkon mailto:wxl@ubuntu.com` → opens falkon with 100% CPU usage

And interestingly, mailto is not the only URI scheme that's problematic.

 * `xdg-open tel:towel.blinkenlights.nl` → opens falkon with 100% CPU usage
 * `firefox tel:towel.blinkenlights.nl` → opens firefox with a search for tel:towel.blinkenlights.nl with normal CPU usage
 * `qutebrowser tel:towel.blinkenlights.nl` → opens qutebrowser with normal CPU usage
 * `falkon tel:towel.blinkenlights.nl` → opens falkon with 100% CPU usage

From this my guess is that there are two issues:

 1. Some bug in QtWebEngine that doesn't properly handle some URI schemes.
 2. Falkon lacks something that qutebrowser has where if it can't handle some URI scheme, it gets stuck in a loop that qutebrowser avoids.

That said, what version can you not reproduce it in?
Comment 3 Walter Lapchynski 2018-09-14 19:19:46 UTC
I can confirm with e0d1175dd107 that if I have an email client installed, it Just Works™, but if there's no email client installed, it produces the same results. And indeed xdg-open wants to open falkon for mailtos, so I guess that explains things. 

The question is now: which commit fixed the problem? Is this unknown? Or maybe approaching this from a different direction: when's the next release? I'd really love to see this fixed before 18.10 is released.
Comment 4 David Rosca 2018-09-15 15:48:18 UTC
It's not fixed. I'll repeat it again, it's incorrect behavior in xdg-open and it doesn't seem to be easy way to handle it as the xdg-open is invoking QtWebEngine code, not Falkon code.

Can you please upload a backtrace from gdb when you see the 100% cpu usage? Run "gdb falkon" -> "r" enter -> reproduce the bug -> Ctrl+C -> "bt" enter
Comment 5 Walter Lapchynski 2018-09-15 16:51:09 UTC
Created attachment 114979 [details]
backtrace
Comment 6 hrwy 2019-05-17 05:42:34 UTC
I have another problem: >10 tabs opens when I click SendPageLink in submenu (Application version 3.1.99
QtWebEngine version 5.12.2
© 2010-2018 David Rosca
https://falkon.org
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Falkon/3.1.99 Chrome/69.0.3497.128 Safari/537.36
Ubuntu 19.04 64bit Falkon from 3.1.0~~git20190512+r4630+42~ubuntu19.04.1 500
        500 http://ppa.launchpad.net/lubuntu-dev/falkon-daily/ubuntu)
Comment 7 Justin Zobel 2020-11-12 06:13:42 UTC
I've just tested this (100% CPU usage on mailto links) and I cannot reproduce this issue.

Can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved. I'm setting status to "needsinfo" pending your response, please change back to "reported" or "resolved" when you respond, thanks.

In regards to any other issues if they are still relevant please open a new bug report for those.
Comment 8 Bug Janitor Service 2020-11-27 04:34:04 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Bug Janitor Service 2020-12-12 04:34:15 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!