#1021341 please stop using zerofree

#1021341#5
Date:
2022-10-06 09:19:25 UTC
From:
To:
Hi,

autopkgtest-build-qemu assumes that zerofree is installed, but it does
not depend on the relevant package.

[...]
2022-09-23 20:26:11 INFO Calling <bound method MountStepRunner.teardown of <mount_plugin.MountStepRunner object at 0x7f89cffd2ce0>>
2022-09-23 20:26:11 DEBUG Unmounting /tmp/tmp4a9yk5hg and everything on top of it
2022-09-23 20:26:12 DEBUG Finished unmounting /tmp/tmp4a9yk5hg
2022-09-23 20:26:12 INFO Exec: ['zerofree', '-v', '/dev/mapper/loop0p1']
2022-09-23 20:26:12 ERROR [Errno 2] No such file or directory: 'zerofree'

#1021341#10
Date:
2022-12-16 20:11:40 UTC
From:
To:
Control: reassign -1 vmdb2/0.25-1
Control: retitle -1 vmdb2: Add dependency on zerofree

It's actually missing in vmdb2, the utility that autopkgtest uses to
build the actual images.

#1021341#21
Date:
2023-09-17 16:56:55 UTC
From:
To:
Please do not add dependency on zerofree.

Instead, pleas DROP zerofree usage entirely in todays world.

It gave me multiple headaches already.

First I tried to experiment with autopkgtest (which uses vmdb2)
on a tmpfs.  It all went fine until vmdb2 decided to helpfully
zerofree the image, - which expanded it to whole RAM and immediately
caused an OOM.  I had to clean up from this for quite some time.

Another case is an SSD which gets filled with zeros, having to
allocate else unused blocks in the image file.

And yet another - on a regular rotating HDD, it has to turn a
sparse file into complete file, - in a typical autopkgtest-build-qemu
use case this means writing 25Gb of data, it is insanely slow.

If anything, one can use fstrim to achieve the desired result.

Thanks!

/mjt

#1021341#30
Date:
2023-10-05 18:53:01 UTC
From:
To:
Cc += Emanuele, Christian.

Michael Tokarev <mjt@tls.msk.ru> (2023-09-17):

Please file a separate bug report instead of hijacking that one.

Bumping severity to serious because getting autopkgtest-build-qemu
to work is much harder than it should be (as evidenced by recurring
conversations on #debian-devel at least), and getting avoidable errors
doesn't help.


Cheers,

#1021341#41
Date:
2023-11-11 16:30:27 UTC
From:
To:
design decision from our upstream author, I prefer adding a Cc: to
Lars and ask him to consider switching from zerofree over to fstim,
maybe he has reasons not to.

Greetings,

   -Gunnar

#1021341#46
Date:
2023-11-11 16:42:21 UTC
From:
To:

vmdb2 uses zerofree by default so that the generated image will compress to
be smaller. This is important for my own use cases.

If this isn't great for other use cases, one can avoid the zerofree by
adding `zerofree: false` to the `mount` step. See
<https://vmdb2-manual.liw.fi/#step-mount> for details.

I'm happy to consider a patch to use fstrim instead of zerofree, but I'm
not likely to make one myself any time soon, sorry.

#1021341#51
Date:
2023-11-11 21:36:00 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
vmdb2, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1021341@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Gunnar Wolf <gwolf@debian.org> (supplier of updated vmdb2 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sat, 11 Nov 2023 09:24:49 -0600
Source: vmdb2
Architecture: source
Version: 0.28-1
Distribution: unstable
Urgency: medium
Maintainer: Gunnar Wolf <gwolf@debian.org>
Changed-By: Gunnar Wolf <gwolf@debian.org>
Closes: 1021341 1052123
Changes:
 vmdb2 (0.28-1) unstable; urgency=medium
 .
   * New upstream release
   * Added a Recommends: on zerofree (Closes: #1021341)
   * Qemu-debootstrap removed in previous version; had to reintroduce it
     due to . Now it's properly removed (Closes: #1052123)
   * Drop yarns from the build process, as it was dropped by upstream as
     no-longer-useful (commit c98be82)
Checksums-Sha1:
 57122501bdf366bc83cd8d4c595c80c1559df4a5 1378 vmdb2_0.28-1.dsc
 41cc8d82b2e00717759a0b52d3ecd1cec7e23ac3 46892 vmdb2_0.28.orig.tar.xz
 c1adb3a0f1aa14ae593b6a76528711e1120212bb 4708 vmdb2_0.28-1.debian.tar.xz
 df9e496a5fa5e6d35813472b168db04b67e7d9a8 9495 vmdb2_0.28-1_source.buildinfo
Checksums-Sha256:
 62e981b47e6a9c78d2fc09520c01b674dfe98645062ecb7d06068c7a76865cfc 1378 vmdb2_0.28-1.dsc
 c5a2dc72a88fc8bdcd7dcb35193022b08d4c13e5bbee1f50bd482a9b58dabb7f 46892 vmdb2_0.28.orig.tar.xz
 6074d5eebb399650264bfef19fad228563d8f1136dc54ce7a0595df1351db79a 4708 vmdb2_0.28-1.debian.tar.xz
 ae0cb0dfa4a9b1bcb21a5841a18aacbeec5f40369fae407834aca711acdbe9af 9495 vmdb2_0.28-1_source.buildinfo
Files:
 7b38afe256ac67c8d619efed3a259aac 1378 admin optional vmdb2_0.28-1.dsc
 955da726e2202dd56bfe189ee2737c80 46892 admin optional vmdb2_0.28.orig.tar.xz
 c3014d4a8e7a9d3817fb7183cba61a0c 4708 admin optional vmdb2_0.28-1.debian.tar.xz
 af6d60aadec8af9477b93d6bf240e5ea 9495 admin optional vmdb2_0.28-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iHUEARYIAB0WIQRNFAUGU6QC1zaHBJ0kBMlUbhRTYAUCZU/vVQAKCRAkBMlUbhRT
YPGFAQDETwvra4Ca/jZ+TGXMy1vm20tjd6ZVl2IV5GxI7lb4+QD+NGA594xwtaA5
zmTqxAPXn2AWWm947Jc2WPY0qV4oRAw=
=+Uxh
-----END PGP SIGNATURE-----