Bug 227841 - net-im/telegram-desktop: 100% CPU usage
Summary: net-im/telegram-desktop: 100% CPU usage
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-29 11:33 UTC by John Smith
Modified: 2018-08-21 22:00 UTC (History)
3 users (show)

See Also:
henry.hu.sh: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Smith 2018-04-29 11:33:25 UTC
Since telegram blockade started a few weeks ago - Telegram Desktop now utilized 100% of CPU for me.
Sometimes it is even more than 100% (considering 100% is usually 1 core and I have 4 and they all get utilized at 100%): 400%.

This happens right after the start.

The only message I see in the terminal is
QObject::startTimer: Timers cannot have negative intervals

It doesn't matter if I minimize or close the window - the CPU consuming seems quite constant.

High CPU usage seems to stop after a few minutes since the application got started.
Comment 1 John Smith 2018-04-29 11:43:38 UTC
> High CPU usage seems to stop after a few minutes since the application got started.

It seems to get back in a while after.
Comment 2 Henry Hu 2018-05-10 04:51:35 UTC
I can't reproduce this since those IPs are not blocked here. Can you try to grab a stack trace of the busy thread?
A possible way to do this:
> pgrep telegram
<telegram pid>
> ps auxH -o lwp | grep <telegram pid>
<list of threads>

Here, you can find the thread which is consuming 100% cpu. The thread id is listed as the last column.
Then, run gdb
> attach <telegram pid>
> thread <thread id>
> where

This will give you the backtrace of that thread. This may help in diagnosing the problem.

Also, you may report a bug to upstream:
https://github.com/telegramdesktop/tdesktop/issues

Finally, you may run telegram under ktrace, to find out if telegram is busy calling some system calls, etc.
Comment 3 Walter Schwarzenfeld freebsd_triage 2018-06-04 14:15:50 UTC
There already one:

https://github.com/telegramdesktop/tdesktop/issues/3640
Comment 4 John Smith 2018-06-04 19:00:40 UTC
(In reply to w.schwarzenfeld from comment #3)
That ticket describes absolutely different behavior.
Comment 5 Henry Hu 2018-06-04 19:40:23 UTC
You may try the new version of linux-telegram-desktop, version 1.3.0.
If that helps, I'll try to speed up the process of updating the native version.