Build issue : Chromium OS full version : tar returns error 2 on Ubuntu 20.04 VM

36 views
Skip to first unread message

Praveen Kumar

unread,
Oct 23, 2021, 1:05:09 PM10/23/21
to chromiu...@chromium.org
Hello Everyone,

I am new to Chromium OS and was trying to build the dev environment. During the process of building Chromium OS image (full version) using *https://www.chromium.org/chromium-os/quick-start-guide* on *Ubuntu 20.04 Virtual Machine*, I ended up with below error :

ubuntu@ubuntu-vm:~/chromium/chromiumos$ cros_sdk -- ./build_packages --board=${BOARD}
[82/193][sudo] password for ubuntu:
19:26:33.884: NOTICE: Downloading SDK tarball...
19:32:11.970: NOTICE: Creating chroot. This may take a few minutes...
19:32:11.971: INFO: run: tar --sparse -xf /home/ubuntu/chromium/chromiumos/.cache/sdks/cros-sdk-2021.10.21.052224.tar.xz --directory /home/ubuntu/chromium/chromiumos/chroot --use-compress-program /home/ubuntu/chromium/chromiumos/chromite/scripts/xz_auto
cros_sdk: Unhandled exception:
Traceback (most recent call last):
File "/home/ubuntu/chromium/chromiumos/chromite/lib/cros_build_lib.py", line 1329, in ExtractTarball
result = run(cmd, capture_output=True, encoding='utf-8')
File "/home/ubuntu/chromium/chromiumos/chromite/lib/cros_build_lib.py", line 921, in run
raise RunCommandError(msg, cmd_result)
chromite.lib.cros_build_lib.RunCommandError: return code: 2; command: tar --sparse -xf /home/ubuntu/chromium/chromiumos/.cache/sdks/cros-sdk-2021.10.21.052224.tar.xz --directory /home/ubuntu/chromium/chromiumos/chroot --use-compress-program /home/ubuntu/chromium/chromiumos/chromite/scripts/xz_auto
cmd=['tar', '--sparse', '-xf', '/home/ubuntu/chromium/chromiumos/.cache/sdks/cros-sdk-2021.10.21.052224.tar.xz', '--directory', '/home/ubuntu/chromium/chromiumos/chroot', '--use-compress-program', '/home/ubuntu/chromium/chromiumos/chromite/scripts/xz_auto']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/chromium/chromiumos/chromite/bin/cros_sdk", line 208, in <module>
DoMain()
File "/home/ubuntu/chromium/chromiumos/chromite/bin/cros_sdk", line 204, in DoMain
commandline.ScriptWrapperMain(FindTarget)
File "/home/ubuntu/chromium/chromiumos/chromite/lib/commandline.py", line 1037, in ScriptWrapperMain
ret = target(argv[1:])
File "/home/ubuntu/chromium/chromiumos/chromite/scripts/cros_sdk.py", line 1169, in main
cros_sdk_lib.CreateChroot(
File "/home/ubuntu/chromium/chromiumos/chromite/lib/cros_sdk_lib.py", line 1095, in CreateChroot
ChrootCreator(*args, **kwargs).run()
File "/home/ubuntu/chromium/chromiumos/chromite/lib/cros_sdk_lib.py", line 1073, in run
cros_build_lib.ExtractTarball(self.sdk_tarball, self.chroot_path)
File "/home/ubuntu/chromium/chromiumos/chromite/lib/cros_build_lib.py", line 1331, in ExtractTarball
raise TarballError('An error occurred when attempting to untar %s:\n%s' %
chromite.lib.cros_build_lib.TarballError: return code: None; command:
An error occurred when attempting to untar /home/ubuntu/chromium/chromiumos/.cache/sdks/cros-sdk-2021.10.21.052224.tar.xz:
return code: 2; command: tar --sparse -xf /home/ubuntu/chromium/chromiumos/.cache/sdks/cros-sdk-2021.10.21.052224.tar.xz --directory /home/ubuntu/chromium/chromiumos/chroot --use-compress-program /home/ubuntu/chromium/chromiumos/chromite/scripts/xz_auto
cmd=['tar', '--sparse', '-xf', '/home/ubuntu/chromium/chromiumos/.cache/sdks/cros-sdk-2021.10.21.052224.tar.xz', '--directory', '/home/ubuntu/chromium/chromiumos/chroot', '--use-compress-program', '/home/ubuntu/chromium/chromiumos/chromite/scripts/xz_auto']

Just FYI, BOARD=amd64-generic

tar returning error 2 :
2 Fatal error. This means that some fatal, unrecoverable
error occurred.
It looks like the error may have happened because we are using "--use-compress-program /home/ubuntu/chromium/chromiumos/chromite/scripts/xz_auto" and failure in xz_auto program.

Thus, wanted to check and seek guidance, if we can build the code on VM ? and if yes, can anyone please help resolving this error. Thanks in advance.

Regards,

~Praveen.

Mike Frysinger

unread,
Oct 24, 2021, 8:31:10 AM10/24/21
to Praveen Kumar, chromium-os-dev
do you have xz or pixz installed?
-mike

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-dev

Praveen Kumar

unread,
Oct 25, 2021, 11:13:12 AM10/25/21
to Mike Frysinger, chromium-os-dev
On 24-10-2021 18:00, Mike Frysinger wrote:
> do you have xz or pixz installed?

Yes, I do have xz installed on my VM.

Regards,

~Praveen.

Praveen Kumar

unread,
Oct 25, 2021, 12:51:36 PM10/25/21
to Mike Frysinger, chromium-os-dev
The build is working fine, the problem was low disk space.

Is there a way if we can get the error message displayed correctly instead of err 2 (fatal error) ?
I do see return value for tar doesn't have that information, however, is there a possibility to check errno if that's being set properly ?


19:32:11.971: INFO: run: tar --sparse -xf /home/ubuntu/chromium/chromiumos/.cache/sdks/cros-sdk-2021.10.21.052224.tar.xz --directory /home/ubuntu/chromium/chromiumos/chroot --use-compress-program /home/ubuntu/chromium/chromiumos/chromite/scripts/xz_auto
cros_sdk: Unhandled exception:
Traceback (most recent call last):
File "/home/ubuntu/chromium/chromiumos/chromite/lib/cros_build_lib.py", line 1329, in ExtractTarball
result = run(cmd, capture_output=True, encoding='utf-8')
File "/home/ubuntu/chromium/chromiumos/chromite/lib/cros_build_lib.py", line 921, in run
raise RunCommandError(msg, cmd_result)
chromite.lib.cros_build_lib.RunCommandError: return code: 2; command: tar --sparse -xf /home/ubuntu/chromium/chromiumos/.cache/sdks/cros-sdk-2021.10.21.052224.tar.xz --directory /home/ubuntu/chromium/chromiumos/chroot --use-compress-program /home/ubuntu/chromium/chromiumos/chromite/scripts/xz_auto
cmd=['tar', '--sparse', '-xf', '/home/ubuntu/chromium/chromiumos/.cache/sdks/cros-sdk-2021.10.21.052224.tar.xz', '--directory', '/home/ubuntu/chromium/chromiumos/chroot', '--use-compress-program', '/home/ubuntu/chromium/chromiumos/chromite/scripts/xz_auto']

Regards,

~Praveen.
Reply all
Reply to author
Forward
0 new messages