[Bug 1535121] [NEW] Archive::Zip does not close archive files

Eugene Savelov savelov at gmail.com
Sun Jan 17 19:17:40 UTC 2016


Public bug reported:

Ubuntu 15.10 contains Archive::Zip v 1.49 that apparently has a bug that
creating/updating a zip archive file does not close it , and creating
many files generates "too many open files" error similar to this -

IO error: Can't open <.......>: Too many open files at /usr/share/perl5/Archive/Zip/FileMember.pm line 40. Archive::Zip::FileMember::_openFile(Archive::Zip::ZipFileMember=HASH(0x23e62b0)) called at /usr/share/perl5/Archive/Zip/FileMember.pm line 30 Archive::Zip::FileMember::fh(Archive::Zip::ZipFileMember=HASH(0x23e62b0)) called at /usr/share/perl5/Archive/Zip/ZipFileMember.pm line 384 Archive::Zip::ZipFileMember::rewindData(Archive::Zip::ZipFileMember=HASH(0x23e62b0)) called at /usr/share/perl5/Archive/Zip/Member.pm line 1059 Archive::Zip::Member::_writeToFileHandle(Archive::Zip::ZipFileMember=HASH(0x23e62b0), IO::File=GLOB(0x24399d0), 1, 0) called at /usr/share/perl5/Archive/Zip/Archive.pm line 420 Archive::Zip::Archive::writeToFileHandle(Archive::Zip::Archive=HASH(0x242eda8), IO::File=GLOB(0x24399d0)) called at /usr/share/perl5/Archive/Zip/Archive.pm line 456 Archive::Zip::Archive::overwriteAs(Archive::Zip::Archive=HASH(0x242eda8), "<.......>") called at /usr/share/perl5/Archive/Zip/Archive.pm line 440
Archive::Zip::Archive::overwrite(Archive::Zip::Archive=HASH(0x242eda8)) called at ./arcoper.pl line 57

lsof -p <pid>    shows all /tmp/*zip files deleted, but still open, up to max open files  (1000  which is system default)
Increasing number of files in limits.conf makes the problem generate less frequently.

installing latest version 1.56  from cpan fixes the problem - Using many
zip files correctly  closes them, does not generate errors, and lsof -p
<pid> shows only several files (less than 20)

** Affects: libarchive-zip-perl (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

- Ubuntu 15.10 containst Archive::Zip v 1.49 that ontains a bug that
+ Ubuntu 15.10 contains Archive::Zip v 1.49 that ontains a bug that
  creating/updating a zip archive file does not close it , and creating
  many files generates "too many open files" error similar to this -
  
- IO error: Can't open <.......>: Too many open files at /usr/share/perl5/Archive/Zip/FileMember.pm line 40. Archive::Zip::FileMember::_openFile(Archive::Zip::ZipFileMember=HASH(0x23e62b0)) called at /usr/share/perl5/Archive/Zip/FileMember.pm line 30 Archive::Zip::FileMember::fh(Archive::Zip::ZipFileMember=HASH(0x23e62b0)) called at /usr/share/perl5/Archive/Zip/ZipFileMember.pm line 384 Archive::Zip::ZipFileMember::rewindData(Archive::Zip::ZipFileMember=HASH(0x23e62b0)) called at /usr/share/perl5/Archive/Zip/Member.pm line 1059 Archive::Zip::Member::_writeToFileHandle(Archive::Zip::ZipFileMember=HASH(0x23e62b0), IO::File=GLOB(0x24399d0), 1, 0) called at /usr/share/perl5/Archive/Zip/Archive.pm line 420 Archive::Zip::Archive::writeToFileHandle(Archive::Zip::Archive=HASH(0x242eda8), IO::File=GLOB(0x24399d0)) called at /usr/share/perl5/Archive/Zip/Archive.pm line 456 Archive::Zip::Archive::overwriteAs(Archive::Zip::Archive=HASH(0x242eda8), "<.......>") called at /usr/share/perl5/Archive/Zip/Archive.pm line 440 
+ IO error: Can't open <.......>: Too many open files at /usr/share/perl5/Archive/Zip/FileMember.pm line 40. Archive::Zip::FileMember::_openFile(Archive::Zip::ZipFileMember=HASH(0x23e62b0)) called at /usr/share/perl5/Archive/Zip/FileMember.pm line 30 Archive::Zip::FileMember::fh(Archive::Zip::ZipFileMember=HASH(0x23e62b0)) called at /usr/share/perl5/Archive/Zip/ZipFileMember.pm line 384 Archive::Zip::ZipFileMember::rewindData(Archive::Zip::ZipFileMember=HASH(0x23e62b0)) called at /usr/share/perl5/Archive/Zip/Member.pm line 1059 Archive::Zip::Member::_writeToFileHandle(Archive::Zip::ZipFileMember=HASH(0x23e62b0), IO::File=GLOB(0x24399d0), 1, 0) called at /usr/share/perl5/Archive/Zip/Archive.pm line 420 Archive::Zip::Archive::writeToFileHandle(Archive::Zip::Archive=HASH(0x242eda8), IO::File=GLOB(0x24399d0)) called at /usr/share/perl5/Archive/Zip/Archive.pm line 456 Archive::Zip::Archive::overwriteAs(Archive::Zip::Archive=HASH(0x242eda8), "<.......>") called at /usr/share/perl5/Archive/Zip/Archive.pm line 440
  Archive::Zip::Archive::overwrite(Archive::Zip::Archive=HASH(0x242eda8)) called at ./arcoper.pl line 57
  
  lsof -p <pid>    shows all /tmp/*zip files deleted, but still open, up to max open files  (1000  which is system default)
- Increasing number of files in limits.conf makes the problem generate less frequently. 
-  
- installing latest version 1.56  from cpan fixes the problem - Using many zip files correctly  closes them, does not generate errors, and lsof -p <pid> shows only several files (less than 20)
+ Increasing number of files in limits.conf makes the problem generate less frequently.
+ 
+ installing latest version 1.56  from cpan fixes the problem - Using many
+ zip files correctly  closes them, does not generate errors, and lsof -p
+ <pid> shows only several files (less than 20)

** Description changed:

- Ubuntu 15.10 contains Archive::Zip v 1.49 that ontains a bug that
+ Ubuntu 15.10 contains Archive::Zip v 1.49 that apparently has a bug that
  creating/updating a zip archive file does not close it , and creating
  many files generates "too many open files" error similar to this -
  
  IO error: Can't open <.......>: Too many open files at /usr/share/perl5/Archive/Zip/FileMember.pm line 40. Archive::Zip::FileMember::_openFile(Archive::Zip::ZipFileMember=HASH(0x23e62b0)) called at /usr/share/perl5/Archive/Zip/FileMember.pm line 30 Archive::Zip::FileMember::fh(Archive::Zip::ZipFileMember=HASH(0x23e62b0)) called at /usr/share/perl5/Archive/Zip/ZipFileMember.pm line 384 Archive::Zip::ZipFileMember::rewindData(Archive::Zip::ZipFileMember=HASH(0x23e62b0)) called at /usr/share/perl5/Archive/Zip/Member.pm line 1059 Archive::Zip::Member::_writeToFileHandle(Archive::Zip::ZipFileMember=HASH(0x23e62b0), IO::File=GLOB(0x24399d0), 1, 0) called at /usr/share/perl5/Archive/Zip/Archive.pm line 420 Archive::Zip::Archive::writeToFileHandle(Archive::Zip::Archive=HASH(0x242eda8), IO::File=GLOB(0x24399d0)) called at /usr/share/perl5/Archive/Zip/Archive.pm line 456 Archive::Zip::Archive::overwriteAs(Archive::Zip::Archive=HASH(0x242eda8), "<.......>") called at /usr/share/perl5/Archive/Zip/Archive.pm line 440
  Archive::Zip::Archive::overwrite(Archive::Zip::Archive=HASH(0x242eda8)) called at ./arcoper.pl line 57
  
  lsof -p <pid>    shows all /tmp/*zip files deleted, but still open, up to max open files  (1000  which is system default)
  Increasing number of files in limits.conf makes the problem generate less frequently.
  
  installing latest version 1.56  from cpan fixes the problem - Using many
  zip files correctly  closes them, does not generate errors, and lsof -p
  <pid> shows only several files (less than 20)

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

Title:
  Archive::Zip does not close archive files

Status in libarchive-zip-perl package in Ubuntu:
  New

Bug description:
  Ubuntu 15.10 contains Archive::Zip v 1.49 that apparently has a bug
  that creating/updating a zip archive file does not close it , and
  creating many files generates "too many open files" error similar to
  this -

  IO error: Can't open <.......>: Too many open files at /usr/share/perl5/Archive/Zip/FileMember.pm line 40. Archive::Zip::FileMember::_openFile(Archive::Zip::ZipFileMember=HASH(0x23e62b0)) called at /usr/share/perl5/Archive/Zip/FileMember.pm line 30 Archive::Zip::FileMember::fh(Archive::Zip::ZipFileMember=HASH(0x23e62b0)) called at /usr/share/perl5/Archive/Zip/ZipFileMember.pm line 384 Archive::Zip::ZipFileMember::rewindData(Archive::Zip::ZipFileMember=HASH(0x23e62b0)) called at /usr/share/perl5/Archive/Zip/Member.pm line 1059 Archive::Zip::Member::_writeToFileHandle(Archive::Zip::ZipFileMember=HASH(0x23e62b0), IO::File=GLOB(0x24399d0), 1, 0) called at /usr/share/perl5/Archive/Zip/Archive.pm line 420 Archive::Zip::Archive::writeToFileHandle(Archive::Zip::Archive=HASH(0x242eda8), IO::File=GLOB(0x24399d0)) called at /usr/share/perl5/Archive/Zip/Archive.pm line 456 Archive::Zip::Archive::overwriteAs(Archive::Zip::Archive=HASH(0x242eda8), "<.......>") called at /usr/share/perl5/Archive/Zip/Archive.pm line 440
  Archive::Zip::Archive::overwrite(Archive::Zip::Archive=HASH(0x242eda8)) called at ./arcoper.pl line 57

  lsof -p <pid>    shows all /tmp/*zip files deleted, but still open, up to max open files  (1000  which is system default)
  Increasing number of files in limits.conf makes the problem generate less frequently.

  installing latest version 1.56  from cpan fixes the problem - Using
  many zip files correctly  closes them, does not generate errors, and
  lsof -p <pid> shows only several files (less than 20)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libarchive-zip-perl/+bug/1535121/+subscriptions



More information about the foundations-bugs mailing list