nazgul@alfalfa.COM (Kee Hinckley) (03/14/91)
On and off I have seen people mention things like this on the Motif list, but I've never seen anyone able to nail it down. I'm going to briefly describe the symptoms and I'd like to hear if anyone has any ideas what might be going on. We have an application that creates and destroys widgets on a common basis. A typical sequence involves the destruction and recreation of half a dozen text widgets, a table, a two scrolled windows and a couple paned windows. (Yes we should do a better job of cacheing, but anyway...) Occasionally we start seeing massive storage leaks, on the order of 200K a shot. 2K I could live with, but 200K is not going to cut it. I expect this sequence to occur hundreds of times a day! What we have seen. o It seems like Motif is installing a lot more translations when this happens. Looking at the Motif code I see several places where translations are installed (augmented) only if the widget currently has translations - otherwise it waits. So I suspect that for some reason it thinks that they do. Or maybe it has something to do with traversal - another place translations are installed. I really don't know, and we haven't had a chance to explore this avenue too far yet. o The leakage is dependant on the contents of the .Xdefaults/.Xresources file. But it isn't dependant on any particular resource, or even one that has anything to do with the application. We can cut the resource file in half, and use either half and we get no leakage. But if we use the whole file, it leaks. If we cut it down line by line at some point we cross a threshold and it stops. If we take the resource definition we just deleted and make it some bogus definition "foo.bar: asdf", it doesn't matter - we still get the leakage. All of this makes us suspect that there is some boundary condition in resource handling that causes something to be reallocated or something to change behavior - but we haven't been able to find it. Does anyone have the vaguest idea what might be going on here? Or how we might track it down? -kee
nazgul@alfalfa.COM (Kee Hinckley) (03/14/91)
----- Forwarded message follows -----
Received: by alfalfa.com ( 5.52 (84)/test)
id AA02182; Thu, 14 Mar 91 00:25:36 EST
Received: by BU.EDU (1.99) Thu, 14 Mar 91 00:24:44 EST
Date: Thu, 14 Mar 91 00:24:44 -0500
From: MAILER-DAEMON (Mail Delivery Subsystem)
Subject: Returned mail: Deferred: Bad file number
To: nazgul@alfalfa.com
cc:
----- Transcript of session follows -----
550 motif@alfafa.com... Host unknown
>>> MAIL From:<nazgul@alfalfa.com>
<<< 451 Nameserver timeout during parsing
----- Unsent message follows -----
Received: by BU.EDU (1.99) Thu, 14 Mar 91 00:24:44 EST
Received: by alfalfa.com ( 5.52 (84)/test)
id AA01983; Wed, 13 Mar 91 23:45:07 EST
Date: Wed, 13 Mar 91 23:45:07 EST
From: nazgul@alfalfa.com (Kee Hinckley)
Message-Id: <9103140445.AA01983@alfalfa.com>
To: motif-talk@osf.org, motif@alfafa.com, xpert@lcs.mit.edu
Subject: Translations, Resources and Storage Leaks
On and off I have seen people mention things like this on the Motif
list, but I've never seen anyone able to nail it down. I'm going
to briefly describe the symptoms and I'd like to hear if anyone
has any ideas what might be going on.
We have an application that creates and destroys widgets on a
common basis. A typical sequence involves the destruction and
recreation of half a dozen text widgets, a table, a two scrolled
windows and a couple paned windows. (Yes we should do a better
job of cacheing, but anyway...)
Occasionally we start seeing massive storage leaks, on the order
of 200K a shot. 2K I could live with, but 200K is not going to
cut it. I expect this sequence to occur hundreds of times a day!
What we have seen.
o It seems like Motif is installing a lot more translations when
this happens. Looking at the Motif code I see several places
where translations are installed (augmented) only if the widget currently
has translations - otherwise it waits. So I suspect that for
some reason it thinks that they do. Or maybe it has something
to do with traversal - another place translations are installed.
I really don't know, and we haven't had a chance to explore this
avenue too far yet.
o The leakage is dependant on the contents of the .Xdefaults/.Xresources
file. But it isn't dependant on any particular resource, or even one
that has anything to do with the application. We can cut the resource
file in half, and use either half and we get no leakage. But if
we use the whole file, it leaks. If we cut it down line by line
at some point we cross a threshold and it stops. If we take the resource
definition we just deleted and make it some bogus definition
"foo.bar: asdf", it doesn't matter - we still get the leakage. All of
this makes us suspect that there is some boundary condition in resource
handling that causes something to be reallocated or something to change
behavior - but we haven't been able to find it.
Does anyone have the vaguest idea what might be going on here? Or how
we might track it down?
-kee
----- End of forwarded message -----