Closed Bug 13640 Opened 25 years ago Closed 25 years ago

MLK:8496 bytes leaked - XML parser?

Categories

(Core :: XML, defect, P1)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: bruce, Assigned: harishd)

References

Details

(Whiteboard: 2/21: 2nd request for verification from reporter or assigned eng.)

Attachments

(1 file)

Current build on Solaris.

Is it possible that this is a shadow of a leak of a docloader or a file channel
from necko?

MLK: 8496 bytes leaked in 59 blocks
  * This memory was allocated from:
        malloc         [rtlib.o]
        __bUiLtIn_nEw  [libraptorgfx.so]
        __builtin_new  [rtlib.o]
        CTokenRecycler::CreateTokenOfType(eHTMLTokenTypes,nsHTMLTag)
[nsDTDUtils.cpp:538]
        nsExpatTokenizer::HandleStartElement(void*,const char*,const char**)
[nsExpatTokenizer.cpp:365]
        doContent      [xmlparse.c:1386]
        contentProcessor [xmlparse.c:1043]
        doProlog       [xmlparse.c:2287]
        prologProcessor [xmlparse.c:2145]
        prologInitProcessor [xmlparse.c:2134]
        XML_Parse      [xmlparse.c:867]
        nsExpatTokenizer::ParseXMLBuffer(const char*,unsigned int,int)
[nsExpatTokenizer.cpp:286]
        nsExpatTokenizer::ConsumeToken(nsScanner&) [nsExpatTokenizer.cpp:329]
        nsParser::Tokenize(int) [nsParser.cpp:1395]
        nsParser::ResumeParse(nsIDTD*,int) [nsParser.cpp:886]

nsParser::OnDataAvailable(nsIChannel*,nsISupports*,nsIInputStream*,unsigned
int,unsigned int) [nsParser.cpp:1288]

nsDocumentBindInfo::OnDataAvailable(nsIChannel*,nsISupports*,nsIInputStream*,uns
igned int,unsigned int) [nsDocLoader.cpp:2000]

nsChannelListener::OnDataAvailable(nsIChannel*,nsISupports*,nsIInputStream*,unsi
gned int,unsigned int) [nsDocLoader.cpp:2272]

nsFileChannel::OnDataAvailable(nsIChannel*,nsISupports*,nsIInputStream*,unsigned
int,unsigned int) [nsFileChannel.cpp:814]
        nsOnDataAvailableEvent::HandleEvent() [nsAsyncStreamListener.cpp:344]
        nsStreamListenerEvent::HandlePLEvent(PLEvent*)
[nsAsyncStreamListener.cpp:144]
        PL_HandleEvent [plevent.c:509]
        PL_ProcessPendingEvents [plevent.c:470]
        nsEventQueueImpl::ProcessPendingEvents() [nsEventQueue.cpp:118]
        event_processor_callback(void*,int,GdkInputCondition)
[nsAppShell.cpp:153]
        gdk_io_invoke  [gdkevents.c:868]
        g_io_unix_dispatch [giounix.c:131]
        g_main_dispatch [gmain.c:647]
        g_main_iterate [gmain.c:854]
        g_main_run     [gmain.c:912]
  * Block of 144 bytes (59 times); last block at 0x9ec178
Severity: major → critical
I'm seeing other stack traces like this coming out of the HTML parser as well I
believe.  See http://www.cybersight.com/~bruce/apprunner.1990912.visa.log for
more details.
Status: NEW → ASSIGNED
I've just started to take a look at this.  Bruce, just want you to know I am
considering this as a high priority task.
Target Milestone: M11
Hmm, I instrumented the constructors and destructors of tokens to print a
message to the console and loaded up the following XML file in viewer:
---
<?xml version="1.0"?>
<memleak>Purify tells us that we are leaking tokens</memleak>
---
Three tokens got created and then, when I exited viewer, three tokens got
destroyed.  So, I don't think tokens are getting leaked as the above Purify
report suggests.

The patch to instrument your build so that creation/destruction of tokens is
printed is attached.  It is not much use in apprunner because there's too much
noise from the tokens getting created/destroyed for the chrome.

Bruce, could you verify this on your latest build and report what you find?
Thanks.
Assignee: nisheeth → harishd
Status: ASSIGNED → NEW
Assigning this to Harish as this is definitely a generic parser thing, not
specific to XML.  Adding myself to the cc list.
This was still happening with a build from last night ... now that harishd owns
this bug, do I still need to try to run with those patches?
Yes, please run with those patches and see if tokens get leaked.  I ran today
morning's viewer build with the patch on an NT box and no token was leaked...
Priority: P3 → P1
I will not have the time to do this until sometime next week.  I highly
recommend obtaining either a copy of Purify for NT or learning how to build on
one of your many Solaris machines equipped with Purify.
Whiteboard: Need feedback from the reporter.
I don't see the leak anymore [ checked with sept. 20th build ]. Bruce, do you
have a test case that can reporduce this leak? Thanx.

FYI: Saw the leak on Friday's (Sept. 17) build.
Summary: MLK: XML parser? → MLK:8496 bytes leaked - XML parser?
Blocks: 14516
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
MLK's are taken care of.  Bruce could you please verify this? Thanx

Marking bug FIXED.
Whiteboard: Need feedback from the reporter. → 11/16: requested verification from reporter or assigned eng.
Could reporter or assigned engineer please verify this as fixed? I do not have
sufficient resources to do so. Thanks
Request verification from reporter or assigned engineer - thanks!
Whiteboard: 11/16: requested verification from reporter or assigned eng. → 2/21: 2nd request for verification from reporter or assigned eng.
I ran Purify this weekend and I don't think that I was seeing these leaks.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: