Bug#675212: libjpeg-progs: Out of memory: Kill process 23549 (cjpeg) score 973 or sacrifice child

May 30th, 2012 - 11:40 am ET by Mathieu Malaterre | Report spam
Package: libjpeg-progs
Version: 8b-1
Severity: normal


Looks like cjpeg does not handle large image. It fails with:

$ dmesg
[...]
[30479.166496] Out of memory: Kill process 23549 (cjpeg) score 973 or sacrifice child
[30479.166500] Killed process 23549 (cjpeg) total-vm:567775256kB, anon-rss:15702792kB, file-rss:116kB

When running:

$ cjpeg -progressive -arithmetic -rgb -block 1 -outfile huge1.jpg -quality 100 huge.ppm

where:

$ head -3 huge.ppm
P6
46000 32914
255

Would be nice to give up early instead or taking all the memory

Debian Release: 6.0.5
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable'), (200, 'testing'), (100, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-0.bpo.2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libjpeg-progs depends on:
ii libc6 2.11.3-3 Embedded GNU C Library: Shared lib
ii libjpeg8 8b-1 The Independent JPEG Group's JPEG

libjpeg-progs recommends no packages.

libjpeg-progs suggests no packages.




To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 7 repliesReplies Make a reply

Replies

#1 Bill Allombert
May 30th, 2012 - 11:50 am ET | Report spam
On Wed, May 30, 2012 at 05:35:45PM +0200, Mathieu Malaterre wrote:
Package: libjpeg-progs
Version: 8b-1
Severity: normal


Looks like cjpeg does not handle large image. It fails with:

$ dmesg
[...]
[30479.166496] Out of memory: Kill process 23549 (cjpeg) score 973 or sacrifice child
[30479.166500] Killed process 23549 (cjpeg) total-vm:567775256kB, anon-rss:15702792kB, file-rss:116kB

When running:

$ cjpeg -progressive -arithmetic -rgb -block 1 -outfile huge1.jpg -quality 100 huge.ppm

where:

$ head -3 huge.ppm
P6
46000 32914
255

Would be nice to give up early instead or taking all the memory



Hello Mathieu,

Please look at the manpage. There is both an environment variable JPEGMEM and a
flag -maxmemory to limit the memory usage. This is a benefit of libjpeg8 over
libjpeg62.

Cheers,
Bill.

Imagine a large red swirl here.



To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact

Similar topics