unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* X wizard needed
@ 2003-01-12 11:56 Richard Stallman
  0 siblings, 0 replies; 13+ messages in thread
From: Richard Stallman @ 2003-01-12 11:56 UTC (permalink / raw)


Is there someone who knows how to trace X commands
to see what Emacs is sending that causes this memory leak?
Please send me mail if you can do it.


Date: Thu, 9 Jan 2003 15:02:47 +0000
From: Alan Morgan <arm@camcon.co.uk>
To: bug-gnu-emacs@gnu.org
Subject: Sun X server memory leak when running emacs 21.2
Sender: bug-gnu-emacs-bounces+rms=gnu.org@gnu.org

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.2.2 (sparc-sun-solaris2.6, OSF/Motif Version 1.2.6)
 of 2002-08-08 on athene
configured using `configure  --with-x-toolkit=motif --prefix=/usr/local/src/edcad/gnu'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

On Sun Solaris 2.6, when running emacs 21.2 with the menu bar enabled, the Sun
X server's memory usage increases with time, eventually making the machine
unreasonably slow.  This does not occur in emacs 20, nor in 21.2 if the menu
bar is disabled.

To see the behaviour, start an X login session, monitor the virtual memory
size of the Xsun process, and start a vanilla emacs with emacs -q. When emacs
processes commands, the Xsun memory usage is seen to rise, usually in chunks
of around 4-32k at a time. Opening files (with C-x C-f) and killing buffers
(C-x C-k), with no other activity, seems to show the behaviour. If emacs is
left undisturbed (no input) then the memory usage does not rise but stays
constant, however doing C-x C-f then causes a rise again, even C-x C-f C-g,
i.e. an aborted find file has the same effect.

I am aware that this could be a bug in Xsun, not in emacs, but I'm sorry I
don't know enough about the internals of X to know whether it is possible for
an application to legitimately cause the Xsun process to expand, or if this
has to imply a bug in the X implementation. I'd be interested to know which is
at fault.

Best Regards,

Alan

- 
-- 
Dr Alan Morgan             |                                 
Cambridge Consultants Ltd. |  Tel:  +44 (0)1223 420024 (switchboard)  
Science Park               |        +44 (0)1223 392682 (direct)
Milton Road                |        +44 (0)7785 714790 (mobile)
Cambridge                  |  Fax:  +44 (0)1223 423373   
CB4 0DW                    |  Email: arm@camcon.co.uk   
England                    |                                 



_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs

^ permalink raw reply	[flat|nested] 13+ messages in thread

* X wizard needed
@ 2003-01-20  0:50 Richard Stallman
  2003-01-20 19:14 ` Jan D.
  0 siblings, 1 reply; 13+ messages in thread
From: Richard Stallman @ 2003-01-20  0:50 UTC (permalink / raw)


[I sent this message a few weeks ago but did not get a response.
I hope we have someone who can help.]


Is there someone who knows how to trace X commands
to see what Emacs is sending that causes this memory leak?
Please send me mail if you can do it.


Date: Thu, 9 Jan 2003 15:02:47 +0000
From: Alan Morgan <arm@camcon.co.uk>
To: bug-gnu-emacs@gnu.org
Subject: Sun X server memory leak when running emacs 21.2
Sender: bug-gnu-emacs-bounces+rms=gnu.org@gnu.org

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.2.2 (sparc-sun-solaris2.6, OSF/Motif Version 1.2.6)
 of 2002-08-08 on athene
configured using `configure  --with-x-toolkit=motif --prefix=/usr/local/src/edcad/gnu'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

On Sun Solaris 2.6, when running emacs 21.2 with the menu bar enabled, the Sun
X server's memory usage increases with time, eventually making the machine
unreasonably slow.  This does not occur in emacs 20, nor in 21.2 if the menu
bar is disabled.

To see the behaviour, start an X login session, monitor the virtual memory
size of the Xsun process, and start a vanilla emacs with emacs -q. When emacs
processes commands, the Xsun memory usage is seen to rise, usually in chunks
of around 4-32k at a time. Opening files (with C-x C-f) and killing buffers
(C-x C-k), with no other activity, seems to show the behaviour. If emacs is
left undisturbed (no input) then the memory usage does not rise but stays
constant, however doing C-x C-f then causes a rise again, even C-x C-f C-g,
i.e. an aborted find file has the same effect.

I am aware that this could be a bug in Xsun, not in emacs, but I'm sorry I
don't know enough about the internals of X to know whether it is possible for
an application to legitimately cause the Xsun process to expand, or if this
has to imply a bug in the X implementation. I'd be interested to know which is
at fault.

Best Regards,

Alan

- 
-- 
Dr Alan Morgan             |                                 
Cambridge Consultants Ltd. |  Tel:  +44 (0)1223 420024 (switchboard)  
Science Park               |        +44 (0)1223 392682 (direct)
Milton Road                |        +44 (0)7785 714790 (mobile)
Cambridge                  |  Fax:  +44 (0)1223 423373   
CB4 0DW                    |  Email: arm@camcon.co.uk   
England                    |                                 



_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: X wizard needed
  2003-01-20 19:14 ` Jan D.
@ 2003-01-20 18:53   ` Eli Zaretskii
  2003-01-26 13:38     ` Jan D.
  2003-01-22  9:59   ` Richard Stallman
  2003-01-26 13:35   ` Jan D.
  2 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2003-01-20 18:53 UTC (permalink / raw)
  Cc: emacs-devel

> Date: Mon, 20 Jan 2003 20:14:47 +0100
> From: "Jan D." <jan.h.d@swipnet.se>
> 
> I can take a look.  xmon can be used to trace X traffic.

Perhaps you could add a few words to etc/DEBUG about using xmon for
such debugging.

TIA

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: X wizard needed
  2003-01-20  0:50 Richard Stallman
@ 2003-01-20 19:14 ` Jan D.
  2003-01-20 18:53   ` Eli Zaretskii
                     ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Jan D. @ 2003-01-20 19:14 UTC (permalink / raw)
  Cc: emacs-devel


måndagen den 20 januari 2003 kl 01.50 skrev Richard Stallman:

> [I sent this message a few weeks ago but did not get a response.
> I hope we have someone who can help.]
>
>
> Is there someone who knows how to trace X commands
> to see what Emacs is sending that causes this memory leak?
> Please send me mail if you can do it.

I can take a look.  xmon can be used to trace X traffic.  It is possible
that some X window is not deleted when updating the menus.  But I'll see
if I can find anything.

	Jan D.

> Date: Thu, 9 Jan 2003 15:02:47 +0000
> From: Alan Morgan <arm@camcon.co.uk>
> To: bug-gnu-emacs@gnu.org
> Subject: Sun X server memory leak when running emacs 21.2
> Sender: bug-gnu-emacs-bounces+rms=gnu.org@gnu.org
>
> This bug report will be sent to the Free Software Foundation,
> not to your local site managers!
> Please write in English, because the Emacs maintainers do not have
> translators to read other languages for them.
>
> Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
> and to the gnu.emacs.bug news group.
>
> In GNU Emacs 21.2.2 (sparc-sun-solaris2.6, OSF/Motif Version 1.2.6)
>  of 2002-08-08 on athene
> configured using `configure  --with-x-toolkit=motif 
> --prefix=/usr/local/src/edcad/gnu'
> Important settings:
>   value of $LC_ALL: nil
>   value of $LC_COLLATE: nil
>   value of $LC_CTYPE: nil
>   value of $LC_MESSAGES: nil
>   value of $LC_MONETARY: nil
>   value of $LC_NUMERIC: nil
>   value of $LC_TIME: nil
>   value of $LANG: C
>   locale-coding-system: nil
>   default-enable-multibyte-characters: t
>
> Please describe exactly what actions triggered the bug
> and the precise symptoms of the bug:
>
> On Sun Solaris 2.6, when running emacs 21.2 with the menu bar enabled, the 
> Sun
> X server's memory usage increases with time, eventually making the machine
> unreasonably slow.  This does not occur in emacs 20, nor in 21.2 if the 
> menu
> bar is disabled.
>
> To see the behaviour, start an X login session, monitor the virtual memory
> size of the Xsun process, and start a vanilla emacs with emacs -q. When 
> emacs
> processes commands, the Xsun memory usage is seen to rise, usually in 
> chunks
> of around 4-32k at a time. Opening files (with C-x C-f) and killing buffers
> (C-x C-k), with no other activity, seems to show the behaviour. If emacs 
> is
> left undisturbed (no input) then the memory usage does not rise but stays
> constant, however doing C-x C-f then causes a rise again, even C-x C-f C-g,
> i.e. an aborted find file has the same effect.
>
> I am aware that this could be a bug in Xsun, not in emacs, but I'm sorry 
> I
> don't know enough about the internals of X to know whether it is possible 
> for
> an application to legitimately cause the Xsun process to expand, or if this
> has to imply a bug in the X implementation. I'd be interested to know 
> which is
> at fault.
>
> Best Regards,
>
> Alan
>
> -
> --
> Dr Alan Morgan             |
> Cambridge Consultants Ltd. |  Tel:  +44 (0)1223 420024 (switchboard)
> Science Park               |        +44 (0)1223 392682 (direct)
> Milton Road                |        +44 (0)7785 714790 (mobile)
> Cambridge                  |  Fax:  +44 (0)1223 423373
> CB4 0DW                    |  Email: arm@camcon.co.uk
> England                    |

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: X wizard needed
  2003-01-20 19:14 ` Jan D.
  2003-01-20 18:53   ` Eli Zaretskii
@ 2003-01-22  9:59   ` Richard Stallman
  2003-01-26 13:35   ` Jan D.
  2 siblings, 0 replies; 13+ messages in thread
From: Richard Stallman @ 2003-01-22  9:59 UTC (permalink / raw)
  Cc: emacs-devel

    I can take a look.  xmon can be used to trace X traffic.  It is possible
    that some X window is not deleted when updating the menus.  But I'll see
    if I can find anything.

THank you.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: X wizard needed
  2003-01-20 19:14 ` Jan D.
  2003-01-20 18:53   ` Eli Zaretskii
  2003-01-22  9:59   ` Richard Stallman
@ 2003-01-26 13:35   ` Jan D.
  2003-01-27  2:32     ` Richard Stallman
  2 siblings, 1 reply; 13+ messages in thread
From: Jan D. @ 2003-01-26 13:35 UTC (permalink / raw)
  Cc: arm

[-- Attachment #1: Type: text/plain, Size: 3896 bytes --]

Jan D. wrote:
> 
> måndagen den 20 januari 2003 kl 01.50 skrev Richard Stallman:
> 
>> [I sent this message a few weeks ago but did not get a response.
>> I hope we have someone who can help.]
>>
>>
>> Is there someone who knows how to trace X commands
>> to see what Emacs is sending that causes this memory leak?
>> Please send me mail if you can do it.
> 
> 
> I can take a look.  xmon can be used to trace X traffic.  It is possible
> that some X window is not deleted when updating the menus.  But I'll see
> if I can find anything.

It turns out that no xmon was needed.  It is a general memory leak that is 
present on all systems.  It is both a leak in Emacs and a leak in the X server, 
since X windows aren't being deallocated.  I think this should go into RC.  Is 
it OK to put it in there (see attachement)?  I've tested it under XFree86, 
GNU/Linux and Solaris ix86.

	Jan D.


> 
>> Date: Thu, 9 Jan 2003 15:02:47 +0000
>> From: Alan Morgan <arm@camcon.co.uk>
>> To: bug-gnu-emacs@gnu.org
>> Subject: Sun X server memory leak when running emacs 21.2
>> Sender: bug-gnu-emacs-bounces+rms=gnu.org@gnu.org
>>
>> This bug report will be sent to the Free Software Foundation,
>> not to your local site managers!
>> Please write in English, because the Emacs maintainers do not have
>> translators to read other languages for them.
>>
>> Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
>> and to the gnu.emacs.bug news group.
>>
>> In GNU Emacs 21.2.2 (sparc-sun-solaris2.6, OSF/Motif Version 1.2.6)
>>  of 2002-08-08 on athene
>> configured using `configure  --with-x-toolkit=motif 
>> --prefix=/usr/local/src/edcad/gnu'
>> Important settings:
>>   value of $LC_ALL: nil
>>   value of $LC_COLLATE: nil
>>   value of $LC_CTYPE: nil
>>   value of $LC_MESSAGES: nil
>>   value of $LC_MONETARY: nil
>>   value of $LC_NUMERIC: nil
>>   value of $LC_TIME: nil
>>   value of $LANG: C
>>   locale-coding-system: nil
>>   default-enable-multibyte-characters: t
>>
>> Please describe exactly what actions triggered the bug
>> and the precise symptoms of the bug:
>>
>> On Sun Solaris 2.6, when running emacs 21.2 with the menu bar enabled, 
>> the Sun
>> X server's memory usage increases with time, eventually making the 
>> machine
>> unreasonably slow.  This does not occur in emacs 20, nor in 21.2 if 
>> the menu
>> bar is disabled.
>>
>> To see the behaviour, start an X login session, monitor the virtual 
>> memory
>> size of the Xsun process, and start a vanilla emacs with emacs -q. 
>> When emacs
>> processes commands, the Xsun memory usage is seen to rise, usually in 
>> chunks
>> of around 4-32k at a time. Opening files (with C-x C-f) and killing 
>> buffers
>> (C-x C-k), with no other activity, seems to show the behaviour. If 
>> emacs is
>> left undisturbed (no input) then the memory usage does not rise but stays
>> constant, however doing C-x C-f then causes a rise again, even C-x C-f 
>> C-g,
>> i.e. an aborted find file has the same effect.
>>
>> I am aware that this could be a bug in Xsun, not in emacs, but I'm 
>> sorry I
>> don't know enough about the internals of X to know whether it is 
>> possible for
>> an application to legitimately cause the Xsun process to expand, or if 
>> this
>> has to imply a bug in the X implementation. I'd be interested to know 
>> which is
>> at fault.
>>
>> Best Regards,
>>
>> Alan
>>
>> -
>> -- 
>> Dr Alan Morgan             |
>> Cambridge Consultants Ltd. |  Tel:  +44 (0)1223 420024 (switchboard)
>> Science Park               |        +44 (0)1223 392682 (direct)
>> Milton Road                |        +44 (0)7785 714790 (mobile)
>> Cambridge                  |  Fax:  +44 (0)1223 423373
>> CB4 0DW                    |  Email: arm@camcon.co.uk
>> England                    |
> 
> 
> 


[-- Attachment #2: emacsRC.diff --]
[-- Type: text/plain, Size: 1043 bytes --]

Index: lwlib/lwlib-Xm.c
===================================================================
RCS file: /cvsroot/emacs/emacs/lwlib/lwlib-Xm.c,v
retrieving revision 1.43
diff -c -r1.43 lwlib-Xm.c
*** lwlib/lwlib-Xm.c	22 Mar 2001 19:11:33 -0000	1.43
--- lwlib/lwlib-Xm.c	26 Jan 2003 13:28:55 -0000
***************
*** 265,271 ****
  	  XtSetArg (al[0], XmNsubMenuId, &submenu); 
    	  XtGetValues (children[i], al, 1);
  	  if (submenu)
! 	    XtDestroyWidget (submenu);
  	  XtDestroyWidget (children[i]);
  	}
  
--- 265,274 ----
  	  XtSetArg (al[0], XmNsubMenuId, &submenu); 
    	  XtGetValues (children[i], al, 1);
  	  if (submenu)
!             {
!               destroy_all_children (submenu, 0);
!               XtDestroyWidget (submenu);
!             }
  	  XtDestroyWidget (children[i]);
  	}
  
***************
*** 731,736 ****
--- 734,742 ----
  			     (XtPointer)instance);
  	      XtManageChild (button);
  	    }
+ 
+           if (widget_list)
+             XtFree ((char*) widget_list);
  	}
      }
    else if (!contents)

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: X wizard needed
  2003-01-20 18:53   ` Eli Zaretskii
@ 2003-01-26 13:38     ` Jan D.
  2003-01-26 16:12       ` Eli Zaretskii
  2003-01-27  2:32       ` Richard Stallman
  0 siblings, 2 replies; 13+ messages in thread
From: Jan D. @ 2003-01-26 13:38 UTC (permalink / raw)
  Cc: emacs-devel

Eli Zaretskii wrote:
>>Date: Mon, 20 Jan 2003 20:14:47 +0100
>>From: "Jan D." <jan.h.d@swipnet.se>
>>
>>I can take a look.  xmon can be used to trace X traffic.
> 
> 
> Perhaps you could add a few words to etc/DEBUG about using xmon for
> such debugging.

I'm not sure if I have anything general to say.  It is very dependent on what 
you are after and requires some X protocol (Xlib) knowledge.  But I can put in 
a line about how to get xmon for X tracing, if that is sufficient.

	Jan D.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: X wizard needed
  2003-01-26 13:38     ` Jan D.
@ 2003-01-26 16:12       ` Eli Zaretskii
  2003-01-27 20:01         ` Jan D.
  2003-01-27  2:32       ` Richard Stallman
  1 sibling, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2003-01-26 16:12 UTC (permalink / raw)
  Cc: emacs-devel

> Date: Sun, 26 Jan 2003 14:38:56 +0100
> From: "Jan D." <jan.h.d@swipnet.se>
> 
> But I can put in 
> a line about how to get xmon for X tracing, if that is sufficient.

Perhaps that's all we need for now.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: X wizard needed
  2003-01-26 13:35   ` Jan D.
@ 2003-01-27  2:32     ` Richard Stallman
  2003-01-27 19:05       ` Jan D.
  0 siblings, 1 reply; 13+ messages in thread
From: Richard Stallman @ 2003-01-27  2:32 UTC (permalink / raw)
  Cc: emacs-devel

    It turns out that no xmon was needed.  It is a general memory leak
    that i s present on all systems.  It is both a leak in Emacs and a
    leak in the X s erver, since X windows aren't being deallocated.
    I think this should go into RC .

I agree--would you please install it?
Thank you very much.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: X wizard needed
  2003-01-26 13:38     ` Jan D.
  2003-01-26 16:12       ` Eli Zaretskii
@ 2003-01-27  2:32       ` Richard Stallman
  1 sibling, 0 replies; 13+ messages in thread
From: Richard Stallman @ 2003-01-27  2:32 UTC (permalink / raw)
  Cc: emacs-devel

    I'm not sure if I have anything general to say.  It is very
    dependent on what you are after and requires some X protocol
    (Xlib) knowledge.  But I can put in a line about how to get xmon
    for X tracing, if that is sufficient.

Please write what you can.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: X wizard needed
  2003-01-27  2:32     ` Richard Stallman
@ 2003-01-27 19:05       ` Jan D.
  0 siblings, 0 replies; 13+ messages in thread
From: Jan D. @ 2003-01-27 19:05 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman wrote:
>     It turns out that no xmon was needed.  It is a general memory leak
>     that i s present on all systems.  It is both a leak in Emacs and a
>     leak in the X s erver, since X windows aren't being deallocated.
>     I think this should go into RC .
> 
> I agree--would you please install it?
> Thank you very much.

Done.

	Jan D.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: X wizard needed
  2003-01-26 16:12       ` Eli Zaretskii
@ 2003-01-27 20:01         ` Jan D.
  2003-01-28  6:20           ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Jan D. @ 2003-01-27 20:01 UTC (permalink / raw)
  Cc: emacs-devel

Eli Zaretskii wrote:
>>Date: Sun, 26 Jan 2003 14:38:56 +0100
>>From: "Jan D." <jan.h.d@swipnet.se>
>>
>>But I can put in 
>>a line about how to get xmon for X tracing, if that is sufficient.
> 
> 
> Perhaps that's all we need for now.

I added some text to etc/DEBUG.

	Jan D.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: X wizard needed
  2003-01-27 20:01         ` Jan D.
@ 2003-01-28  6:20           ` Eli Zaretskii
  0 siblings, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2003-01-28  6:20 UTC (permalink / raw)
  Cc: emacs-devel

> Date: Mon, 27 Jan 2003 21:01:36 +0100
> From: "Jan D." <jan.h.d@swipnet.se>
> 
> I added some text to etc/DEBUG.

Thank you.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2003-01-28  6:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-12 11:56 X wizard needed Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2003-01-20  0:50 Richard Stallman
2003-01-20 19:14 ` Jan D.
2003-01-20 18:53   ` Eli Zaretskii
2003-01-26 13:38     ` Jan D.
2003-01-26 16:12       ` Eli Zaretskii
2003-01-27 20:01         ` Jan D.
2003-01-28  6:20           ` Eli Zaretskii
2003-01-27  2:32       ` Richard Stallman
2003-01-22  9:59   ` Richard Stallman
2003-01-26 13:35   ` Jan D.
2003-01-27  2:32     ` Richard Stallman
2003-01-27 19:05       ` Jan D.

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).