unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#25625: Opening djvu file eats up all my RAM
@ 2017-02-05  8:50 Antoine Levitt
  2017-02-05 18:31 ` Eli Zaretskii
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Antoine Levitt @ 2017-02-05  8:50 UTC (permalink / raw)
  To: 25625

Hi,

When opening a djvu file, emacs eats up all my RAM and subsequently
crashes my system. I can reproduce this from emacs -Q with a few djvu
files I have. I can't post them publicly, but I can send them to anyone
interested.

I'm using emacs 25.1.1 with the following config, if that matters.

Best,
Antoine

  Where should the build process find the source code?    .
  What compiler should emacs be built with?               gcc -g3 -O2
  Should Emacs use the GNU version of malloc?             yes
      (Using Doug Lea's new malloc from the GNU C Library.)
  Should Emacs use a relocating allocator for buffers?    no
  Should Emacs use mmap(2) for buffer allocation?         no
  What window system should Emacs use?                    x11
  What toolkit should Emacs use?                          GTK3
  Where do we find X Windows header files?                Standard dirs
  Where do we find X Windows libraries?                   Standard dirs
  Does Emacs use -lXaw3d?                                 no
  Does Emacs use -lXpm?                                   yes
  Does Emacs use -ljpeg?                                  yes
  Does Emacs use -ltiff?                                  yes
  Does Emacs use a gif library?                           yes -lgif
  Does Emacs use a png library?                           yes -lpng12
  Does Emacs use -lrsvg-2?                                yes
  Does Emacs use cairo?                                   no
  Does Emacs use imagemagick?                             yes
  Does Emacs support sound?                               yes
  Does Emacs use -lgpm?                                   yes
  Does Emacs use -ldbus?                                  yes
  Does Emacs use -lgconf?                                 yes
  Does Emacs use GSettings?                               yes
  Does Emacs use a file notification library?             yes -lglibc (inotify)
  Does Emacs use access control lists?                    no
  Does Emacs use -lselinux?                               yes
  Does Emacs use -lgnutls?                                yes
  Does Emacs use -lxml2?                                  yes
  Does Emacs use -lfreetype?                              yes
  Does Emacs use -lm17n-flt?                              yes
  Does Emacs use -lotf?                                   yes
  Does Emacs use -lxft?                                   yes
  Does Emacs use -lsystemd?                               no
  Does Emacs directly use zlib?                           yes
  Does Emacs have dynamic modules support?                no
  Does Emacs use toolkit scroll bars?                     yes
  Does Emacs support Xwidgets (requires gtk3)?            no





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

* bug#25625: Opening djvu file eats up all my RAM
  2017-02-05  8:50 bug#25625: Opening djvu file eats up all my RAM Antoine Levitt
@ 2017-02-05 18:31 ` Eli Zaretskii
  2017-02-05 18:35   ` Antoine Levitt
  2018-06-05 23:44 ` Noam Postavsky
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2017-02-05 18:31 UTC (permalink / raw)
  To: Antoine Levitt; +Cc: 25625

> From: Antoine Levitt <antoine.levitt@inria.fr>
> Date: Sun, 05 Feb 2017 09:50:28 +0100
> 
> When opening a djvu file, emacs eats up all my RAM and subsequently
> crashes my system. I can reproduce this from emacs -Q with a few djvu
> files I have. I can't post them publicly, but I can send them to anyone
> interested.

Is it doc-view-mode that tries to display djvu files?





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

* bug#25625: Opening djvu file eats up all my RAM
  2017-02-05 18:31 ` Eli Zaretskii
@ 2017-02-05 18:35   ` Antoine Levitt
  2017-02-05 19:40     ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Antoine Levitt @ 2017-02-05 18:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 25625

Not, it's image-mode: opening a blank .djvu file in emacs -Q gives me

Image minor mode (indicator Image[imagemagick]):
Toggle Image minor mode in this buffer.
With a prefix argument ARG, enable Image minor mode if ARG is
positive, and disable it otherwise.  If called from Lisp, enable
the mode if ARG is omitted or nil.

Image minor mode provides the key C-c C-c,
to switch back to ‘image-mode’ and display an image file as the
actual image.

05 February 2017 19:31 +0100, Eli Zaretskii <eliz@gnu.org>:
>> From: Antoine Levitt <antoine.levitt@inria.fr>
>> Date: Sun, 05 Feb 2017 09:50:28 +0100
>> 
>> When opening a djvu file, emacs eats up all my RAM and subsequently
>> crashes my system. I can reproduce this from emacs -Q with a few djvu
>> files I have. I can't post them publicly, but I can send them to anyone
>> interested.
>
> Is it doc-view-mode that tries to display djvu files?






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

* bug#25625: Opening djvu file eats up all my RAM
  2017-02-05 18:35   ` Antoine Levitt
@ 2017-02-05 19:40     ` Eli Zaretskii
  2017-02-05 19:43       ` Antoine Levitt
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2017-02-05 19:40 UTC (permalink / raw)
  To: Antoine Levitt; +Cc: 25625

> From: Antoine Levitt <antoine.levitt@inria.fr>
> Cc: 25625@debbugs.gnu.org
> Date: Sun, 05 Feb 2017 19:35:53 +0100
> 
> Not, it's image-mode: opening a blank .djvu file in emacs -Q gives me
> 
> Image minor mode (indicator Image[imagemagick]):

What version of ImageMagick do you have?





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

* bug#25625: Opening djvu file eats up all my RAM
  2017-02-05 19:40     ` Eli Zaretskii
@ 2017-02-05 19:43       ` Antoine Levitt
  2018-06-07 11:47         ` Noam Postavsky
  0 siblings, 1 reply; 13+ messages in thread
From: Antoine Levitt @ 2017-02-05 19:43 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 25625

Standard imagemagick from linux mint 18.1:

antoine@epsilon:~$ convert --version
Version: ImageMagick 6.8.9-9 Q16 x86_64 2016-11-29 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib

05 February 2017 20:40 +0100, Eli Zaretskii <eliz@gnu.org>:
>> From: Antoine Levitt <antoine.levitt@inria.fr>
>> Cc: 25625@debbugs.gnu.org
>> Date: Sun, 05 Feb 2017 19:35:53 +0100
>> 
>> Not, it's image-mode: opening a blank .djvu file in emacs -Q gives me
>> 
>> Image minor mode (indicator Image[imagemagick]):
>
> What version of ImageMagick do you have?






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

* bug#25625: Opening djvu file eats up all my RAM
  2017-02-05  8:50 bug#25625: Opening djvu file eats up all my RAM Antoine Levitt
  2017-02-05 18:31 ` Eli Zaretskii
@ 2018-06-05 23:44 ` Noam Postavsky
  2018-06-06  5:52   ` Antoine Levitt
  2018-06-06 23:43 ` Noam Postavsky
  2022-02-10  8:02 ` Lars Ingebrigtsen
  3 siblings, 1 reply; 13+ messages in thread
From: Noam Postavsky @ 2018-06-05 23:44 UTC (permalink / raw)
  To: Antoine Levitt; +Cc: 25625

Antoine Levitt <antoine.levitt@inria.fr> writes:

> When opening a djvu file, emacs eats up all my RAM and subsequently
> crashes my system. I can reproduce this from emacs -Q with a few djvu
> files I have. I can't post them publicly, but I can send them to anyone
> interested.
>
> I'm using emacs 25.1.1 with the following config, if that matters.

Does this still happen in Emacs 26?  There's been some changes regarding
the memory allocaters selected.





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

* bug#25625: Opening djvu file eats up all my RAM
  2018-06-05 23:44 ` Noam Postavsky
@ 2018-06-06  5:52   ` Antoine Levitt
  0 siblings, 0 replies; 13+ messages in thread
From: Antoine Levitt @ 2018-06-06  5:52 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 25625


06 June 2018 01:44 +02, Noam Postavsky <npostavs@gmail.com>:
> Antoine Levitt <antoine.levitt@inria.fr> writes:
>
>> When opening a djvu file, emacs eats up all my RAM and subsequently
>> crashes my system. I can reproduce this from emacs -Q with a few djvu
>> files I have. I can't post them publicly, but I can send them to anyone
>> interested.
>>
>> I'm using emacs 25.1.1 with the following config, if that matters.
>
> Does this still happen in Emacs 26?  There's been some changes regarding
> the memory allocaters selected.

Confirmed in Emacs 26.1.





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

* bug#25625: Opening djvu file eats up all my RAM
  2017-02-05  8:50 bug#25625: Opening djvu file eats up all my RAM Antoine Levitt
  2017-02-05 18:31 ` Eli Zaretskii
  2018-06-05 23:44 ` Noam Postavsky
@ 2018-06-06 23:43 ` Noam Postavsky
  2022-02-10  8:02 ` Lars Ingebrigtsen
  3 siblings, 0 replies; 13+ messages in thread
From: Noam Postavsky @ 2018-06-06 23:43 UTC (permalink / raw)
  To: Antoine Levitt; +Cc: 25625

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

Antoine Levitt <antoine.levitt@inria.fr> writes:

> When opening a djvu file, emacs eats up all my RAM and subsequently
> crashes my system. I can reproduce this from emacs -Q with a few djvu
> files I have. I can't post them publicly, but I can send them to anyone
> interested.

Yes, can you send it to me please?

(you can get my PGP key at
https://savannah.gnu.org/people/viewgpg.php?user_id=102411 if you'd like
to encrypt it)

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

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

* bug#25625: Opening djvu file eats up all my RAM
  2017-02-05 19:43       ` Antoine Levitt
@ 2018-06-07 11:47         ` Noam Postavsky
  2018-06-07 12:43           ` Antoine Levitt
  0 siblings, 1 reply; 13+ messages in thread
From: Noam Postavsky @ 2018-06-07 11:47 UTC (permalink / raw)
  To: Antoine Levitt; +Cc: 25625

tags 25625 + unreproducible
quit

Antoine Levitt <antoine.levitt@inria.fr> writes:

> Standard imagemagick from linux mint 18.1:
>
> antoine@epsilon:~$ convert --version
> Version: ImageMagick 6.8.9-9 Q16 x86_64 2016-11-29 http://www.imagemagick.org
> Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
> Features: DPC Modules OpenMP
> Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib

I'm not able to reproduce the problem, I can read the file you sent
without trouble, albeit pretty slowly.  It takes about ~15s to go to the
next page, during which time I see (in top) Emacs' memory usage go up,
but it goes back down again after the page is displayed.  Perhaps the
imagemagick version is the problem?

~$ convert --version
Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP 
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND   
23078 npostavs  20   0 1390832 831836 535952 D  42.9 20.9   2:08.71 emacs //{while going to next page}
23078 npostavs  20   0  679200 120040  26632 S   0.0  3.0   2:21.38 emacs //{after page is displayed}

By the way (sorry I forgot to suggest this before asking you to retest)
if you use ulimit to cap virtual mem at say 2GB 'ulimit -v $((2 * 1024
1024))' does Emacs give you an out of memory error instead of crashing
your system?





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

* bug#25625: Opening djvu file eats up all my RAM
  2018-06-07 11:47         ` Noam Postavsky
@ 2018-06-07 12:43           ` Antoine Levitt
  0 siblings, 0 replies; 13+ messages in thread
From: Antoine Levitt @ 2018-06-07 12:43 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 25625

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

With ulimit I get

libgomp: Thread creation failed: Resource temporarily unavailable

On Thu, 7 Jun 2018 at 13:47, Noam Postavsky <npostavs@gmail.com> wrote:

> tags 25625 + unreproducible
> quit
>
> Antoine Levitt <antoine.levitt@inria.fr> writes:
>
> > Standard imagemagick from linux mint 18.1:
> >
> > antoine@epsilon:~$ convert --version
> > Version: ImageMagick 6.8.9-9 Q16 x86_64 2016-11-29
> http://www.imagemagick.org
> > Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
> > Features: DPC Modules OpenMP
> > Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms
> lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib
>
> I'm not able to reproduce the problem, I can read the file you sent
> without trouble, albeit pretty slowly.  It takes about ~15s to go to the
> next page, during which time I see (in top) Emacs' memory usage go up,
> but it goes back down again after the page is displayed.  Perhaps the
> imagemagick version is the problem?
>
> ~$ convert --version
> Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114
> http://www.imagemagick.org
> Copyright: © 1999-2017 ImageMagick Studio LLC
> License: http://www.imagemagick.org/script/license.php
> Features: Cipher DPC Modules OpenMP
> Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jp2
> jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib
>
>   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+
> COMMAND
> 23078 npostavs  20   0 1390832 831836 535952 D  42.9 20.9   2:08.71 emacs
> //{while going to next page}
> 23078 npostavs  20   0  679200 120040  26632 S   0.0  3.0   2:21.38 emacs
> //{after page is displayed}
>
> By the way (sorry I forgot to suggest this before asking you to retest)
> if you use ulimit to cap virtual mem at say 2GB 'ulimit -v $((2 * 1024
> 1024))' does Emacs give you an out of memory error instead of crashing
> your system?
>

[-- Attachment #2: Type: text/html, Size: 2668 bytes --]

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

* bug#25625: Opening djvu file eats up all my RAM
  2017-02-05  8:50 bug#25625: Opening djvu file eats up all my RAM Antoine Levitt
                   ` (2 preceding siblings ...)
  2018-06-06 23:43 ` Noam Postavsky
@ 2022-02-10  8:02 ` Lars Ingebrigtsen
  2022-03-12 22:44   ` Lars Ingebrigtsen
  3 siblings, 1 reply; 13+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-10  8:02 UTC (permalink / raw)
  To: Antoine Levitt; +Cc: 25625

Antoine Levitt <antoine.levitt@inria.fr> writes:

> When opening a djvu file, emacs eats up all my RAM and subsequently
> crashes my system. I can reproduce this from emacs -Q with a few djvu
> files I have. I can't post them publicly, but I can send them to anyone
> interested.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

Are you still seeing this problem in recent Emacs versions?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#25625: Opening djvu file eats up all my RAM
  2022-02-10  8:02 ` Lars Ingebrigtsen
@ 2022-03-12 22:44   ` Lars Ingebrigtsen
  2022-03-13 12:57     ` Antoine Levitt
  0 siblings, 1 reply; 13+ messages in thread
From: Lars Ingebrigtsen @ 2022-03-12 22:44 UTC (permalink / raw)
  To: Antoine Levitt; +Cc: 25625

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Are you still seeing this problem in recent Emacs versions?

More information was requested, but no response was given within a
month, so I'm closing this bug report.  If the problem still exists,
please respond to this email and we'll reopen the bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#25625: Opening djvu file eats up all my RAM
  2022-03-12 22:44   ` Lars Ingebrigtsen
@ 2022-03-13 12:57     ` Antoine Levitt
  0 siblings, 0 replies; 13+ messages in thread
From: Antoine Levitt @ 2022-03-13 12:57 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 25625

I haven't seen this in a while, and I just opened a djvu fine (though I
had to install a package and the emacs error message was pretty
unhelpful), so I guess this is fixed.

12 March 2022 23:44 +01, Lars Ingebrigtsen:
> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> Are you still seeing this problem in recent Emacs versions?
>
> More information was requested, but no response was given within a
> month, so I'm closing this bug report.  If the problem still exists,
> please respond to this email and we'll reopen the bug report.






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

end of thread, other threads:[~2022-03-13 12:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-05  8:50 bug#25625: Opening djvu file eats up all my RAM Antoine Levitt
2017-02-05 18:31 ` Eli Zaretskii
2017-02-05 18:35   ` Antoine Levitt
2017-02-05 19:40     ` Eli Zaretskii
2017-02-05 19:43       ` Antoine Levitt
2018-06-07 11:47         ` Noam Postavsky
2018-06-07 12:43           ` Antoine Levitt
2018-06-05 23:44 ` Noam Postavsky
2018-06-06  5:52   ` Antoine Levitt
2018-06-06 23:43 ` Noam Postavsky
2022-02-10  8:02 ` Lars Ingebrigtsen
2022-03-12 22:44   ` Lars Ingebrigtsen
2022-03-13 12:57     ` Antoine Levitt

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