cowbuilder debugging

Yes
sudo apt install clang-tidy
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
clang-7 clang-tidy-7 clang-tools-7 lib32gcc1 lib32stdc++6 libc6-i386 libclang-common-7-dev libclang1-7 libedit2 libgc1c2 libllvm7 libobjc-8-dev libobjc4 libyaml-0-2 python-yaml
Suggested packages:
clang-7-doc
Recommended packages:
llvm-7-dev libomp-7-dev
The following NEW packages will be installed:
clang-7 clang-tidy clang-tidy-7 clang-tools-7 lib32gcc1 lib32stdc++6 libc6-i386 libclang-common-7-dev libclang1-7 libedit2 libgc1c2 libllvm7 libobjc-8-dev libobjc4 libyaml-0-2 python-yaml
0 upgraded, 16 newly installed, 0 to remove and 0 not upgraded.
Need to get 95.2 MB of archives.
After this operation, 430 MB of additional disk space will be used.
Do you want to continue? [Y/n]

1 Like

Installation finishes without error?

Yes

1 Like

Alright. Strange but… Let’s see.

cd into helper-scripts

cd helper-scripts

Folder ~/genmkfile-packages-result needs to exist.

mkdir ~/genmkfile-packages-result

Build using cowbuilder.

make_cowbuilder_dist_folder=~/genmkfile-packages-result make_use_cowbuilder=true make deb-pkg

And if helper-scripts can be build successfully using cowbuilder, try building hardened malloc with it.

Btw if you git cloned Whonix (to build Whonix images) then all sources of all packages are already on the disk in folder

~/Whonix/packages

OK this exited with 0 status make_cowbuilder_dist_folder=~/genmkfile-packages-result make_use_cowbuilder=true make deb-pkg

Everything seems OK, maybe I should try to build Whonix-Host 15.0.0.4.5?

1 Like

So both helper-scripts as well as hardened malloc could be build using cowbuilder successfully?

Success also meaning… Packages are build and can be found in this folder…?

~/genmkfile-packages-result

What is the exact command here for hardened_malloc?

cd  hardened_malloc
make_cowbuilder_dist_folder=~/genmkfile-packages-result make_use_cowbuilder=true make hardened_malloc
make: *** No rule to make target 'hardened_malloc'.  Stop.
1 Like

Can’t hurt but I wouldn’t be surprised if you run into same original issue Whonix Desktop Installer with Calamares - field report - #132 by onion_knight.

Always same.

make_cowbuilder_dist_folder=~/genmkfile-packages-result make_use_cowbuilder=true make deb-pkg

hardened_malloc failed

Unpacking llvm-7-dev (1:7.0.1-8) ...
E: Sub-process /usr/bin/dpkg exited unexpectedly
Setting up libncurses-dev:amd64 (6.1+20181013-2) ...
Setting up libgc1c2:amd64 (1:7.6.4-0.4) ...
Setting up libyaml-0-2:amd64 (0.2.1-1) ...
Setting up libedit2:amd64 (3.1-20181209-1) ...
Setting up libobjc4:amd64 (8.3.0-6) ...
Setting up libffi-dev:amd64 (3.2.1-9) ...
Setting up libobjc-8-dev:amd64 (8.3.0-6) ...
Setting up binfmt-support (2.2.0-2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/binfmt-support.service -> /lib/systemd/system/binfmt-support.service.
Running in chroot, ignoring request.
invoke-rc.d: policy-rc.d denied execution of start.
Setting up libc6-i386 (2.28-10) ...
Setting up libllvm7:amd64 (1:7.0.1-8) ...
Setting up python-yaml (3.13-2) ...
Setting up libclang1-7 (1:7.0.1-8) ...
Setting up libtinfo-dev:amd64 (6.1+20181013-2) ...
Setting up llvm-7-runtime (1:7.0.1-8) ...
Setting up llvm-7 (1:7.0.1-8) ...
Setting up lib32gcc1 (1:8.3.0-6) ...
Setting up lib32stdc++6 (8.3.0-6) ...
Setting up libclang-common-7-dev (1:7.0.1-8) ...
Setting up clang-7 (1:7.0.1-8) ...
Setting up clang-tools-7 (1:7.0.1-8) ...
Setting up clang (1:7.0-47) ...
Setting up clang-tidy-7 (1:7.0.1-8) ...
Setting up clang-tidy (1:7.0-47) ...
Processing triggers for systemd (241-5) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...
[ ERR] Writing extended state information
[ ERR] Building tag database

Current status: 0 (-1) broken, 1 (+1) upgradable.
E: Failed to fork process for dpkg selections.
E: failed to save selections to dpkg database
E: pbuilder-satisfydepends failed.
I: Copying back the cached apt archive contents
I: new cache content 'llvm-7-dev_1%3a7.0.1-8_amd64.deb' added
I: new cache content 'llvm-7_1%3a7.0.1-8_amd64.deb' added
I: new cache content 'llvm-7-runtime_1%3a7.0.1-8_amd64.deb' added
I: new cache content 'libtinfo-dev_6.1+20181013-2_amd64.deb' added
I: new cache content 'libncurses-dev_6.1+20181013-2_amd64.deb' added
I: new cache content 'libffi-dev_3.2.1-9_amd64.deb' added
I: new cache content 'clang-tidy_1%3a7.0-47_amd64.deb' added
I: new cache content 'clang-tidy-7_1%3a7.0.1-8_amd64.deb' added
I: new cache content 'python-yaml_3.13-2_amd64.deb' added
I: new cache content 'clang-tools-7_1%3a7.0.1-8_amd64.deb' added
I: new cache content 'clang_1%3a7.0-47_amd64.deb' added
I: new cache content 'clang-7_1%3a7.0.1-8_amd64.deb' added
I: new cache content 'libclang1-7_1%3a7.0.1-8_amd64.deb' added
I: new cache content 'libclang-common-7-dev_1%3a7.0.1-8_amd64.deb' added
I: new cache content 'lib32stdc++6_8.3.0-6_amd64.deb' added
I: new cache content 'lib32gcc1_1%3a8.3.0-6_amd64.deb' added
I: new cache content 'libc6-i386_2.28-10_amd64.deb' added
I: new cache content 'libobjc-8-dev_8.3.0-6_amd64.deb' added
I: new cache content 'libobjc4_8.3.0-6_amd64.deb' added
I: new cache content 'libgc1c2_1%3a7.6.4-0.4_amd64.deb' added
I: new cache content 'libllvm7_1%3a7.0.1-8_amd64.deb' added
I: new cache content 'libedit2_3.1-20181209-1_amd64.deb' added
I: new cache content 'binfmt-support_2.2.0-2_amd64.deb' added
I: unmounting dev/ptmx filesystem
I: unmounting dev/pts filesystem
I: unmounting dev/shm filesystem
I: unmounting proc filesystem
I: unmounting sys filesystem
I: Cleaning COW directory
I: forking: rm -rf /var/cache/pbuilder/cow.cow_amd64/cow.2017
++ error_handler_pre
++ local exit_code=1
++ local 'last_err=sudo $COWBUILDER_PREFIX cowbuilder --build "$make_main_dsc_file" $make_cowbuilder_arch_opt --basepath "$base_folder" --buildplace "$cow_folder" --distribution "$make_cowbuilder_distribution" --mirror "$make_cowbuilder_mirror" --extrapackages "$make_deb_build_dependencies" --buildresult "$DISTDIR"'
++ '[' '!' 1 = 1 ']'
++ '[' '' = '' ']'
++ output='## See above.'
++ force_echo '
####################################################################
## BEGIN ERROR in /usr/share/genmkfile/make-helper-one.bsh detected!
##
## ERROR LOG:
## See above.
##
## BASH_COMMAND: sudo $COWBUILDER_PREFIX cowbuilder --build "$make_main_dsc_file" $make_cowbuilder_arch_opt --basepath "$base_folder" --buildplace "$cow_folder" --distribution "$make_cowbuilder_distribution" --mirror "$make_cowbuilder_mirror" --extrapackages "$make_deb_build_dependencies" --buildresult "$DISTDIR"
## EXIT_CODE: 1
##
## END ERROR in /usr/share/genmkfile/make-helper-one.bsh detected!
## Please report this bug!
####################################################################
'
1 Like

Yes

ls ~/genmkfile-packages-result/
hardened-malloc_0.6-1.debian.tar.xz  hardened-malloc_0.6.orig.tar.xz  helper-scripts_6.5-1_amd64.buildinfo  helper-scripts_6.5-1.debian.tar.xz  helper-scripts_6.5.orig.tar.xz
hardened-malloc_0.6-1.dsc            helper-scripts_6.5-1_all.deb     helper-scripts_6.5-1_amd64.changes    helper-scripts_6.5-1.dsc
1 Like

Same issue as in original report.

Yes

Should I retry with a new VM from scratch? Maybe we are losing time debugging some weird bug when I could try anew with a fresh VM?

1 Like

I would hope that would work, but I don’t know. Worth trying in fresh VM.

Likely a low RAM issue. I managed to reproduce this using a Whonix VM with default 2 GB RAM.

While trying to debug kswapd0 process had high CPU and system responded in time lapse.

Increasing VM RAM to 4 GB RAM and I am past that build bug.

root cause - maybe: cowbuilder or something using aptitude. And then aptitude, dpkg or postinst showing obscure error messages and no out of RAM error.

Can you please add signify-openbsd as a buildtime dep and also state the min resource requirements on thie build guide page?

https://github.com/Whonix/Whonix/blob/master/buildconfig.d/30_dependencies.conf#L128

1 Like