htop as root shows gazillion entries - is this a problem? Topic is solved

Support and discussions for the x86/x64 Linux version of Pale Moon.

Moderators: trava90, satrow

Lew Rockwell Fan
Fanatic
Fanatic
Posts: 140
Joined: Wed, 14 Jun 2017, 15:20

htop as root shows gazillion entries - is this a problem?

Unread postby Lew Rockwell Fan » Wed, 04 Jul 2018, 20:03

I was trying to find what was periodically causing my trackball pointer to bog down and sometimes crash. And I ran htop as root and ordered by the command column. Seeing a whole lot of palemoon, I filtered for them, then stretched out the window repeatedly until I finally gave up on seeing them all. See the attached screenshot. I had 2 palemoon windows open when this ran. 1 each of 2 profiles. Each window had 2 tabs. "ps --wweo | grep palemoon |grep -v grep" doesn't show any problem. My pointer was working fine at that moment. Does this large number of htop entries indicate a problem?
htop_as_root_filered_for_palemoon.png

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 22409
Joined: Sun, 28 Aug 2011, 17:27
Location: 58.5°N 15.5°E
Contact:

Re: htop as root shows gazillion entries - is this a problem?  Topic is solved

Unread postby Moonchild » Wed, 04 Jul 2018, 21:53

I'm not sure why you're starting Pale Moon with both --Profilemanager and --new-instance flags at the same time. The risk in doing that is that you may be creating a new hidden window/new process every time you use a URL association, causing your long list of processes.
I'd say this is a problem; but it'd be a problem of how the browser is started, not a problem with the browser itself.
Last edited by Moonchild on Thu, 05 Jul 2018, 08:38, edited 1 time in total.
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.

"If you want to build a better world for yourself, you have to be willing to build one for everybody." -- Coyote Osborne

Lew Rockwell Fan
Fanatic
Fanatic
Posts: 140
Joined: Wed, 14 Jun 2017, 15:20

Re: htop as root shows gazillion entries - is this a problem?

Unread postby Lew Rockwell Fan » Thu, 05 Jul 2018, 01:13

Thanks.
Moonchild wrote:I'm not sure why you're starting Pale Moon with both --Profilemanager and --new-instance flags at the same time.
Because if I already have one instance running and I run

Code: Select all

palemoon --ProfileManager
it just doesn't bring up the gui choice dialog. Instead it just opens another window with the same profile. What I"m trying to get it to do is let me choose the profile and then start a new instance in a new window.

Moonchild wrote:The risk in doing that is that you may be creating a new hidden window/new process every time you use a URL association, causing your long listed of processes. I'd say this is a problem; but it'd be a problem of how the browser is started . . .
OK. That'ss he main thing. I'm probably on the right track figuring out the pointer problem then. I can figure out another way to start PM. I can script a choose profile dohickus that bypasses the need to use the profiile manager or just hardcode separate menu entries for each profile.

Walter Dnes
Astronaut
Astronaut
Posts: 569
Joined: Thu, 30 Jul 2015, 20:29
Location: Vaughan, ON, Canada

Re: htop as root shows gazillion entries - is this a problem?

Unread postby Walter Dnes » Thu, 05 Jul 2018, 07:49

Lew Rockwell Fan wrote: I can script a choose profile dohickus that bypasses the need to use the profiile manager or just hardcode separate menu entries for each profile.

That's what I do... with approximately 20 profiles.
There's a right way
There's a wrong way
And then there's my way

User avatar
therube
Astronaut
Astronaut
Posts: 676
Joined: Fri, 08 Jun 2018, 17:02

Re: htop as root shows gazillion entries - is this a problem?

Unread postby therube » Thu, 05 Jul 2018, 11:09

If all you're wanting to do is to be able to open multiple simultaneous instances of PM, then I think you should be using the -no-remote switch (rather then -new-instance).

If you want to do the same, while at the same time with the ability to be able to direct which instance is used to open a "link" (say from Thunderbird, or from the command line), then I believe -new-instance is appropriate. (Note: -new-instance does not apply to Windows.)

Once you have opened your (say, two) -new-instance instances, "calls" to open links in a particular instance should use the -remote switch (in conjunction with the -P switch to specify the wanted Profile) & not the -new-instance switch.

Lew Rockwell Fan
Fanatic
Fanatic
Posts: 140
Joined: Wed, 14 Jun 2017, 15:20

Re: htop as root shows gazillion entries - is this a problem?

Unread postby Lew Rockwell Fan » Fri, 13 Jul 2018, 16:03

Update:
1.
therube wrote:If all you're wanting to do is to be able to open multiple simultaneous instances of PM, then I think you should be using the -no-remote switch (rather then -new-instance).
Thanks. That's interesting & may have some bearing on scripts (dealing with links under various circumstances) I may do in the future, but it doesn't seem to have any bearing on the present matter.

Code: Select all

palemoon -P profilename --new-instance
works just fine. I've been testing & that isn't the source of any of the problems I've mentioned, or any others that I can see.

2.
I've determined that the mouse problem is definitely caused by my old PM profile. Probably one of the extensions, but I haven't isolated it yet. Whatever it is will bog the mouse (actually trackball) driver down until it is so slow as to be useless, and sometimes it crashes altogether so that the pointer disappears and nothing done with the trackball, including buttons, ball, and wheel has any effect at all. Once it gets to that point it can't be recovered with anything I've tried short of rebooting. Even logging out, and restarting X doesn't do it. It's not just a "hasn't happened to happen yet" thing. I use the old profile, my trackball soon quits working correctly. The new profile, no problem.

3.
Multiple htop lines, the actual title subject, appears to be a red herring. My fresh profile works fine & doesn't cause any trackball problems, but it also causes a plethora of palemoon lines in htop. I've used it long enough now to be totally confident in those assertions.

I haven't found an easy way to quantify this, short of stretching out the window repeatedly and then counting the lines. As I stated in the OP

Code: Select all

ps --wweo | grep palemoon |grep -v grep
doesn't show any problem, so I'm not sure what to make of that. It may have to do with "threads" rather than processes which is a subject I haven't studied.

Whatever it is, since it doesn't seem to be related to the trackball problem, figuring it out is now a lower priority for me than tracking down what extension or setting in my old profile kills my trackball. I may figure that out by restoring the same extensions and settings, a few at a time, until I break this profile the same way. Or not. At any rate, the present profile, which I back up every time I change anything, works.

After I track down the trackball killer, or give up on it, I may return to figuring out the odd htop report and the difference between what htop and ps show. I might even try the profile manager again. But for now those are more matters of curiosity than a practical issues.

Toa-Nuva
Fanatic
Fanatic
Posts: 179
Joined: Thu, 04 Jun 2015, 18:12

Re: htop as root shows gazillion entries - is this a problem?

Unread postby Toa-Nuva » Fri, 13 Jul 2018, 19:00

By default, htop does indeed display threads and not just processes. In your htop screenshot, most entries show exactly the same memory usage, which means they probably belong to the same few processes. You can setup htop to only display processes by going to "Setup" > "Display options" and selecting "Hide kernel threads" and "Hide userland process threads".

Lew Rockwell Fan
Fanatic
Fanatic
Posts: 140
Joined: Wed, 14 Jun 2017, 15:20

Re: htop as root shows gazillion entries - is this a problem?

Unread postby Lew Rockwell Fan » Tue, 24 Jul 2018, 23:55

Toa-Nuva wrote:By default, htop does indeed display threads and not just processes. In your htop screenshot, most entries show exactly the same memory usage, which means they probably belong to the same few processes. You can setup htop to only display processes by going to "Setup" > "Display options" and selecting "Hide kernel threads" and "Hide userland process threads".
Thanks. In that case htop would be equivalent to ps? I presume the thread view still represents some kind of potentially limiting resource. Otherwise, why is it useful? These questions aren't crucial to the issue I was having. I'm just curious, if you feel like furthering my education.

Anyway, an update:
Turns out 2 things have to be going on for this problem to manifest.
1. I have to be running the problematic profile
2. I have to be running a script I was running in the background. I've inserted "exit" on a the line following the shebang and I can run either profile with no problem. The script gets called every 2 minutes and does several things that are unrelated beyond the fact that it seemed desirable to do them in the background frequently. When I uncomment the exit command, the new profile works but the old one causes the problem.

Next, I'll probably try running that script in a terminal or logging it's output. When I find out something more specific, I'll post it.


Return to “Pale Moon for Linux”

Who is online

Users browsing this forum: No registered users and 8 guests