Closed Bug 208127 Opened 22 years ago Closed 22 years ago

nsXMLHttpRequest() Crash after 501 calls to PushThreadEventQueue

Categories

(Core :: XPCOM, defect)

All
Linux
defect
Not set
critical

Tracking

()

RESOLVED DUPLICATE of bug 206947

People

(Reporter: narayanan.govindaraju, Assigned: pete)

References

()

Details

(Keywords: crash)

Attachments

(8 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826 Build Identifier: Mozilla/5.0 (X11; U;Linux i686; en-US; rv:1.2.1) Gecko/20030404 <script language="JavaScript" type="text/JavaScript"> var xmlbase; xmlbase = new XMLHttpRequest(); xmlbase.open("GET","xyz.xml",false); xmlbase.send(null); xmlbase=null; delete xmlbase; </script> Memory is not released evenafter unloading this page and loading new page. Reproducible: Always Steps to Reproduce: 1. create a web page with XMLHttpRequest() as follows var xmlbase; xmlbase = new XMLHttpRequest(); xmlbase.open("GET","xyz.xml",false); xmlbase.send(null); xmlbase=null; delete xmlbase; 2. set this page to auto refresh to simple page(image only) in 10 sec. 3. That simple page auto refresh back to this page in 10 sec (that is two page slide show one with XMLHttpRequest() and another simple page) 4. load the page 1 in Mozilla Actual Results: Watch out the memory usage. Every time it loads the page with XMLHttpRequest() memory usage piles up. Expected Results: Whenever it unloads a page memory should be released Latest release also have this problem
Attached file Page 2 (Simple Page)
Attached file XML File
Attached file XML File
I don't see XMLHttpRequest leaking. After waiting for 3 reloads of each of the document I shut Mozilla down and these are the reported leaks: == BloatView: ALL (cumulative) LEAK STATISTICS |<----------------Class--------------->|<-----Bytes------>|<----------------Objects---------------->|<--------------References-------------->| Per-Inst Leaked Total Rem Mean StdDev Total Rem Mean StdDev 0 TOTAL 47 336 306057 6 ( 757.68 +/- 1148.19) 2381086 3 ( 1194.46 +/- 2026.84) nsTraceRefcnt::DumpStatistics: 600 entries 99 XPCNativeScriptableShared 76 76 547 1 ( 20.85 +/- 6.42) 0 0 ( 0.00 +/- 0.00) 102 XPCWrappedNative 52 52 1864 1 ( 492.16 +/- 266.31) 36711 1 ( 826.01 +/- 341.96) 331 nsHashtable 44 88 745 2 ( 313.97 +/- 175.47) 0 0 ( 0.00 +/- 0.00) 382 nsMemoryImpl 72 72 2 1 ( 1.33 +/- 0.58) 36 1 ( 5.97 +/- 1.51) 565 nsXPCComponents 48 48 26 1 ( 7.65 +/- 3.15) 935 1 ( 26.60 +/- 5.98) Until you can show XMLHttpRequest really is leaking I am marking this worksforme.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
Summary: XMLHttpRequest() does not free memory even after unloading that page → XMLHttpRequest() does not free memory even after unloading that page
*** Bug 208138 has been marked as a duplicate of this bug. ***
It is not the problem of releasing the memory during browser shutdown. It is releasing the memory when moving to new page. Let these 2 page run for some time and watch the memory free. Whenever XMLHttprequest page is loaded memory usage getting piled up. If it not because of XMLHttprequest, can we assigned to JavaScript engine or other component, which is not releasing the memory when it goes to next page.
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
Component: XML → JavaScript Engine
This is a threading issue. Changing component to XPCOM.
Assignee: heikki → petejc
Component: JavaScript Engine → XPCOM
Attached file updated page2.html
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Keywords: crash
Summary: XMLHttpRequest() does not free memory even after unloading that page → Crash after 501 calls to PushThreadEventQueue
Steps to reproduce crash: - Place attachment (127746), (127747), (127748) on a web server. - Patch nsXMLHttpRequest.cpp w/ attachment (127749) - recompile extensions/xmlextras module - Load page1.html into browser - let refresh run until it crashes. - Crash will happen after exactly 501 calls to PushThreadEventQueue http://lxr.mozilla.org/seamonkey/source/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp#1282 I'm looking into this now. It appears that 501 might be a magic recursion blocking number? Any comments?
Summary: Crash after 501 calls to PushThreadEventQueue → nsXMLHttpRequest() Crash after 501 calls to PushThreadEventQueue
this looks like bug 206947
*** This bug has been marked as a duplicate of 206947 ***
Status: ASSIGNED → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: