Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background CPU usage increases over time #5127

Open
1 task done
AlbinoGeek opened this issue Mar 27, 2021 · 19 comments
Open
1 task done

Background CPU usage increases over time #5127

AlbinoGeek opened this issue Mar 27, 2021 · 19 comments
Labels

Comments

@AlbinoGeek
Copy link

  • I have searched open and closed issues for duplicates

Bug Description

After resuming the system from standby, or simply leave the signal-desktop application running for many hours, the application continues to churn through computer resources, steadily using more and more CPU over time.

Steps to Reproduce

  1. Open signal-desktop
  2. Do literally nothing for 6-12 hours.

Actual Result:

Come back to a system load above 5 and entire pinned cores by signal-desktop ...
This happens regardless of the number of contacts, conversations or messages in the account.
This happens regardless of using physical or virtual hardware.
This even happens in an AWS EC2 instance.

I even tried virtual linked devices to remove my phone(s) as variable(s).

Expected Result:

NEARLY ZERO background CPU usage, especially in an empty account, with no messages being received or expiring.

Screenshots

[ I will post more screenshots after leaving it to bloat itself for another 6 hours... ]

Platform Info

Combination 1 (on Physical Hardware)

Signal Version: v1.40.1

Operating System: Fedora Workstation 33
Kernel: 5.10.19-200.fc33.x86_64

Linked Device Version: Android 11
Kernel: 4.19.113-20937596

Combination 2 (KVM Virtual Machine)

Signal Version: v1.40.1

Operating System: Fedora Workstation 33
Kernel: 5.10.19-200.fc33.x86_64

Linked Device Version: Android 11
Kernel: 4.19.113-20937596

Combination 3 (AWS EC2 t2.micro)

Signal Version: v1.40.1

Operating System: Debian 10.8
Kernel: 4.19.0-14.ec2.x86_64

Linked Device Version: Android 11
Kernel: 4.19.113-20937596

Combination 4 (AWS EC2 t2.micro) + Virtual Android

Signal Version: v1.40.1

Operating System: Debian 10.8
Kernel: 4.19.0-14.ec2.x86_64

Linked Device Version: Android 10
Kernel: 4.19.71

Link to Debug Log

Since there wasn't any information on whether a Debug Log contains any sensitive information... No.

It's reproducible with new accounts, and on both physical and virtual machines (including on a t2.micro instance on AWS with a basic X desktop installed), so has absolutely nothing to do with my account or computer hardware.

@hiqua
Copy link
Contributor

hiqua commented Mar 27, 2021

So you're saying that's a bug that should be reproducible on all platforms with all accounts?

How do you measure the system load, htop? The CPU% column?

I often leave it open for a full day but I haven't noticed this yet.

If you create a new AWS instance with a new account there can't be any sensitive information in the debug log by definition.

@AlbinoGeek
Copy link
Author

AlbinoGeek commented Mar 27, 2021

How do you measure the system load, htop? The CPU% column?

(I did mean *nix load average literally, as well as CPU% shown in htop, see below:)

In this case, system load was seen as steadily increasing while being watched with: dstat -l --cpu-adv -nd --mem-adv

Which I then confirmed was attributed to signal-desktop in htop (F4 for incremental process search), the CPU% column.

The first few times this happened, signal-desktop was being killed by my malware detection scripts, which kill runaway processes (those with seemingly unrestricted CPU usage over an unrealistic timespan)- so at first, I couldn't even monitor this properly. I've excluded signal-desktop from this check for the sake of this issue.


So you're saying that's a bug that should be reproducible on all platforms with all accounts?

I often leave it open for a full day but I haven't noticed this yet.

It appears to be reproducible in combinations of Android 10/11 and Linux 4.19/5.10, yes. I have not tested Windows or Mac OS X, let alone an iPhone (I don't have one atm to test with.)


If you create a new AWS instance with a new account there can't be any sensitive information in the debug log by definition.

Good point! I'll repeat this test on AWS with a new account and attach that debug log (could take up to 48 hours to reproduce. This is not a consistent increase of CPU, it appears to be a "jagged increase" if graphed.)

This makes me wonder if there are background tasks or CRON-alike (scheduled / time-based) cleanup or database management, etc that is simply getting backed up, or not cleanly exiting.


It's also worth noting that if signal-desktop is closed when it is in this resource-hogging state, it gets left a permanent zombie and is not cleaned up by the desktop. (It's PPID matches gnome-session, which isn't restarted even when you do Alt+F2``r, so I cannot cause the process to be handed back to init for cleanup without restarting my whole system.

image

I'll also note that signal-desktop are my only zombies, and the only reason I ever have to restart my Desktop [I use live kernel merge updates, which have worked well for years.]

[damon@doom ~]$ ps aufx | grep Z
damon      10344  0.0  0.0      0     0 ?        Z    Mar13   4:43  |   \_ [signal-desktop] <defunct>
damon    2054114  0.0  0.0      0     0 ?        Z    Mar21   3:38  |   \_ [signal-desktop] <defunct>

@hiqua
Copy link
Contributor

hiqua commented Mar 27, 2021

Honestly your config seems a bit too exotic for me not to suspect it being the root cause. Is there any chance you can reproduce that issue with a docker container? Or anything else that's easily reproducible? That'd be easier to share, I don't really want to set up signal-desktop on a AWS instance for a bug only you seem to be having.

@AlbinoGeek
Copy link
Author

AlbinoGeek commented Mar 27, 2021 via email

@ardarandir
Copy link

Is this issue still persisting under new Signal 5.0.0? Otherwise this bug could be closed.

@AlbinoGeek
Copy link
Author

AlbinoGeek commented Apr 18, 2021 via email

@AlbinoGeek
Copy link
Author

Is this issue still persisting under new Signal 5.0.0? Otherwise this bug could be closed.

Still occurs in 5.3.0 now that this version has arrived in the now stable Fedora 34.

@wwkeyboard
Copy link

wwkeyboard commented Jul 16, 2021

On OSX 11.4 I also see Signal Helper (Renderer).app idle at ~3-4% cpu, higher than any other apps. This is using v5.9.0, both with the app running for several days and just after restarting it.

@litinoveweedle
Copy link

Pop OS 21.04, with official deb package v5.9.0, I see on my i7-5600U constant 10-13% CPU usage in top

  • just synced account (almost no historic conversations and messages)
  • such CPU usage is observed from system start (Signal is started on system start with --start-in-tray)
  • when minimized (in tray) usage us around 10% CPU
  • with window visible usage is around 13% CPU
  • no disappearing message, no active conversations

@ngrigoriev
Copy link

I also observe strange behavior. I use Signal quite infrequently, so it is idle 99% of the time. Yet, when the system is idle, Signal is usually at the top of the top ;) This application performs surprising amount of activity when doing nothing and now even being displayed - it is on the desktop that is not visible at this moment. The messaging (!) application runs 8 processes, one of them has something with GPU (for God's sake, why?). I am not familiar with the internals of the app but it seems there is Chromium there.

@AlbinoGeek
Copy link
Author

AlbinoGeek commented Dec 11, 2021 via email

@rpc31
Copy link

rpc31 commented Dec 11, 2021

Same issue here with Macs Monterey 12.0.1 and Signal 5.25.1. At some point, I'll notice that my fans are getting pretty loud while doing nothing: opening the activity Monitor will every-time reveal Signal using 99% of CPU. I have to quiet the app then restart it. I'm also using what's app and Telegram in the background and Signal is the only one with such behavior.

@EvanHahn-Signal
Copy link
Contributor

Sorry folks are running into this. We've been trying hard to get to the bottom of these issues. If you have reliable reproduction steps, deeper investigation, or even theories, we'd love to hear them!

@alien2003
Copy link

Sorry folks are running into this. We've been trying hard to get to the bottom of these issues. If you have reliable reproduction steps, deeper investigation, or even theories, we'd love to hear them!

Reproduced on Arch, both in Beta and Release versions. I hope that it will be resolved soon, because it's critical. Maybe Ctrl+Shift+F12 chromium debugging would help? I can't open it in Signal for some reason

@chronos000
Copy link

Check out possible solution on this comment: #4459 (comment)

TL;DR: disable notifications in Signal's settings

@brzd
Copy link

brzd commented Jan 2, 2022

Sorry folks are running into this. We've been trying hard to get to the bottom of these issues. If you have reliable reproduction steps, deeper investigation, or even theories, we'd love to hear them!

Commented on #4459:

Has anyone tried tracing gif and other media that may cause load issues if ran in the background for long period of time in several message streams? Also just a hunch if this could be related to disk usage and files as attachments to signal?

@necropola
Copy link

necropola commented Jun 24, 2022

After switching off notifications signal-desktop on windows (10) seems to stop eating precious CPU cycles, but when I minimize it to the system tray the "polling" starts again. I'm seeing roughly 10% on average.

This should be very easy to reproduce. No such issue on Linux by the way.

This is a Performance Monitor Graph from signal-desktop (5.47.0) being minimized to the system tray. The same graph is pretty much a flat line when the application window is open and showing my Note to Self conversation.
Signal-Desktop - WIndows 10 -Performance Monitor

Don't know, if it is relevant, but my Windows 10 is a VM with GPU passsthrough running on Linux with QEMU/KVM. More often than not my idle Windows Desktop is the top CPU hog according to conky on my Linux host (that's how I noticed). Signal-desktop is one of the reasons why. The other two are discord (also electron based) and chrome which also behaves rather badly when idle.

@AlbinoGeek
Copy link
Author

AlbinoGeek commented Jun 24, 2022 via email

@indutny-signal
Copy link
Contributor

@AlbinoGeek sorry you keep running into it. On Linux do you think you could try running with --disable-gpu to see if there is any improvement?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests