[Bug 2049659] [NEW] iconv can not process long stream

Vladimir 2049659 at bugs.launchpad.net
Wed Jan 17 17:10:57 UTC 2024


Public bug reported:

Iconv eats too much memory on large piped input.
Steps to reproduce
yes | iconv -f ascii -t utf-8 | head -n5
Expected: 5 lines of y
Observed: iconv tries to read its stdin to the very end (infinitely) until got killed by OOM Killer.
Suggested solution: apply the patch https://sourceware.org/legacy-ml/libc-alpha/2015-08/msg00297.html

$ lsb_release -rd
Description:    Ubuntu 20.04.5 LTS
Release:        20.04

$ iconv -V
iconv (Ubuntu GLIBC 2.31-0ubuntu9.14) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Ulrich Drepper.

$ apt-cache policy libc-bin
libc-bin:
  Installed: 2.31-0ubuntu9.14
  Candidate: 2.31-0ubuntu9.14

** Affects: glibc (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to glibc in Ubuntu.
https://bugs.launchpad.net/bugs/2049659

Title:
  iconv can not process long stream

Status in glibc package in Ubuntu:
  New

Bug description:
  Iconv eats too much memory on large piped input.
  Steps to reproduce
  yes | iconv -f ascii -t utf-8 | head -n5
  Expected: 5 lines of y
  Observed: iconv tries to read its stdin to the very end (infinitely) until got killed by OOM Killer.
  Suggested solution: apply the patch https://sourceware.org/legacy-ml/libc-alpha/2015-08/msg00297.html

  $ lsb_release -rd
  Description:    Ubuntu 20.04.5 LTS
  Release:        20.04

  $ iconv -V
  iconv (Ubuntu GLIBC 2.31-0ubuntu9.14) 2.31
  Copyright (C) 2020 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  Written by Ulrich Drepper.

  $ apt-cache policy libc-bin
  libc-bin:
    Installed: 2.31-0ubuntu9.14
    Candidate: 2.31-0ubuntu9.14

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/2049659/+subscriptions




More information about the foundations-bugs mailing list