Background thread hang after infinite-scrolling a long way on twitter.com

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.
Funkster

Background thread hang after infinite-scrolling a long way on twitter.com

Unread post by Funkster » 2017-10-18, 15:46

Hi folks,

I've put this under windows (10, 64bit) but it affects the Linux build also (Fedora 24 32 & 64 bit).

If I go on twitter.com and keep infinite-scrolling / loading new tweets for a while, eventually some background part of PM will get stuck in a loop (one CPU core goes to 100%) and every window (including the check-for-updates downloader) loses the ability to transfer data.

Sometimes closing the window with Twitter in might make it come back to life, but usually it's a kill-process job to get it back. I've seen PM carry on running with the same one-core-pegged even after closing all windows, and it required a kill -9 to stop it.

Anyone else seen this? It's a fairly recent behaviour, maybe the last couple of months.

EDIT to add: PM 27.5.1, 27.5.0 and the release before that all definitely affected, beyond that I don't trust my memory.

Funkster

Re: Background thread hang after infinite-scrolling a long way on twitter.com

Unread post by Funkster » 2018-04-12, 16:05

Just a quick bump to say that this is still an issue on PM 27.8.3, in fact it seems to be more sensitive now.

Disclaimer: I'm a bit tab-happy, have 100 of them open across a few windows.

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

Re: Background thread hang after infinite-scrolling a long way on twitter.com

Unread post by Moonchild » 2018-04-12, 19:57

You're likely hitting a JavaScript garbage collection loop. Unfortunately there is no easy way to predict or combat this situation.
"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

Funkster

Re: Background thread hang after infinite-scrolling a long way on twitter.com

Unread post by Funkster » 2018-04-17, 12:12

Surely it's a bug somewhere that it sticks forever, though? There's surely not an infinite amount of garbage to collect...

joe04

Re: Background thread hang after infinite-scrolling a long way on twitter.com

Unread post by joe04 » 2018-04-17, 15:03

Funkster wrote:Hi folks,

If I go on twitter.com and keep infinite-scrolling / loading new tweets for a while, eventually some background part of PM will get stuck in a loop (one CPU core goes to 100%) and every window (including the check-for-updates downloader) loses the ability to transfer data.

Sometimes closing the window with Twitter in might make it come back to life, but usually it's a kill-process job to get it back. I've seen PM carry on running with the same one-core-pegged even after closing all windows, and it required a kill -9 to stop it.
How long did you let Pale Moon churn with a pegged CPU? (Was it 20 seconds, 2 mintues, etc?)

Funkster

Re: Background thread hang after infinite-scrolling a long way on twitter.com

Unread post by Funkster » 2018-04-17, 16:26

Hokay, I've just managed to trigger it twice, both times pressing the play button on a "GIF" (scare quotes because it's no doubt not an actual .gif) in the timeline.

First time, it freed up and loaded the GIF after ~2 minutes.

I loaded some more tweets for a bit, then pressed play on another GIF. This time it stayed stuck (GIF gives spinning load indicator, other windows lose ability to transfer data) for 15 minutes, at which point I closed the window showing twitter.com. CPU stayed pegged for a further 8 minutes, and then it managed to finish what it was doing and everything came back to life.

In the second case, pale moon was using ~3GiB RAM at the point where it got stuck, which stayed steady for a while (let's say 10 minutes) before climbing to ~4.2GiB, and then started falling shortly before it came back to life, landing back at ~2.4GiB.

joe04

Re: Background thread hang after infinite-scrolling a long way on twitter.com

Unread post by joe04 » 2018-04-17, 19:46

That's good you're able to characterize it in detail.

What extensions are you using?

To rule out extensions, try reproducing it in Safe Mode. (If it's a browser garbage collection issue then probably won't make a difference.)

Funkster

Re: Background thread hang after infinite-scrolling a long way on twitter.com

Unread post by Funkster » 2018-04-18, 08:08

Extensions:
- Adblock Latitude 5.0.1
- Noscript 5.0.6
- Session Manager 0.8.1.7

Plugins: none

To be honest, opening the same number of pages without any adblock and script blocking just isn't going to happen. Hanging threads is better than seeing ads.

User avatar
adesh
Board Warrior
Board Warrior
Posts: 1277
Joined: 2017-06-06, 07:38

Re: Background thread hang after infinite-scrolling a long way on twitter.com

Unread post by adesh » 2018-04-18, 17:02

At least you can leave ad-blocker and start with disabling NoScript and Session Manager. Probably, that'd give a hint.

Locked