sonic-net / sonic-buildimage

Scripts which perform an installable binary image build for SONiC
Other
728 stars 1.4k forks source link

Latest Master Build Not Successful #19235

Open wumiaont opened 4 months ago

wumiaont commented 4 months ago

Description

When building the recent sonic-buildimage master, it failed on p4lang. Followings are errors from build output. It is introduced by this commit: https://github.com/sonic-net/sonic-buildimage/pull/18762/

============================================================================ Testsuite summary for PI-proto 0.1

TOTAL: 13

PASS: 10

SKIP: 0

XFAIL: 0

FAIL: 3

XPASS: 0

ERROR: 0

============================================================================ See tests/test-suite.log

make[8]: [Makefile:1045: test-suite.log] Error 1 make[8]: Leaving directory '/sonic/src/p4lang/p4lang-pi-0.1.0/proto/tests' make[7]: [Makefile:1153: check-TESTS] Error 2 make[7]: Leaving directory '/sonic/src/p4lang/p4lang-pi-0.1.0/proto/tests' make[6]: [Makefile:1310: check-am] Error 2 make[6]: Leaving directory '/sonic/src/p4lang/p4lang-pi-0.1.0/proto/tests' make[5]: [Makefile:1697: check-recursive] Error 1 make[5]: Leaving directory '/sonic/src/p4lang/p4lang-pi-0.1.0/proto' make[4]: [Makefile:1994: check] Error 2 make[4]: Leaving directory '/sonic/src/p4lang/p4lang-pi-0.1.0/proto' make[3]: [Makefile:456: check-recursive] Error 1 make[3]: Leaving directory '/sonic/src/p4lang/p4lang-pi-0.1.0' dh_auto_test: error: make -j16 check "TESTSUITEFLAGS=-j16 --verbose" VERBOSE=1 returned exit code 2 make[2]: [debian/rules:16: binary] Error 25 make[2]: Leaving directory '/sonic/src/p4lang/p4lang-pi-0.1.0' dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 make[1]: [Makefile:9: /sonic/target/debs/bookworm/p4lang-pi_0.1.0-15_amd64.deb] Error 2 make[1]: Leaving directory '/sonic/src/p4lang' [ FAIL LOG END ] [ target/debs/bookworm/p4lang-pi_0.1.0-15_amd64.deb ] make: *** [slave.mk:735: target/debs/bookworm/p4lang-pi_0.1.0-15_amd64.deb] Error 1 make[1]: Leaving directory '/home/wumiao/github/sonic-buildimage'

Steps to reproduce the issue:

Just follow the build steps for sonic-buildimage and it will fail.

Describe the results you received:

Cannot build master

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

Ilayarani-git commented 3 months ago

I am also facing the same issue. Any fix available for this issue?

wumiaont commented 3 months ago

Revert https://github.com/sonic-net/sonic-buildimage/pull/18762 can help to resolve the issue.

Ilayarani-git commented 3 months ago

After reverting the changes, build was successful. Thanks for your inputs.

prabhataravind commented 3 months ago

@Ilayarani-git Is this issue resolved now? If not, please try on the latest master image. We don't see build issues on master. What is the command you are using to build?

Pterosaur commented 3 months ago

Hi @Ilayarani-git , I didn't see this issue on the commit

commit 1fba66c5d41a19ce9b02f64cd2091c0783da0a78 (HEAD -> master, origin/master, origin/HEAD)
Author: ganglv <88995770+ganglyu@users.noreply.github.com>
Date:   Tue Jun 18 10:13:58 2024 +0800

Are you using a clean building folder or not? I guess if these are some stale files, the build of p4lang may fail.

Ilayarani-git commented 3 months ago

@prabhataravind , @Pterosaur

Thanks for looking into it..

I did not try the latest build . Last build I tried was a week back and it failed with plang error. I reverted https://github.com/sonic-net/sonic-buildimage/pull/18762 (git revert 3a84ba8cac38c15d70df14ba428bdca9c4a3a3a6) and build was successful.

These are the commands I used to build. make init make configure PLATFORM=vs
make SONIC_BUILD_JOBS=2 target/sonic-vs.img.gz

Pterosaur commented 3 months ago

@prabhataravind , @Pterosaur

Thanks for looking into it..

I did not try the latest build . Last build I tried was a week back and it failed with plang error. I reverted #18762 (git revert 3a84ba8) and build was successful.

These are the commands I used to build. make init make configure PLATFORM=vs make SONIC_BUILD_JOBS=2 target/sonic-vs.img.gz

@prabhataravind , @Pterosaur

Thanks for looking into it..

I did not try the latest build . Last build I tried was a week back and it failed with plang error. I reverted #18762 (git revert 3a84ba8) and build was successful.

These are the commands I used to build. make init make configure PLATFORM=vs make SONIC_BUILD_JOBS=2 target/sonic-vs.img.gz

Thanks for your commands. I guess the build of p4lang may has some issues with multiple BUILD JOBS. I will confirm it.

wumiaont commented 3 months ago

I just made a build against latest sonic-buildimage master and still fails. 5 FAILED TESTS FAIL test_server_arbitration (exit status: 1)

============================================================================ Testsuite summary for PI-proto 0.1

TOTAL: 13

PASS: 10

SKIP: 0

XFAIL: 0

FAIL: 3

XPASS: 0

ERROR: 0

============================================================================ See tests/test-suite.log

make[8]: [Makefile:1045: test-suite.log] Error 1 make[8]: Leaving directory '/sonic/src/p4lang/p4lang-pi-0.1.0/proto/tests' make[7]: [Makefile:1153: check-TESTS] Error 2 make[7]: Leaving directory '/sonic/src/p4lang/p4lang-pi-0.1.0/proto/tests' make[6]: [Makefile:1310: check-am] Error 2 make[6]: Leaving directory '/sonic/src/p4lang/p4lang-pi-0.1.0/proto/tests' make[5]: [Makefile:1697: check-recursive] Error 1 make[5]: Leaving directory '/sonic/src/p4lang/p4lang-pi-0.1.0/proto' make[4]: [Makefile:1994: check] Error 2 make[4]: Leaving directory '/sonic/src/p4lang/p4lang-pi-0.1.0/proto' make[3]: [Makefile:456: check-recursive] Error 1 make[3]: Leaving directory '/sonic/src/p4lang/p4lang-pi-0.1.0' dh_auto_test: error: make -j12 check "TESTSUITEFLAGS=-j12 --verbose" VERBOSE=1 returned exit code 2 make[2]: [debian/rules:16: binary] Error 25 make[2]: Leaving directory '/sonic/src/p4lang/p4lang-pi-0.1.0' dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 make[1]: [Makefile:9: /sonic/target/debs/bookworm/p4lang-pi_0.1.0-15_amd64.deb] Error 2 make[1]: Leaving directory '/sonic/src/p4lang' [ FAIL LOG END ] [ target/debs/bookworm/p4lang-pi_0.1.0-15_amd64.deb ] make: [slave.mk:735: target/debs/bookworm/p4lang-pi_0.1.0-15_amd64.deb] Error 1 make[1]: [Makefile.work:600: all] Error 2 make[1]: Leaving directory '/home/wumiao/github/sonic-buildimage' make: *** [Makefile:47: all] Error 2

wumiaont commented 3 months ago

Command I used for the build: 967 git clone https://github.com/sonic-net/sonic-buildimage.git 968 sudo modprobe overlay 969 cd sonic-buildimage/ 970 make init 971 make configure PLATFORM=vs 972 make SONIC_BUILD_JOBS=1 all

wumiaont commented 3 months ago

git pull remote: Enumerating objects: 28, done. remote: Counting objects: 100% (28/28), done. remote: Compressing objects: 100% (21/21), done. remote: Total 28 (delta 7), reused 9 (delta 6), pack-reused 0 Unpacking objects: 100% (28/28), 38.10 KiB | 470.00 KiB/s, done. From https://github.com/sonic-net/sonic-buildimage 48ec8cdfe..ace1e5b0e 202311 -> origin/202311 Already up to date.

git branch

Pterosaur commented 3 months ago

Command I used for the build: 967 git clone https://github.com/sonic-net/sonic-buildimage.git 968 sudo modprobe overlay 969 cd sonic-buildimage/ 970 make init 971 make configure PLATFORM=vs 972 make SONIC_BUILD_JOBS=1 all

These commands are available in my environment, Could you try to remove your slave image and retry this?

docker rmi $(docker images | grep slave | awk '{print $3}')