Mender-convert fails: error deallocating

I’m running mender-convert on MacOs.

When I run this command:

MENDER_ARTIFACT_NAME=mike-release-1.0 ./docker-mender-convert
–disk-image input/$INPUT_DISK_IMAGE
–config configs/comfile_pi_config
–overlay rootfs_overlay_prod

It runs for quite awhile, everything seems to be going fine, then right near the end, I get this message:

2020-10-23 17:29:00 [INFO] [mender-convert-package] Copying root filesystem image to deploy directory
mender-convert-package has finished. Cleaning up…
2020-10-23 17:29:00 [ERROR] [mender-convert] mender-convert failed
2020-10-23 17:29:00 [DEBUG] [mender-convert-package] When running: (./mender-convert-package:203): run_and_log_cmd():

    cp --sparse=always work/rootfs.img deploy/golden-raspberrypi3-mender.ext4
    cp: error deallocating 'deploy/golden-raspberrypi3-mender.ext4': Invalid argument

2020-10-23 17:29:00 [ERROR] [mender-convert] mender-convert failed

Has anyone else ever encountered something like this?

Hi @jmeirow I’ve never run this under MacOS but since it’s running under docker, in theory it should work. My guess it that it’s a resource allocation issue of some kind. Is it possible that you are low on disk space or system RAM?


It is possible I’m running low on memory, as I’m running some VMs on this Mac as well. For the moment, i am actually going to move the mender-convert onto the VM (Ubuntu Server LTS 18.04) and see how that goes.

1 Like

I am having the same issue on Mac OS - but the setup definitely worked before.

It’s so interesting you mention that. It’s worked for me dozens and dozens of times before on MacOS, and then it just stopped working. Weird. At least we both know we aren’t the only one :slight_smile:

I really need to plow ahead so I’m building a new build machine on Linux (a VM).

Can anyone from the mender Team say anything about this? Is this a confirmed bug caused by some Mac OS Update?

Does it still fail when running in a Linux VM? Knowing the outcome of that test would help narrow the problem causes.

Also what version of Macos?
What filesystem is your Macos drive/s using?
Did you Macos undergo an update recently?

My apologies for not updating this sooner. Not only does run without error on Linux (Ubuntu LTS 20.04), but it runs many times faster, literally. On my MacBook Pro, which is no slouch, it used to take 45-50 minutes. Now on Ubuntu, running in a VM on the same Mac, it runs in 5-7 minutes.

My Mac is running Mojave (10.14.6). I can’t speak to recent OS updates as it’s controlled by corporate. Disk Utility reports that the file system is APFS.

As to the speed, i have seen past reports of general performance issues between docker and MacOS running APFS file systems. I was also wondering if the APFS file system was also causing a problem for the sparse copy process in your error message as I have seen similar issues in other projects relating to ZFS.

I don’t have any macs to test only Linux machines, but if i did the next thing i would test would be to run docker on an HFS+ system (or external drive) not APFS, just to rule it in or out as a cause.