Closed Bug 240827 Opened 20 years ago Closed 20 years ago

PL_DestroyEventQueue never called: (pipe) file descriptors are leaked

Categories

(Core :: XPCOM, defect)

x86
Neutrino
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: amardare, Assigned: amardare)

Details

User-Agent:       Mozilla/5.0 (Photon; U; QNX x86pc; en-US; rv:1.6) Gecko/20040329 Firefox/0.8
Build Identifier: Mozilla/5.0 (Photon; U; QNX x86pc; en-US; rv:1.6) Gecko/20040329 Firefox/0.8

On our system ( qnx ) I can see what file descriptors each process has. I
noticed that xpcom leaks 2 file descriptors ( opened using "pipe" in
_pl_SetupNativeNotifier in file xpcom/threads/plevent.c ), every time a modal
dialog is displayed.

Example: type a non existent url in the title bar, hit enter.A dialog pops up
saying that the url you entered was not found. Close the dialog. In this moment
2 file descriptors have been leaked.

The cleanup code ( PL_DestroyEventQueue, same file ) is never called.
Can someone please verify it on another system ( preferably on linux ).

Reproducible: Always
Steps to Reproduce:
1.Type a nonexistent URL in the url bar: http://www.blah.blah
2.A dialog pops up saying that the url you entered was not found. Close the dialog.
3.In this moment 2 file descriptors have been leaked.
Hi all,
Can I get an "yes it is broken under linux too" or "no it's only broken on your
os" ?
I don't have a linux box to check it out myself.
Thanks.
I'm not seeing the file descriptor leak on linux (trunk and 1.6).  In
/proc/xxxx/fd, I see two pipe FD when the dialog is there, and they go away when
I close the dialog.

It's possible an nsEventQueue is getting leaked.  You can use Mozilla's refcount
logging in a debug build to track XPCOM objects.  There's info here:
http://www.mozilla.org/performance/refcnt-balancer.html
http://www.mozilla.org/performance/leak-tutorial.html
I got a linux box, I confirm that this happens only on our os.
Strange, xpcom seems to function correct in all other cases.
Status: NEW → ASSIGNED
Assignee: dougt → amardare
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
Fixed the fd( pipe ) leakeage related to event queues, due to improper handling
in nsAppShell for our platform.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
If this only happened on one machine, and nothing in Mozilla was fixed, then it
should be:

->WORKSFORME
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → WORKSFORME
jason: please check bonsai before presuming that there wasn't a fix.

2004-05-05 08:39 	open 	amardare%qnx.com 	mozilla/widget/src
photon 	nsAppShell.cpp nsAppShell.h nsFilePicker.cpp nsFilePicker.h
nsSound.cpp 	+7/-115 	Changes for qnx/photon platform only. They should not
affect building/runtime other platforms.

Bug 240827
Fixed the fd( pipe ) leakeage related to event queues, due to improper handling
in nsAppShell for our platform.

Also changes for nsFilePicker and nsSound due to changes to nsIFilePicker, nsISound.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Status: REOPENED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → FIXED
Please reference such fixes in b.m.o. - otherwise tracking this sort of thing
becomes quite difficult.
You need to log in before you can comment on or make changes to this bug.