Description of problem: Somehow in Fedora 21 the uncompression stage takes much longer than it used to: $ virt-builder fedora-20 [ 1.0] Downloading: http://libguestfs.org/download/builder/fedora-20.xz [ 2.0] Planning how to build this image [ 2.0] Uncompressing <---- [ 98.0] Opening the new disk <----- This used to be something like 10 seconds. Version-Release number of selected component (if applicable): libguestfs 1.29.24 xz-5.1.2-14alpha.fc21.x86_64 How reproducible: Unknown - I don't have exact measurements from previously.
This turned out to be caused by: https://github.com/libguestfs/libguestfs/commit/9135129b0f6e8eb171131ea0f7d729a960b74cb3 where two stack buffers had been changed to pointers: - uint8_t buf[BUFFER_SIZE]; - unsigned char outbuf[BUFFER_SIZE]; + CLEANUP_FREE uint8_t *buf = NULL; + CLEANUP_FREE uint8_t *outbuf = NULL; but we were still using sizeof buf to calculate the size of the buffer. sizeof buf == 8 so the original code which used large buffers for reading/writing the file changed to using 8 byte buffers. Upstream fix coming shortly. Luckily this doesn't affect any stable branches.
https://github.com/libguestfs/libguestfs/commit/ff1cf989fd49cfb82db428e66034c7b2d6bebe8a