[Pkg-libvirt-maintainers] Bug#1037541: libguestfs: FTBFS: supermin: error: lstat: Value too large for defined data type: /var/tmp/supermin2b73c8.tmpdir/base.d/init

Richard W.M. Jones rjones at redhat.com
Wed Jun 14 12:15:52 BST 2023


[https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1037541]

I think what's happening here is we are using the 31/32 bit lstat
functions in OCaml:

  https://github.com/ocaml/ocaml/blob/3d50c168062e9fdbacf739a73738b10108ff3628/otherlibs/unix/unix.mli#L500

(I guess st_size which is signed 31 bits on armv7, but 63 bits on 64 bit
platforms).  We ought to be using the 64 bit version instead:

  https://github.com/ocaml/ocaml/blob/3d50c168062e9fdbacf739a73738b10108ff3628/otherlibs/unix/unix.mli#L544

The specific problem will be that the size of some file has grown
larger than 1GB resulting in this runtime error, although that seems unusual.

Now we *ought* to be using those functions already because we should
always be doing:

  open Unix
  open Unix.LargeFile

to use the "LargeFile" (64 bit) versions of the functions.  I had a
quick look through the code to see where we are using 'open Unix'
without 'open Unix.LargeFile' but I couldn't find the place, leaving
me confused.

(Of course the other problem is that Fedora has abandoned all 32 bit
platforms long ago so we never test this ...)

Practically my recommendation is to exclude the whole virt stack on
armv7 since it has been years since we tested it.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org



More information about the Pkg-libvirt-maintainers mailing list