Can't recover from JS loops

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

Can't recover from JS loops

Unread post by AgentOrange » 2020-12-02, 21:52

On Pale Moon 28.16.0 (official 64-bit build) on Fedora 32, I accidentally clicked "Debug script" instead of "Stop Script" on this page, and bricked the browser when trying to close the debugger (it consumed 100% of 1 core for over 40 minutes as I did other tasks, stuck as pictured in the attached screenshot.)

Since this browser plans to keep the UI thread married to the JS thread indefinitely, could there at least be more frequent hang-check interrupts?
Attachments
Screenshot from 2020-12-02 14-47-03.png

AgentOrange

Re: Can't recover from JS loops

Unread post by AgentOrange » 2020-12-02, 21:53

(Granted, this is less of an issue now that UBO supports blocking JS per-domain, but it still seems like a bug per se…)

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

Re: Can't recover from JS loops

Unread post by Moonchild » 2020-12-02, 22:43

AgentOrange wrote:
2020-12-02, 21:52
Since this browser plans to keep the UI thread married to the JS thread indefinitely
Not sure where you are getting this information but that's not how things work internally. You probably mean that we won't be spawning separate program processes for web content (that can hang up just as hard, by the way) that you -might- be able to kill from a UI process, if you're lucky.
AgentOrange wrote:
2020-12-02, 21:52
could there at least be more frequent hang-check interrupts?
Some types of hangs are very hard to catch with a check, e.g. recursion issues. The main problem though is that you didn't stop the script but rather tried to feed whatever misbehaving script caused this into the JS debugger of devtools, which is in itself JS-driven, too. Depending on the type of hang, it may just go over the edge and never recover, as you've noticed, if the script that's hanging is not in a sane execution state.
"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

Locked