Thread hogging CPU when Pale Moon keeps running for several days

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
LigH1L
Fanatic
Fanatic
Posts: 122
Joined: 2013-02-22, 19:08
Location: rural central Germany

Thread hogging CPU when Pale Moon keeps running for several days

Unread post by LigH1L » 2017-04-18, 18:24

When Pale Moon keeps running for several days, it may happen that a thread starts hogging the CPU. When this happens, I also can't save a file anymore by pressing the ENTER key, I have to click the button in the "Save as..." dialog with the mouse. When I try to quit Pale Moon, it takes a while until the system dialog appears that the application does not work anymore. On one PC I get no details; on another PC, there are "problem details":

Code: Select all

Problemsignatur:
  Problemereignisname:	APPCRASH
  Anwendungsname:	palemoon.exe
  Anwendungsversion:	27.2.1.6290
  Anwendungszeitstempel:	58d2fb4f
  Fehlermodulname:	xul.dll
  Fehlermodulversion:	27.2.1.6290
  Fehlermodulzeitstempel:	58d2fb78
  Ausnahmecode:	80000003
  Ausnahmeoffset:	01362e38
  Betriebsystemversion:	6.1.7601.2.1.0.256.1
  Gebietsschema-ID:	1031
  Zusatzinformation 1:	0a9e
  Zusatzinformation 2:	0a9e372d3b4ad19135b953a78882e789
  Zusatzinformation 3:	0a9e
  Zusatzinformation 4:	0a9e372d3b4ad19135b953a78882e789
The open tabs are different, but the default start.me page of Pale Moon is usually among them.

I wonder if a timer integer overflow in JavaScript may be able to cause this.
Fun and success!

User avatar
satrow
Forum staff
Forum staff
Posts: 1885
Joined: 2011-09-08, 11:27

Re: Thread hogging CPU when Pale Moon keeps running for several days

Unread post by satrow » 2017-04-18, 19:22

You get this on two computers? Then it's likely to be a specific site, Add-on or 3rd party software, maybe security, that's common to both installs interfering.

(I'm currently on ~14.5 day uptime with PM 27.2.1 x64 on W7, ~120 tabs open, many hundreds more used and closed from a similar number of sites in that time span, up to almost 4GB memory used, currently 2.7GB. No sign of any thread/CPU hogging.)

User avatar
LigH1L
Fanatic
Fanatic
Posts: 122
Joined: 2013-02-22, 19:08
Location: rural central Germany

Re: Thread hogging CPU when Pale Moon keeps running for several days

Unread post by LigH1L » 2017-04-26, 09:54

I can't be sure about it yet; but I suspect JavaScript heavy pages like a DropBox image gallery to be a reason...
Fun and success!

vpchelko

Re: Thread hogging CPU when Pale Moon keeps running for several days

Unread post by vpchelko » 2017-04-28, 05:14

The same problem. Pale Moon running for several days, and for some reason browser starts hogging 1 CPU at 100%.
I suspect that the trigger for this problem is restoring of system from the SLEEP MODE

JodyThornton

Re: Thread hogging CPU when Pale Moon keeps running for several days

Unread post by JodyThornton » 2017-04-28, 12:56

Well a new release was issued just this morning. Might be worth a try.
:)

User avatar
gracious1
Keeps coming back
Keeps coming back
Posts: 891
Joined: 2016-05-15, 05:00
Location: humid upstate NY

Re: Thread hogging CPU when Pale Moon keeps running for several days

Unread post by gracious1 » 2017-04-30, 19:48

I haven't upgraded to the latest release yet, but 27.2.1 on Ubuntu definitely exhibits similar behavior. Lately, I've had to quit Pale Moon when I step away from my computer for any length of time.
20 July 1969 🌗 Apollo 11 🌓 "One small step for [a] man, one giant leap for mankind." 🚀

whatever64

Re: Thread hogging CPU when Pale Moon keeps running for several days

Unread post by whatever64 » 2017-05-01, 17:37

I posted a similar thread earlier, still doesn't seem like there's a solution for this issue. viewtopic.php?f=29&t=14385&p=102712

I also noticed the same issue with the enter key no longer working in Save As ... dialogue box.

User avatar
LigH1L
Fanatic
Fanatic
Posts: 122
Joined: 2013-02-22, 19:08
Location: rural central Germany

Re: Thread hogging CPU when Pale Moon keeps running for several days

Unread post by LigH1L » 2017-05-03, 06:42

Still happening in v27.3.0.

"Heavy JavaScript" may already be just a FancyBox which keeps scrolling images day and night.

There is no real hibernation for my PC's, but screen and harddisks may power down after a longer time.

@ whatever64: Thank you for confirming the loss of a keyboard event handler in the Save dialog.
Fun and success!

User avatar
LigH1L
Fanatic
Fanatic
Posts: 122
Joined: 2013-02-22, 19:08
Location: rural central Germany

Re: Thread hogging CPU when Pale Moon keeps running for several days

Unread post by LigH1L » 2017-06-28, 14:08

I noticed that when I run Pale Moon in normal mode, there is a permanent high CPU utilization (12-13% of a quad-core CPU, AMD Phenom-II X4, means about 50% of one core), especially between palemoon.exe and a thread running the xul.dll, just while having https://palemoon.start.me/de visible.

What does this page do, once it is rendered?! :wtf: Permament background transfers which are to be checked by one/some of my add-ons (including NoScript and uBlock Origin)?

CPU utilization drops to 3-4% if I run Pale Moon in safe mode (thus no add-ons active, thus no network transfer monitoring).

Is there any way to profile which add-on has how much CPU utilization at the moment? If I could log that, I guess there is a chance to catch the add-on stumbling into a kind of live-lock after hours of suspicious activity. Deactivating each of the add-ons and watching the result over several hours to days in each case would only be the second-best solution, as this would take several weeks to collect results, in which I could not work with Pale Moon.

I confess, I have a lot of add-ons installed (more than a dozen); most of them should be rather passive, though, only activated by a button or shortcut. NoScript and uBlock Origin should be the only obvious candidates for being rather permanently active. At least from my PoV.
Attachments
SysInternals ProcessExplorer - Thread report
SysInternals ProcessExplorer - Thread report
Fun and success!

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35633
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Thread hogging CPU when Pale Moon keeps running for several days

Unread post by Moonchild » 2017-06-28, 20:33

Please don't try to hijack existing threads with unrelated issues. Especially in the bug reports board, you should keep ONE thread dedicated to ONE (perceived) bug.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
LigH1L
Fanatic
Fanatic
Posts: 122
Joined: 2013-02-22, 19:08
Location: rural central Germany

Re: Thread hogging CPU when Pale Moon keeps running for several days

Unread post by LigH1L » 2017-06-28, 20:54

I do not hijack my own thread. I add details to it. This is still related to the issue described in the beginning: I'm trying to discover the reason why my browser's CPU utilization raises to 100% of one core, and because a crash happens in the xul.dll, I believe that the suspicious high utilization and communication between palemoon.exe and xul.dll already right after a start is related to the reason.

I am not the only one who reports this issue. Unfortunately, I am not among those who could fix it. But I'm trying to help you discovering a reason. As good as I can. I am a graduated computer scientist, I learned programming; just did not excel in C/C++.
Fun and success!

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35633
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Thread hogging CPU when Pale Moon keeps running for several days

Unread post by Moonchild » 2017-06-28, 23:35

Right, it's your own thread, which makes it even worse XD

Anyway, as a graduated computer scientist, you should at least understand that CPU usage after a long session will not be the same as CPU usage caused by a single page (which I can't reproduce, by the way). You should also understand that just looking at threads and thread starting addresses isn't enough information to draw any sort of conclusion -- and that if you want more details about what is going on in the inner workings, that you should probably look at some profiling features in devtools or an extension instead of trying to look at the box from the outside. process Explorer won't know what these threads are actually busy with, after all.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
satrow
Forum staff
Forum staff
Posts: 1885
Joined: 2011-09-08, 11:27

Re: Thread hogging CPU when Pale Moon keeps running for several days

Unread post by satrow » 2017-06-29, 04:59

I see a consistent CPU activity bump of ~4% on both the Start.me DE and UK pages when in focus (UBO active or disabled), the x4 might only have 20-25% of the grunt of my Xeon so that would mean a big hit on older/weaker PCs.
StartMeDe.jpg

User avatar
LigH1L
Fanatic
Fanatic
Posts: 122
Joined: 2013-02-22, 19:08
Location: rural central Germany

Re: Thread hogging CPU when Pale Moon keeps running for several days

Unread post by LigH1L » 2017-06-29, 05:54

Looking from the point of a lot of experience shows you a different picture than looking from the opposite point; I'm about to make it first. The best I can do is pointing at details I found suspicious, in the hope that just that will give you some inspiration. I try to be as cooperative as I can. And I would be disappointed if that were offensive as such.

You mentioned that there are profiling tools. Are there any you would recommend? Before I might try the least recommendable first?
Fun and success!

User avatar
LigH1L
Fanatic
Fanatic
Posts: 122
Joined: 2013-02-22, 19:08
Location: rural central Germany

Re: Thread hogging CPU when Pale Moon keeps running for several days

Unread post by LigH1L » 2017-06-29, 09:09

OK, I was probably wrong, the CPU hogging activity appears to be in the palemoon.exe only. Right now I have this state in a browser with only one empty document tab, and ProcessExplorer shows CPU activity (almost) only in the exe thread. This happened after only few hours, not several days. I visited not much more than the start.me page, some Pale Moon website pages, and some Mozilla add-on pages, AFAIR.

I guess I won't discover more details without a custom debug build, possibly reporting DebugView messages in increasing depths of methods called in the message queue inside the browser... but I doubt I could make those.
Fun and success!

User avatar
satrow
Forum staff
Forum staff
Posts: 1885
Joined: 2011-09-08, 11:27

Re: Thread hogging CPU when Pale Moon keeps running for several days

Unread post by satrow » 2017-06-29, 09:57

LigH1L wrote:Right now I have this state in a browser with only one empty document tab, and ProcessExplorer shows CPU activity (almost) only in the exe thread. This happened after only few hours, not several days. I visited not much more than the start.me page, some Pale Moon website pages, and some Mozilla add-on pages, AFAIR.
How much CPU%?

How much is there after opening Pale Moon to only about:blank (change your home page to about:blank) and waiting a few seconds?

What 3rd party .dlls are loaded with PM?

What security software are you using?

User avatar
LigH1L
Fanatic
Fanatic
Posts: 122
Joined: 2013-02-22, 19:08
Location: rural central Germany

Re: Thread hogging CPU when Pale Moon keeps running for several days

Unread post by LigH1L » 2017-06-29, 10:58

Already mentioned above ... when it live-locks, there is 100% of one core (=25% of a Quad-Core CPU). After a blank start: Mostly idle (brief spikes up to 5%).

Security: MSSE (monitor disabled).

Add-ons: CYS, DlH, Google Image Search in context menu, Markdown Viewer, MEGA, MozArchiver, Nokia Maps 3D, NoScript, PMCmdr, Print Preview Btn, Save Session, TinEye Reverse search in conext menu, uBlock Origin, Web Developer

Plugins: Adobe Acrobat 11, AdobeAAMDetect, Google Update, MS Office Live, Nokia Maps 3D, npruntime example, Osmozilla, PDF-XChange, Silverlight, Adobe Flash (yes, I should remove some of them...)
Fun and success!

User avatar
LigH1L
Fanatic
Fanatic
Posts: 122
Joined: 2013-02-22, 19:08
Location: rural central Germany

Re: Thread hogging CPU when Pale Moon keeps running for several days

Unread post by LigH1L » 2017-08-10, 07:01

Still an issue in v27.4.1.

I would enjoy to help you discovering the reason. Unfortunately, I can only rely on your skills without instructions.
Fun and success!

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2410
Joined: 2012-08-19, 20:32

Re: Thread hogging CPU when Pale Moon keeps running for several days

Unread post by back2themoon » 2017-08-10, 09:25

LigH1L wrote:Plugins: Adobe Acrobat 11, AdobeAAMDetect, Google Update, MS Office Live, Nokia Maps 3D, npruntime example, Osmozilla, PDF-XChange, Silverlight, Adobe Flash (yes, I should remove some of them...)
You should also remove very old and discontinued extensions (like CYS), they can certainly cause issues.

User avatar
LigH1L
Fanatic
Fanatic
Posts: 122
Joined: 2013-02-22, 19:08
Location: rural central Germany

Re: Thread hogging CPU when Pale Moon keeps running for several days

Unread post by LigH1L » 2017-09-25, 06:44

This issue is not yet resolved for me. I was able to test a bit more, unfortunately without clear results.

On two more PC's, I installed PM 27.4.2 x86 and let it run without installing any add-ons. The PC's were mostly idle. No problems occured.

Still, there are the two PC's I regularly use, which are always busy, RAM and CPU quite utilized all the time (e.g. by BOINC). On both, Pale Moon regularly runs into this lock. On one of them I already switched to the x64 build (used x86 before). Starts CPU hogging overnight.

The other is even stranger... here it often happens that if I download a lot of images from a server which has some limitations (bandwidth and connection throttling) and does not complete a download reliably, the downloads of some selected images get stuck eternally; in the browser native download manager, I can interrupt the download; then I can restart it; and then I can't do anything, the download for this file does not resume, I cannot click the stop button anymore, all I can do is quit Pale Moon, which asks me if I want to cancel X downloads. After restarting, I can restart the downloads, which usually works successfully. But as this may be a different issue, I will test it again after re-installing and open a new report if it still happens. Both issues do not happen for Firefox installed in parallel on the same PC. And this Firefox has a lot of add-ons installed as well.
Fun and success!

Locked