unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* nxml-mode in 6th 25.1 pretest: memory leak?
@ 2016-07-16 17:29 Joseph Mingrone
  2016-07-16 17:52 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Joseph Mingrone @ 2016-07-16 17:29 UTC (permalink / raw)
  To: emacs-devel

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

Hi,

I've hit a memory issue a few times.  It appears to be related to nxml-mode.

I start by adding a custom schema locating file to find a compact relax NG schema for
DocBook version 5.0.

--------------------
(add-to-list 'rng-schema-locating-files "~/.emacs.d/schema/schemas.xml")

% cat 
<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
  <documentElement localName="section" typeId="DocBook"/> 
  <documentElement localName="chapter" typeId="DocBook"/>
  <documentElement localName="article" typeId="DocBook"/>
  <documentElement localName="book" typeId="DocBook"/>
  <typeId id="DocBook" uri="/usr/local/share/xml/docbook/5.0/rng/docbook.rnc"/>
</locatingRules>
--------------------

Everything will be fine, then while editing text the problem will be triggered.
Within about one minute Emacs's memory usage will go from something like 150 MB
to several GB, then all swap will be exhausted and the Emacs process will die.

% cat /var/log/messages | grep emacs
Jul 14 16:46:59 phe kernel: Jul 14 16:46:59 phe kernel: pid 63738 (emacs-25.0.95), uid 1001, was killed: out of swap space
Jul 14 17:12:03 phe kernel: Jul 14 17:12:03 phe kernel: pid 98492 (emacs-25.0.95), uid 1001, was killed: out of swap space
Jul 14 19:35:39 phe kernel: Jul 14 19:35:39 phe kernel: pid 1411 (emacs-25.0.95), uid 1001, was killed: out of swap space
Jul 15 14:36:40 phe kernel: Jul 15 14:36:40 phe kernel: pid 44880 (emacs-25.0.95), uid 1001, was killed: out of swap space
Jul 15 21:44:14 phe kernel: Jul 15 21:44:14 phe kernel: pid 77392 (emacs-25.0.95), uid 1001, was killed: out of swap space

This was occurring before I made the change to the indentation code I posted
about earlier.  I haven't filed a bug report yet, because I haven't been able to
figure out an explicit action to trigger it, nor have I been able to trigger it
with Emacs -Q.

Joseph

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

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

* Re: nxml-mode in 6th 25.1 pretest: memory leak?
  2016-07-16 17:29 nxml-mode in 6th 25.1 pretest: memory leak? Joseph Mingrone
@ 2016-07-16 17:52 ` Eli Zaretskii
  2016-07-16 18:32   ` Joseph Mingrone
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2016-07-16 17:52 UTC (permalink / raw)
  To: Joseph Mingrone; +Cc: emacs-devel

> From: Joseph Mingrone <jrm@ftfl.ca>
> Date: Sat, 16 Jul 2016 14:29:01 -0300
> 
> I've hit a memory issue a few times.  It appears to be related to nxml-mode.
> 
> I start by adding a custom schema locating file to find a compact relax NG schema for
> DocBook version 5.0.
> 
> --------------------
> (add-to-list 'rng-schema-locating-files "~/.emacs.d/schema/schemas.xml")
> 
> % cat 
> <locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
>   <documentElement localName="section" typeId="DocBook"/> 
>   <documentElement localName="chapter" typeId="DocBook"/>
>   <documentElement localName="article" typeId="DocBook"/>
>   <documentElement localName="book" typeId="DocBook"/>
>   <typeId id="DocBook" uri="/usr/local/share/xml/docbook/5.0/rng/docbook.rnc"/>
> </locatingRules>
> --------------------
> 
> Everything will be fine, then while editing text the problem will be triggered.
> Within about one minute Emacs's memory usage will go from something like 150 MB
> to several GB, then all swap will be exhausted and the Emacs process will die.

Are you saying this is something new with 25.0.95?  IOW, previous
pretests and Emacs 24.5 didn't have that problem?



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

* Re: nxml-mode in 6th 25.1 pretest: memory leak?
  2016-07-16 17:52 ` Eli Zaretskii
@ 2016-07-16 18:32   ` Joseph Mingrone
  2016-07-16 19:52     ` Dmitry Gutov
  2016-07-17  3:22     ` Dima Kogan
  0 siblings, 2 replies; 6+ messages in thread
From: Joseph Mingrone @ 2016-07-16 18:32 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

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

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Joseph Mingrone <jrm@ftfl.ca>
>> Date: Sat, 16 Jul 2016 14:29:01 -0300

>> I've hit a memory issue a few times.  It appears to be related to nxml-mode.

>> I start by adding a custom schema locating file to find a compact relax NG schema for
>> DocBook version 5.0.

>> --------------------
>> (add-to-list 'rng-schema-locating-files "~/.emacs.d/schema/schemas.xml")

>> % cat 
>> <locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
>>   <documentElement localName="section" typeId="DocBook"/> 
>>   <documentElement localName="chapter" typeId="DocBook"/>
>>   <documentElement localName="article" typeId="DocBook"/>
>>   <documentElement localName="book" typeId="DocBook"/>
>>   <typeId id="DocBook" uri="/usr/local/share/xml/docbook/5.0/rng/docbook.rnc"/>
>> </locatingRules>
>> --------------------

>> Everything will be fine, then while editing text the problem will be triggered.
>> Within about one minute Emacs's memory usage will go from something like 150 MB
>> to several GB, then all swap will be exhausted and the Emacs process will die.

> Are you saying this is something new with 25.0.95?  IOW, previous
> pretests and Emacs 24.5 didn't have that problem?

I haven't used nxml-mode in earlier versions, so I'm sure if the problem was
there before.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

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

* Re: nxml-mode in 6th 25.1 pretest: memory leak?
  2016-07-16 18:32   ` Joseph Mingrone
@ 2016-07-16 19:52     ` Dmitry Gutov
  2016-07-17  3:22     ` Dima Kogan
  1 sibling, 0 replies; 6+ messages in thread
From: Dmitry Gutov @ 2016-07-16 19:52 UTC (permalink / raw)
  To: Joseph Mingrone, Eli Zaretskii; +Cc: emacs-devel

On 07/16/2016 09:32 PM, Joseph Mingrone wrote:

>> Are you saying this is something new with 25.0.95?  IOW, previous
>> pretests and Emacs 24.5 didn't have that problem?
>
> I haven't used nxml-mode in earlier versions, so I'm sure if the problem was
> there before.

Could you try it in 24.5, with your usual workload? It would help us 
classify this report.




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

* Re: nxml-mode in 6th 25.1 pretest: memory leak?
  2016-07-16 18:32   ` Joseph Mingrone
  2016-07-16 19:52     ` Dmitry Gutov
@ 2016-07-17  3:22     ` Dima Kogan
       [not found]       ` <CAK9AuB_JKFN1P=OZze2ZXv2H-iBfF_Q0p1Qehp8=Ch-Dg6MLOQ@mail.gmail.com>
  1 sibling, 1 reply; 6+ messages in thread
From: Dima Kogan @ 2016-07-17  3:22 UTC (permalink / raw)
  To: Joseph Mingrone; +Cc: emacs-devel

Joseph Mingrone <jrm@ftfl.ca> writes:

>>> Within about one minute Emacs's memory usage will go from something like 150 MB
>>> to several GB, then all swap will be exhausted and the Emacs process will die.

I debugged some memory leaks some months ago. If you want to dig into
it, the workflow is here:

  http://notes.secretsauce.net/notes/2015/10/05_memory-leak-debugging-tools.html



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

* Re: nxml-mode in 6th 25.1 pretest: memory leak?
       [not found]       ` <CAK9AuB_JKFN1P=OZze2ZXv2H-iBfF_Q0p1Qehp8=Ch-Dg6MLOQ@mail.gmail.com>
@ 2016-07-17 15:54         ` Joseph Mingrone
  0 siblings, 0 replies; 6+ messages in thread
From: Joseph Mingrone @ 2016-07-17 15:54 UTC (permalink / raw)
  To: Eli Zaretskii, Dmitry Gutov, Dima Kogan, Bastian Beischer; +Cc: emacs-devel

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

Hi everyone,

After more testing, this is what I've discovered.

- I can now explicitly reproduce the problem, usually within a minute or two,
  often sooner. [1]
- If I turn off savehist-mode I cannot reproduce the problem.  However, there is
  some other interaction with my configuration that I haven't figured out yet.
  Running emacs -Q and evaluating (setq savehist-mode t), does not trigger the
  problem.
- The problem does exist in 24.5.

I will look into your specific memory-leak debugging tips next, although it may
take me a few days to get back to you.

Thanks for your input,

Joseph

[1]
- open a file
- start a marco
- remove a chunk of XML that just fits in the screen
- add/remove a few blank lines
- yank the chunk back in
- add/remove a few lines blank lines below the chunk
- save the macro
- run the marco repeatedly

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

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

end of thread, other threads:[~2016-07-17 15:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-16 17:29 nxml-mode in 6th 25.1 pretest: memory leak? Joseph Mingrone
2016-07-16 17:52 ` Eli Zaretskii
2016-07-16 18:32   ` Joseph Mingrone
2016-07-16 19:52     ` Dmitry Gutov
2016-07-17  3:22     ` Dima Kogan
     [not found]       ` <CAK9AuB_JKFN1P=OZze2ZXv2H-iBfF_Q0p1Qehp8=Ch-Dg6MLOQ@mail.gmail.com>
2016-07-17 15:54         ` Joseph Mingrone

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).