Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build virtual switch with SONIC_BUILD_JOBS=4 #1738

Open
dnsflood opened this issue Jul 5, 2024 · 2 comments
Open

Failed to build virtual switch with SONIC_BUILD_JOBS=4 #1738

dnsflood opened this issue Jul 5, 2024 · 2 comments

Comments

@dnsflood
Copy link

dnsflood commented Jul 5, 2024

Hi,

When SONIC_BUILD_JOBS is set to 4, make all results in an error, whereas the build proceeds normally when SONIC_BUILD_JOBS is set to 1. Is this a bug?

git checkout master

make init
make configure PLATFORM=vs
make SONIC_BUILD_JOBS=4 all

Below is the error log:

[ FAIL LOG START ] [ target/sonic-vs.bin__vs__rfs.squashfs ]
Build start time: Fri Jul 5 12:25:11 UTC 2024
++ '[' -f .arch ']'
++ cat .arch

  • CONFIGURED_ARCH=amd64
  • DOCKER_VERSION=5:24.0.2-1debian.12bookworm
  • CONTAINERD_IO_VERSION=1.6.21-1
  • LINUX_KERNEL_VERSION=6.1.0-11-2
  • FILESYSTEM_ROOT=./fsroot
  • PLATFORM_DIR=platform
  • HOSTNAME=sonic
  • DEFAULT_USERINFO='Default admin user,,,'
  • BUILD_TOOL_PATH=src/sonic-build-hooks/buildinfo
  • TRUSTED_GPG_DIR=src/sonic-build-hooks/buildinfo/trusted.gpg.d
  • . ./onie-image.conf
    ++ : 32768
    ++ : x86_64
    ++ : vs
    ++ ONIEIMAGE_VERSION=r0
    ++ FILESYSTEM_ROOT=./fsroot-vs
    ++ FILESYSTEM_SQUASHFS=fs.squashfs
    ++ INSTALLER_PAYLOAD=fs.zip
    ++ FILESYSTEM_DOCKERFS=dockerfs.tar.gz
    ++ DOCKERFS_DIR=docker
    ++ DOCKER_RAMFS_SIZE=2500M
    ++ OUTPUT_ONIE_IMAGE=target/sonic-vs.bin
    ++ OUTPUT_RAW_IMAGE=target/sonic-vs.raw
    ++ RAW_IMAGE_DISK_SIZE=10700
    ++ OUTPUT_KVM_IMAGE=target/sonic-vs.img
    ++ KVM_IMAGE_DISK_SIZE=16
    ++ OUTPUT_ABOOT_IMAGE=target/sonic-aboot-vs.swi
    ++ ABOOT_BOOT_IMAGE=.sonic-boot.swi
    ++ OUTPUT_KVM_4ASIC_IMAGE=target/sonic-4asic-vs.img
    ++ OUTPUT_KVM_6ASIC_IMAGE=target/sonic-6asic-vs.img
    ++ OUTPUT_DSC_IMAGE=target/sonic-vs.tar
  • '[' -n 32768 ']'
  • '[' -n fs.zip ']'
  • '[' -n fs.squashfs ']'
  • '[' onie = aboot ']'
  • [[ n != y ]]
  • [[ -d ./fsroot-vs ]]
  • sudo rm -rf ./fsroot-vs
  • mkdir -p ./fsroot-vs
  • mkdir -p ./fsroot-vs/platform
  • touch ./fsroot-vs/platform/firsttime
  • bootloader_packages=
  • '[' grub '!=' aboot ']'
  • mkdir -p ./fsroot-vs/platform/grub
  • bootloader_packages=grub2-common
  • sudo mount proc /proc -t proc
    mount: /proc: proc already mounted on /proc.
    dmesg(1) may have more information after failed mount system call.
  • true
  • echo '[INFO] Build host debian base system...'
    [INFO] Build host debian base system...
  • TARGET_PATH=target
  • scripts/build_debian_base_system.sh amd64 bookworm ./fsroot-vs
    mknod: /sonic/fsroot-vs/test-dev-null: File exists
    E: Cannot install into target '/sonic/fsroot-vs' mounted with noexec or nodev
    [ FAIL LOG END ] [ target/sonic-vs.bin__vs__rfs.squashfs ]
    make: *** [slave.mk:1299: target/sonic-vs.bin__vs__rfs.squashfs] Error 1
    make[1]: *** [Makefile.work:604: all] Error 2
@mrafatpanah
Copy link

Hello. I had the same problem. I also don't know if it is a bug.
I built it with SONIC_BUILD_JOBS=4 till this error happened and then I didn't use SONIC_BUILD_JOBS and built with its default mode.

@dnsflood
Copy link
Author

Hello. I had the same problem. I also don't know if it is a bug. I built it with SONIC_BUILD_JOBS=4 till this error happened and then I didn't use SONIC_BUILD_JOBS and built with its default mode.

Hi, I think this might not be considered a bug. The issue arises when multiple final targets are being built in parallel, as these concurrent build tasks use some of the same files, including the root file system, scripts, etc. The solution is to run the build tasks separately for each final target, and you can still use the SONIC_BUILD_JOBS=x option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants