Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

qTox insane CPU & RAM usage due to starting new processes from clicking on tox: links #1926

Closed
PhilHypnox opened this issue Jun 28, 2015 · 13 comments
Labels
C-bug The issue contains a bug report P-medium

Comments

@PhilHypnox
Copy link

Running qTox, I noticed a significant slow-down in everything CPU-intensive that I do (playing movies suddenly became impossible in even 720p). This is the task manager screenshot:

uirh171

Why is qTox eating up that much RAM & CPU?

I'm W7 x64.

@tux3 tux3 added the C-bug The issue contains a bug report label Jun 28, 2015
@tux3
Copy link
Member

tux3 commented Jun 28, 2015

Did you intentionally open 6 different qTox instances?

@PhilHypnox
Copy link
Author

Nope. I just had it running for... about 7 to 9 days. I don't shut down my PC at all in general. Can't imagine it being on my side, unless these instances were started in issue 1925 while I was testing, and didn't shut down.

Which I really doubt.

@tux3
Copy link
Member

tux3 commented Jun 28, 2015

Alright, I'll take a look at it, thanks.

Can you post the log (in folder %APPDATA%/tox/qtox.log), please?

@towlie
Copy link
Contributor

towlie commented Jun 28, 2015

@PhilHypnox Did you use video calls in these 7 to 9 days? If yes, did some of your contacts use utox?

@zetok
Copy link
Contributor

zetok commented Jun 28, 2015

Reason - qTox cannot handle clicking on tox: URI well:
click click

@PhilHypnox
Copy link
Author

http://pastebin.com/9Rs0Tkt3

the log. And yes, it does appear to be the case. It only goes back to normal once all instances of qTox are closed.

@tux3
Copy link
Member

tux3 commented Jun 28, 2015

@PhilHypnox

Thanks, I have a good idea of what the problem is now.

Although a big part of the log is qTox not being able to connect to the network, is that a problem you had with qTox, or just spotty internet?

@PhilHypnox
Copy link
Author

Spotty connection, yes.

@suhr
Copy link
Contributor

suhr commented Aug 20, 2015

Add tag l-slow.

@zetok zetok changed the title qTox insane CPU & RAM usage qTox insane CPU & RAM usage due to Tox starting new processes from clicking on tox: links Sep 20, 2015
@zetok zetok changed the title qTox insane CPU & RAM usage due to Tox starting new processes from clicking on tox: links qTox insane CPU & RAM usage due to starting new processes from clicking on tox: links Sep 20, 2015
@zetok
Copy link
Contributor

zetok commented Sep 20, 2015

From #2271, it would appear that tox: links don't work on windows - since example provided in that issue didn't have correct ID, could this be checked with correct ID in "link", that will have 76 hexadecimal characters, e.g. tox:90F4C2558794EDC54C62585541DC7105583D9E20B5B29F0034B5032A15F4CE3CEC4927D6D779 ?

@zetok zetok added the O-need-info We need more information for this issue label Sep 20, 2015
@PKEv
Copy link
Contributor

PKEv commented Sep 20, 2015

and new users can't use this link because link "tox:...." was registered by nsis setup
how this mechanism will work in multiple application starts (different accounts)?

@zetok zetok removed the O-need-info We need more information for this issue label Sep 21, 2015
@sudden6
Copy link
Member

sudden6 commented Apr 20, 2016

More logs and steps to reproduce: #3167

@zetok
Copy link
Contributor

zetok commented Feb 17, 2017

on 1.8.1 bug is still present, although it results in 100% CPU usage only until one loads a profile

tux3 added a commit that referenced this issue Feb 17, 2017
Fixes #1926 : When an IPC event was processed locally, if the window was closed before the core could start, the event handler would be forever stuck in the background waiting for the core to start. We fix this by substituting QApplication::quit() by a Nexus::quit() function and a Nexus::isRunning() function, which gives us a condition for exiting blocking processEvents() loops. We cannot simply use QApplication::quit(), because this function has no effect before the start of the event loop.

The problem was further exacerbated by the Tox URI event handler being (incorrectly) blocking. The IPC owner would block in this event handler, and the sender of the event would give up waiting and process the event itself a second time, potentially triggering the first bug. We fix the event handlers accordingly to be (mostly) non-blocking.

Also fixes a related deadlock between ~Core and ~Profile in the case of an early exit
tux3 added a commit that referenced this issue Feb 17, 2017
Fixes #1926 : When an IPC event was processed locally, if the window was closed before the core could start, the event handler would be forever stuck in the background waiting for the core to start. We fix this by substituting QApplication::quit() by a Nexus::quit() function and a Nexus::isRunning() function, which gives us a condition for exiting blocking processEvents() loops. We cannot simply use QApplication::quit(), because this function has no effect before the start of the event loop.

The problem was further exacerbated by the Tox URI event handler being (incorrectly) blocking. The IPC owner would block in this event handler, and the sender of the event would give up waiting and process the event itself a second time, potentially triggering the first bug. We fix the event handlers accordingly to be (mostly) non-blocking.

Also fixes a related deadlock between ~Core and ~Profile in the case of an early exit
tux3 added a commit that referenced this issue Feb 17, 2017
tux3 added a commit that referenced this issue Feb 17, 2017
Fixes #1926 : When an IPC event was processed locally, if the window was closed before the core could start, the event handler would be forever stuck in the background waiting for the core to start. We fix this by substituting QApplication::quit() by a Nexus::quit() function and a Nexus::isRunning() function, which gives us a condition for exiting blocking processEvents() loops. We cannot simply use QApplication::quit(), because this function has no effect before the start of the event loop.

The problem was further exacerbated by the Tox URI event handler being (incorrectly) blocking. The IPC owner would block in this event handler, and the sender of the event would give up waiting and process the event itself a second time, potentially triggering the first bug. We fix the event handlers accordingly to be (mostly) non-blocking.

Also fixes a related deadlock between ~Core and ~Profile in the case of an early exit
tux3 added a commit that referenced this issue Feb 17, 2017
tux3 added a commit that referenced this issue Feb 17, 2017
@tux3 tux3 closed this as completed in c75ee8a Feb 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C-bug The issue contains a bug report P-medium
Projects
None yet
Development

No branches or pull requests

7 participants