Opened 4 years ago

Last modified 4 years ago

#12116 new bug

package create fails with file too large

Reported by: jessicah Owned by: bonefish
Priority: normal Milestone: Unscheduled
Component: Kits/Package Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Trying to create a package from a directory of size 3.7G fails with package create.

~> du -s -h texlive_x86
3.7G    texlive_x86
~> package create -C texlive_x86 texlive.hpkg
Failed to write data: File too large

Which appears to come from https://github.com/haiku/haiku/blob/master/src/kits/package/hpkg/PackageFileHeapWriter.cpp#L584

Change History (4)

comment:1 Changed 4 years ago by bonefish

Alas, I won't have the time to debug this anytime soon. Could you get an strace, so we can at least see whether the error comes from a syscall and whether the size argument is sensible?

If the error is indeed reported by PackageFileHeapWriter::_WriteDataUncompressed(), it's probably a bug in the PackageFileHeapWriter as the method is only called for writing individual chunks -- which are <= 64 KiB -- and the chunk size table -- which requires roughly 1/4096th of the total size of the uncompressed data, i.e. the critical data size limit is about 8 TiB.

comment:2 Changed 4 years ago by jessicah

The interesting line from strace is the following:

[ 10765] _kern_write(0x2, 0xffffffffffffffff, 0x7282fb08, 0x25) = 0x00000025 (8 us)

comment:3 Changed 4 years ago by jessicah

The first time I ran it, however, it actually succeeded. Second and third times it failed, both with slightly different file sizes.

This was the basic outline of my bash session of success/failure:

~> pamrel strace -T -s package create -C texlive_x86 tl.hpkg
# succeeded, although I didn't end up getting a URL printed
# or copied to the clipboard...
~> package create -C texlive_x86 tl2.hpkg
# failed
~> strace -o trace.log package create -C texlive_x86 tl3.hpkg
# failed
~> ls -l
total 4374994
drwxr-xr-x 1 jessica root       2048 Jun  4 12:42 texlive_x86
drwxr-xr-x 1 jessica root       2048 Jun  4 12:41 texlive_x86_devel
-rw-r--r-- 1 jessica root 2135392416 Jun  4 13:01 tl.hpkg
-rw-r--r-- 1 jessica root 1186638081 Jun  4 13:25 tl2.hpkg
-rw-r--r-- 1 jessica root 1135415397 Jun  4 13:44 tl3.hpkg
-rw-r--r-- 1 jessica root       2746 Jun  4 13:50 trace-tail.log
-rw-r--r-- 1 jessica root   20262374 Jun  4 13:44 trace.log

where "pamrel" is defined in my bash profile as:

function pamrel {
        ( echo $PWD\> $@ ; $@ ) |& tee /dev/tty | curl -s -F 'content=<-' http://pamrel.lu | tee /dev/tty | clipboard -i
}

comment:4 in reply to:  2 Changed 4 years ago by bonefish

Replying to jessicah:

The interesting line from strace is the following:

[ 10765] _kern_write(0x2, 0xffffffffffffffff, 0x7282fb08, 0x25) = 0x00000025 (8 us)

No, that's actually the error message to stderr (37 bytes written successfully).

Note: See TracTickets for help on using tickets.