Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 927766

Summary: app-arch/lrzip-0.651: "Unable to allocate enough memory for operation" on 32-bit architectures (was: app-arch/libarchive-3.7.2-r2 fails tests)
Product: Gentoo Linux Reporter: matoro <matoro_gentoo>
Component: Current packagesAssignee: Joshua Kinard <kumba>
Status: CONFIRMED ---    
Severity: normal CC: arm, kumba, matoro_gentoo, mgorny, x86
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=916317
https://github.com/ckolivas/lrzip/issues/249
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log and emerge --info (x86)
build.log and emerge --info (arm)

Description matoro archtester 2024-03-25 05:11:56 UTC
These failures are identical on x86 and arm, but do NOT appear on ppc or hppa.


test_write_filter_lrzip
 
/var/tmp/portage/app-arch/libarchive-3.7.2-r2/work/libarchive-3.7.2/libarchive/test/test_write_filter_lrzip.c:78: ARCHIVE_OK != archive_write_close(a)
      ARCHIVE_OK=0 (0x0, 00)
      archive_write_close(a)=-30 (0xffffffffffffffe2, 01777777777777777777742)
    errno: 5
   detail: Error closing program: lrzip
/var/tmp/portage/app-arch/libarchive-3.7.2-r2/work/libarchive-3.7.2/libarchive/test/test_write_filter_lrzip.c:88: ARCHIVE_OK != archive_read_next_header(a, &ae)
      ARCHIVE_OK=0 (0x0, 00)
      archive_read_next_header(a, &ae)=1 (0x1, 01)
/var/tmp/portage/app-arch/libarchive-3.7.2-r2/work/libarchive-3.7.2/libarchive/test/test_write_filter_lrzip.c:94: ARCHIVE_FILTER_LRZIP != archive_filter_code(a, 0)
      ARCHIVE_FILTER_LRZIP=10 (0xa, 012)
      archive_filter_code(a, 0)=0 (0x0, 00)
/var/tmp/portage/app-arch/libarchive-3.7.2-r2/work/libarchive-3.7.2/libarchive/test/test_write_filter_lrzip.c:95: "lrzip" != archive_filter_name(a, 0)
                        "lrzip" = "lrzip" (length 5)
      archive_filter_name(a, 0) = "none" (length 4)
/var/tmp/portage/app-arch/libarchive-3.7.2-r2/work/libarchive-3.7.2/libarchive/test/test_write_filter_lrzip.c:123: ARCHIVE_OK != archive_write_close(a)
      ARCHIVE_OK=0 (0x0, 00)
      archive_write_close(a)=-30 (0xffffffffffffffe2, 01777777777777777777742)


test_option_lrzip
 
/var/tmp/portage/app-arch/libarchive-3.7.2-r2/work/libarchive-3.7.2/tar/test/test_option_lrzip.c:43: 0 != systemf("%s -cf - --lrzip f >archive.out 2>archive.err", testprog)
      0=0 (0x0, 00)
      systemf("%s -cf - --lrzip f >archive.out 2>archive.err", testprog)=256 (0x100, 0400)
/var/tmp/portage/app-arch/libarchive-3.7.2-r2/work/libarchive-3.7.2/tar/test/test_option_lrzip.c:51: Assertion failed: s > 2
/var/tmp/portage/app-arch/libarchive-3.7.2-r2/work/libarchive-3.7.2/tar/test/test_option_lrzip.c:52: p != "LRZI\x00"
      size 5 = 5
      Dump of p
0000_00_97_12_5d_00                                  ...].
      Dump of "LRZI\x00"
0000_4c_52_5a_49_00                                  LRZI.


test_option_lrzip
 
/var/tmp/portage/app-arch/libarchive-3.7.2-r2/work/libarchive-3.7.2/cpio/test/test_option_lrzip.c:43: 0 != systemf("echo f | %s -o --lrzip >archive.out 2>archive.err", testprog)
      0=0 (0x0, 00)
      systemf("echo f | %s -o --lrzip >archive.out 2>archive.err", testprog)=256 (0x100, 0400)
/var/tmp/portage/app-arch/libarchive-3.7.2-r2/work/libarchive-3.7.2/cpio/test/test_option_lrzip.c:50: Assertion failed: s > 2
/var/tmp/portage/app-arch/libarchive-3.7.2-r2/work/libarchive-3.7.2/cpio/test/test_option_lrzip.c:51: p != "LRZI\x00"
      size 5 = 5
      Dump of p
0000_00_e9_05_00_00                                  .....
      Dump of "LRZI\x00"
0000_4c_52_5a_49_00                                  LRZI.

Reproducible: Always
Comment 1 matoro archtester 2024-03-25 05:12:29 UTC
Created attachment 888488 [details]
build.log and emerge --info (x86)
Comment 2 matoro archtester 2024-03-25 05:12:43 UTC
Created attachment 888489 [details]
build.log and emerge --info (arm)
Comment 3 matoro archtester 2024-03-25 05:13:32 UTC
The contents of the detailed files are listed out in their entirety in the first post.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-25 14:48:05 UTC
It's lrzip being broken:

$ touch foo
$ lrzip foo
Output filename is: foo.lrz
Warning, low memory for chosen compression settings
Unable to allocate enough memory for operation
Failed to open streams in rzip_chunk
Fatal error - exiting
Comment 5 matoro archtester 2024-03-25 14:56:54 UTC
Ah, I was extremely confused why this didn't show up on ppc or hppa, it's because I have only 8 cores allocated to the VM for the former, and the latter has only 2 physical cores, but my laptop has 32 threads, and my arm board has 16 cores.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-25 15:06:06 UTC
Tried to find a workaround but lrzip.conf doesn't have an option for threads, they don't have an envvar to pass command-line options, and they don't respect CPU affinity.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-25 15:21:30 UTC
Ok, I have a good enough workaround.
Comment 8 Larry the Git Cow gentoo-dev 2024-03-25 15:21:38 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e114143d342fb2a6fbdce93eac3484af8ad9f1e8

commit e114143d342fb2a6fbdce93eac3484af8ad9f1e8
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-03-25 15:21:06 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-03-25 15:21:34 +0000

    app-arch/libarchive: Workaround lrzip bug on 32-bit arch tests
    
    Bug: https://bugs.gentoo.org/927766
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 app-arch/libarchive/libarchive-3.7.2-r2.ebuild | 7 +++++++
 1 file changed, 7 insertions(+)
Comment 9 Joshua Kinard gentoo-dev 2024-03-25 15:50:36 UTC
Can you see if this is also reproducible on app-arch/lrzip-next?  It's a fork of the original lrzip that has an active upstream maintainer that I added a few weeks ago.
Comment 10 matoro archtester 2024-03-25 15:54:15 UTC
(In reply to Joshua Kinard from comment #9)
> Can you see if this is also reproducible on app-arch/lrzip-next?  It's a
> fork of the original lrzip that has an active upstream maintainer that I
> added a few weeks ago.

Seems to be explicitly unsupported.

checking size of long... 4
configure: error: Size of long type is 4 bytes. 32 bit processors are NO LONGER supported in lrzip-next
Comment 11 Joshua Kinard gentoo-dev 2024-03-25 16:46:26 UTC
(In reply to matoro from comment #10)
> (In reply to Joshua Kinard from comment #9)
> > Can you see if this is also reproducible on app-arch/lrzip-next?  It's a
> > fork of the original lrzip that has an active upstream maintainer that I
> > added a few weeks ago.
> 
> Seems to be explicitly unsupported.
> 
> checking size of long... 4
> configure: error: Size of long type is 4 bytes. 32 bit processors are NO
> LONGER supported in lrzip-next

Derp, I forgot about that.  ago's tinderbox script reported that under Bug #925548, so I removed all 32-bit keywords.