MozillaZine

Firefox's management of processes and threads

Discussion of general topics about Mozilla Firefox
satyr

User avatar
 
Posts: 312
Joined: July 13th, 2004, 2:00 pm
Location: Ljubljana, Slovenia, Europe

Post Posted August 5th, 2004, 6:23 pm

Just wondering, I noticed when you launch Firefox's executable (directly, for instance double-clicking on firefox.exe, or with shortcut pointing to it), Firefox creates new process only for a second (or so), and then it is closed, and that new window is somehow "injected" into existing process (not as new thread with window's caption text as in IE's case, but invisible, till you focus on it, see below)

Note, I do not mean launched from some other already opened Firefox instance (window or tab), but from some file manager or shell, cause again, if you execute it from "inside" some already opened Firefox's instance (window or tab), only new thread is created, no process creation visible (even temporary, 1-2 seconds long, as in the other case above).



I trully miss this "option" from IE, since in case of browser crash, not all instances would be terminated), cause in case of IE, if you executed new instance from inside one IE window, new thread was created in that particular process, so each IE window was one thread with text from IE caption inside, or better part of that process.

But if you executed process from its shortcut or directly from its directory, with iexplore.exe executable, then new process was created (and not just thread).


In Firefox's case (at least in my case), there is always only one process with only one thread showing text (in windows title) and only from that window (instance) that has currently focus on it, nomather if open it from existing Firefox window, or if you open it "fresh" as mentioned with shortcut, or original executable.


But maybe there are other resons for Firefox to not run on "thread level" in matter of process creation.




Mentioned already in an outdated topic I opened here on mozzilaZine (actually the first one):

User Support -- Mozilla Firefox Support

First few hours using Firefox, uhhhh ...


All this also mentioned here on Wildersecurity forum, my nick is stalker there:

Wilders Security Forums -- Other Security Issues -- other security issues

part 1: What is really sensible in terms of PC security?
part 2: What is really sensible in terms of PC security?
If you want to, please check out my site: tadej-ivan.50webs.com, and enjoy reading my computing-related discoveries, hints, principles, and rules.

scratch

User avatar
 
Posts: 4942
Joined: November 6th, 2002, 1:27 am
Location: Massachusetts

Post Posted August 5th, 2004, 9:25 pm

your english isn't very good so i'm not sure i understand the question. are you asking why you see the extra process spawn with firefox but not with ie? if so, it's because firefox takes longer to load. they both spawn a new process, the IE one just starts and finishes before you notice it. if you're asking why it doesn't keep running in multiple processes, it's because that uses more memory and risks profile corruption.

mwmgs_ca
 
Posts: 157
Joined: November 8th, 2002, 2:00 pm

Post Posted August 5th, 2004, 9:42 pm

I think he's asking both questions that you just answered.

padlon
 
Posts: 4
Joined: July 12th, 2004, 3:56 am
Location: UK

Post Posted August 6th, 2004, 2:13 am

A related problem is the sharing of "session" between the seperately launched Firefox instances. In FF it doesn't seem to be possible to have multiple independent sessions with a single web site/application because all FF instances share the session cookie (whereas in IE each instance has an independent session and cookie).

If there's a way to configure FF to not share session please let me know (I couldn't find a startup switch).

satyr

User avatar
 
Posts: 312
Joined: July 13th, 2004, 2:00 pm
Location: Ljubljana, Slovenia, Europe

Post Posted August 6th, 2004, 8:23 pm

scratch wrote:they both spawn a new process, the IE one just starts and finishes before you notice it.




Not true, 100 % !!

... and I did audited it, just to be sure, and not posting bull-shit !!



It is the opposite actually. Appearantly you didn't understand that part of my question.


Please tell me, in which case IE "spawns" new process, and closes it ??


1. If you open new instance (window) of IE with "Open in new Window", only new thread is created. I tripple-checked it.

First - I saw no process creation with Procexp.exe, some very advanced "process viewer" from Mark Russinovich Sysinternals's home page with bunch of useful utilities:

www.sysinternals.com

Second - I heard no sound, like I always do on process opening, cause I have set my system to play some not annoying and quite quiet sound on process creation and closure to really know what's going on in the background

And finally - I didn't see process creation with also Sysinternals's Tokenmon.exe, app that monitors impersonation, process creation/exit, logon/logoff, privileges, etc., on a token object level), so I am preety sure, there is NO process creation in this case.


In case of Firefox, as I wrote in previous post only new thread is created, note: in this case, there is no process creation, like you thought, I meant.




2. On the other hand, if you execute IE from some file manager, shell, with shortcut, or whatever other process not being IE, NEW process is created and KEEPS running.

That is the advantage. If you have, let say four instances, each with four windows (i.e. threads running in that process), and one of them starts misbehaving and you need to terminate it (or OS automaticly debbugs it) you still have 3/4 of pages opened.


In Firefox's case, if you execute it from some file manager, shell, or whatever other process not being Firefox, then, and only in this case that half-second process creation occur. Then, as I said that window continue to run as thread in the one and only Firefox process. And if something goes wrong, all windows are "lots".





scratch wrote:if you're asking why it doesn't keep running in multiple processes, it's because that uses more memory and risks profile corruption.



Ahh, it is profile corruption danger. Anyway, Firefox starts misbehaving very rarely, so there's no panic.



Hope you understand what I meant. If you not belive me, check with your monitoring tools (or whatever you use, to be so sure about IE process: " they both spawn a new process, the IE one just starts and finishes before you notice it"
Last edited by satyr on August 6th, 2004, 11:03 pm, edited 3 times in total.
If you want to, please check out my site: tadej-ivan.50webs.com, and enjoy reading my computing-related discoveries, hints, principles, and rules.

satyr

User avatar
 
Posts: 312
Joined: July 13th, 2004, 2:00 pm
Location: Ljubljana, Slovenia, Europe

Post Posted August 6th, 2004, 8:39 pm

padlon wrote:If there's a way to configure FF to not share session please let me know (I couldn't find a startup switch).



AFAIK there is no switch for that. As I saw browsing Mozilla related pages, that Firefox especially (honestly, I do not know for other "branches") was more or less loosing its switches during stages of its development. Many that listed here, for example not working anymore.

http://www.mozilla.org/docs/command-line-args.html


Here you can see most of them (only Firefox's) are related only to extensions, particulary installation, etc., so basic stuff.

http://mozilla.org/projects/firefox/ext ... tions.html




P.S., And I only use commandline for two of my profiles, java console (to start it directly from my shell's menu), and played around with making set-ups for different URLs to start, etc. though, if there is some updated list out there, I would be glad, if someone could inform me. I am always interested when things some to commandline/batch processing. Well, I am kind of obsessed with it. lol



Cheers
If you want to, please check out my site: tadej-ivan.50webs.com, and enjoy reading my computing-related discoveries, hints, principles, and rules.

scratch

User avatar
 
Posts: 4942
Joined: November 6th, 2002, 1:27 am
Location: Massachusetts

Post Posted August 6th, 2004, 9:51 pm

i suppose i did misunderstand, partially at least. i knew IE didn't create a new process for open in new window, and that wasn't what i meant to imply. what i meant was, at least on my box, when i re-launch IE from file manager, it spawns a new process momentarily which sends the URL to the old process and then terminates.

satyr

User avatar
 
Posts: 312
Joined: July 13th, 2004, 2:00 pm
Location: Ljubljana, Slovenia, Europe

Post Posted August 7th, 2004, 12:29 am

scratch wrote:i suppose i did misunderstand, partially at least. i knew IE didn't create a new process for open in new window, and that wasn't what i meant to imply. what i meant was, at least on my box, when i re-launch IE from file manager, it spawns a new process momentarily which sends the URL to the old process and then terminates.



So, you are saying, you haven't ever seen more than one process of IE running at the same time ??


Well, strange, cause it was you, who wrote:

scratch wrote:if you're asking why it doesn't keep running in multiple processes, it's because that uses more memory and risks profile corruption.



... so from this sentence, I would assume, you know for IE running with more than one process, but saying/applying, this would use "more memory and risks profile corruption" in Firefox.



Anyway thanks for keeping to reply (at all) ...
If you want to, please check out my site: tadej-ivan.50webs.com, and enjoy reading my computing-related discoveries, hints, principles, and rules.

Mook
 
Posts: 1752
Joined: November 7th, 2002, 9:35 pm

Post Posted August 7th, 2004, 12:38 am

If you would like Firefox to use separate processes, set MOZ_NO_REMOTE to 1 as an environment variable. Note that this means you'll need a different profile, per process. This is the reason why Firefox just tells the existing copy to make a new window instead - the code isn't good at dealing with more than one process accessing the same profile.

<abbr title="as far as I know">AFAIK</a>, anyway.
poot.

satyr

User avatar
 
Posts: 312
Joined: July 13th, 2004, 2:00 pm
Location: Ljubljana, Slovenia, Europe

Post Posted August 7th, 2004, 1:19 am

Thanks for hint Mook, just please, also tell me if I understand you right ...


You mean to add new env. variable named MOZ_NO_REMOTE, with value 1, and then being able to execute two (or more ??) processes, each using separate (different) profile ??



Thanks again in advance !!
If you want to, please check out my site: tadej-ivan.50webs.com, and enjoy reading my computing-related discoveries, hints, principles, and rules.

scratch

User avatar
 
Posts: 4942
Joined: November 6th, 2002, 1:27 am
Location: Massachusetts

Post Posted August 7th, 2004, 3:02 am

satyr wrote:So, you are saying, you haven't ever seen more than one process of IE running at the same time ??

not more than momentarily. at any given time, I have just one iexplore process running no matter how many times i spawn the program.

Well, strange, cause it was you, who wrote:

scratch wrote:if you're asking why it doesn't keep running in multiple processes, it's because that uses more memory and risks profile corruption.


... so from this sentence, I would assume, you know for IE running with more than one process, but saying/applying, this would use "more memory and risks profile corruption" in Firefox.

i was speaking of firefox, not IE. multiple processes of any app uses more memory, and it is possible to run more than one process of firefox but you need to have a different profile for each process due to the profile danger.

Mook
 
Posts: 1752
Joined: November 7th, 2002, 9:35 pm

Post Posted August 7th, 2004, 9:05 am

satyr:
That is right.

scratch:
Hmm, I get multiple IE processes. I think it's a pref somewhere that's off by default, but I can't seem to find it. Doesn't matter that much, though.
poot.

satyr

User avatar
 
Posts: 312
Joined: July 13th, 2004, 2:00 pm
Location: Ljubljana, Slovenia, Europe

Post Posted August 7th, 2004, 4:45 pm

Mook wrote:satyr:
That is right.


Thanks again.



Mook wrote:scratch:
Hmm, I get multiple IE processes. I think it's a pref somewhere that's off by default, but I can't seem to find it. Doesn't matter that much, though.


Well as I said, from my point of view it is usefull to run with, let say 3 processes, because on application crash, you do not loose all browser's windows opened, cause only one process is terminated, and there is no way one process could lead also other processes to crash (same program's processes, like one firefox.exe processes causing the other firefox.exe to crash, or other processes).

Well maybe it could lead to, but only on some rare occasions, like IPC related crashes, or global failures, but those are usually caused by system processes, services, etc.



Cheers all ...
If you want to, please check out my site: tadej-ivan.50webs.com, and enjoy reading my computing-related discoveries, hints, principles, and rules.

tamarack.dat
 
Posts: 5
Joined: July 14th, 2004, 6:06 pm
Location: c:\linux\etc\pcmcia\cis\

Post Posted August 7th, 2004, 10:56 pm

satyr wrote:Well as I said, from my point of view it is usefull to run with, let say 3 processes, because on application crash, you do not loose all browser's windows opened, cause only one process is terminated, and there is no way one process could lead also other processes to crash (same program's processes, like one firefox.exe processes causing the other firefox.exe to crash, or other processes).





Well, I can say, I agree with that part ...

Sudhakar_Koundinya
 
Posts: 2
Joined: March 21st, 2006, 11:09 am

Post Posted March 21st, 2006, 11:12 am

Hi there,

I am not understanding why below scenarios are failing when we are trying to access the site http://www.jiyamarket.com


1. In internet explorer (6.0 - Service Pack2) when cookies are disabled I am not able to login to the site. Until now I am in perception that this is problem with the old browsers and now new browsers are able to manage the session though we disable the cookie settings in browser. But strangely this is not happening in I.E 6.0. I haven't tested with other versions of I.E as we don't have those versions.

2. One more strange problem what I am seeing with I.E is I have opened two different windows (Not using CTRL+n short cut or file->open new window options). Here cookies are enabled.

In one window I have logged in to the site and in second window when I try to access this url http://www.jiyamarket.com it is redirecting directly to the personal home page of the site. I am surprised because as I have two new windows opened , logically I can say I have two session instances. But I do not understand why browser is maintaining session of first window to the second window also. And FYI, this is not happening in all I.E browsers. So when tested the settings and versions all the browsers have same configurations.

So these two issues has become serious problems for us as session handling is not consistent because of browsers.

Application is deployed on Tomcat 4.x version.

After doing so many web based application also, because of these two issues - now I am not understanding whether it is problem of browsers or servers?

So could you please help me on these issues?

Thanks
Sudhakar

Return to Firefox General


Who is online

Users browsing this forum: No registered users and 4 guests