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

Jenkins build failure buildimage-p4-all. #2005

Closed
jcmathews opened this issue Aug 31, 2018 · 6 comments
Closed

Jenkins build failure buildimage-p4-all. #2005

jcmathews opened this issue Aug 31, 2018 · 6 comments

Comments

@jcmathews
Copy link

Hi,

I was trying to build sonicbuildimage for p4. However the build failed while generating sairedis package.
Further investigation, the error seems to be because of not copying SAI header files to /usr/include/sai.
However this didn't help. Further i tried checking Jenkins build and looks like build failure with same cause is there too and it is not resolved for a long time.

Can somebody help on this?

Regards,
Jessel.

@jcmathews
Copy link
Author

logs from jenkins:
make[4]: Entering directory '/sonic/src/sonic-sairedis/SAI/test'
rm -f bin/basic_router obj/gtest.a obj/gtest_main.a obj/.o
make -C sai_ut clean
make[5]: Entering directory '/sonic/src/sonic-sairedis/SAI/test/sai_ut'
rm -f ../bin/sai_ut_vr ../bin/sai_ut_rif ../bin/sai_ut_nh ../bin/sai_ut_nhg ../bin/sai_ut_nbr ../bin/sai_ut_route ../bin/sai_ut_fdb ../bin/sai_ut_vlan ../bin/sai_ut_lag ../bin/sai_ut_stp .o routing/.o switching/
.o
make[5]: Leaving directory '/sonic/src/sonic-sairedis/SAI/test/sai_ut'
make[4]: Leaving directory '/sonic/src/sonic-sairedis/SAI/test'
make[3]: Leaving directory '/sonic/src/sonic-sairedis/SAI'
rm -rf .egg-info
make[2]: Leaving directory '/sonic/src/sonic-sairedis/SAI'
dh_clean
rm -f debian/libsaithrift-dev.substvars
rm -f debian/libsaithrift-dev.
.debhelper
rm -rf debian/libsaithrift-dev/
rm -f debian/python-saithrift.substvars
rm -f debian/python-saithrift..debhelper
rm -rf debian/python-saithrift/
rm -f debian/
.debhelper.log
rm -f debian/files
find . ( (
( -path .*/.git -o -path .*/.svn -o -path .*/.bzr -o -path .*/.hg -o -path .*/CVS ) -prune -o -type f -a
( -name '##' -o -name '.' -o -name '*' -o -name DEADJOE
-o -name '.orig' -o -name '.rej' -o -name '.bak'
-o -name '.
.orig' -o -name ..rej -o -name '.SUMS'
-o -name TAGS -o ( -path '
/.deps/' -a -name '.P' )
) -exec rm -f {} + ) -o
( -type d -a -name autom4te.cache -prune -exec rm -rf {} + ) )
rm -f -stamp
make[1]: Leaving directory '/sonic/src/sonic-sairedis/SAI'
debian/rules build
make[1]: Entering directory '/sonic/src/sonic-sairedis/SAI'
dh build
dh_testdir
dh_auto_configure
debian/rules override_dh_auto_build
make[2]: Entering directory '/sonic/src/sonic-sairedis/SAI'
/usr/bin/make DESTDIR=/sonic/src/sonic-sairedis/SAI/debian saithrift-build
make[3]: Entering directory '/sonic/src/sonic-sairedis/SAI'
make -C test/saithrift
make[4]: Entering directory '/sonic/src/sonic-sairedis/SAI/test/saithrift'
mkdir -p ./src/obj
/usr/bin/thrift -o ./src --gen cpp -r ./src/switch_sai.thrift
g++ -I/usr/include/sai -I. -std=c++11 -c src/gen-cpp/switch_sai_rpc.cpp -o src/obj/switch_sai_rpc.o
g++ -I/usr/include/sai -I. -std=c++11 -c src/gen-cpp/switch_sai_types.cpp -o src/obj/switch_sai_types.o
g++ -I/usr/include/sai -I. -std=c++11 -c src/gen-cpp/switch_sai_constants.cpp -o src/obj/switch_sai_constants.o
g++ -I/usr/include/sai -I. -std=c++11 -c src/switch_sai_rpc_server.cpp -o src/obj/switch_sai_rpc_server.o -I/usr/include/sai -I. -std=c++11 -I./src/gen-cpp
src/switch_sai_rpc_server.cpp: In member function 'void switch_sai_rpcHandler::sai_thrift_parse_fdb_entry(const switch_sai::sai_thrift_fdb_entry_t&, sai_fdb_entry_t
)':
src/switch_sai_rpc_server.cpp:219:18: error: 'sai_fdb_entry_t' has no member named 'bv_id'
fdb_entry->bv_id = (sai_object_id_t) thrift_fdb_entry.bv_id;
^
src/switch_sai_rpc_server.cpp: In member function 'void switch_sai_rpcHandler::sai_thrift_parse_port_attributes(const std::vector<switch_sai::sai_thrift_attribute_t>&, sai_attribute_t*, sai_object_id_t**)':
src/switch_sai_rpc_server.cpp:245:20: error: 'SAI_PORT_ATTR_PKT_TX_ENABLE' was not declared in this scope
case SAI_PORT_ATTR_PKT_TX_ENABLE:
^
src/switch_sai_rpc_server.cpp: In member function 'void switch_sai_rpcHandler::sai_thrift_parse_fdb_flush_attributes(const std::vector<switch_sai::sai_thrift_attribute_t>&, sai_attribute_t*)':
src/switch_sai_rpc_server.cpp:331:20: error: 'SAI_FDB_FLUSH_ATTR_BV_ID' was not declared in this scope
case SAI_FDB_FLUSH_ATTR_BV_ID:
^
src/switch_sai_rpc_server.cpp: In member function 'void switch_sai_rpcHandler::sai_thrift_parse_lag_attributes(const std::vector<switch_sai::sai_thrift_attribute_t>&, sai_attribute_t*)':
src/switch_sai_rpc_server.cpp:435:20: error: 'SAI_LAG_ATTR_PORT_VLAN_ID' was not declared in this scope
case SAI_LAG_ATTR_PORT_VLAN_ID:
^
src/switch_sai_rpc_server.cpp: In member function 'void switch_sai_rpcHandler::sai_thrift_parse_hostif_attributes(sai_attribute_t*, const std::vector<switch_sai::sai_thrift_attribute_t>&) const':
src/switch_sai_rpc_server.cpp:522:94: error: 'SAI_HOSTIF_NAME_SIZE' was not declared in this scope
std::memcpy(attr_list[i].value.chardata, attribute.value.chardata.c_str(), SAI_HOSTIF_NAME_SIZE);
^
Makefile:77: recipe for target 'src/obj/switch_sai_rpc_server.o' failed
make[4]: *** [src/obj/switch_sai_rpc_server.o] Error 1
make[4]: Leaving directory '/sonic/src/sonic-sairedis/SAI/test/saithrift'
Makefile:29: recipe for target 'saithrift-build' failed
make[3]: *** [saithrift-build] Error 2
make[3]: Leaving directory '/sonic/src/sonic-sairedis/SAI'
debian/rules:26: recipe for target 'override_dh_auto_build' failed
make[2]: *** [override_dh_auto_build] Error 2
make[2]: Leaving directory '/sonic/src/sonic-sairedis/SAI'
debian/rules:23: recipe for target 'build' failed
make[1]: *** [build] Error 2
make[1]: Leaving directory '/sonic/src/sonic-sairedis/SAI'
dpkg-buildpackage: error: debian/rules build gave error exit status 2
[ FAIL LOG END ] [ target/debs/libsaithrift-dev_1.0.4_amd64.deb ]
slave.mk:237: recipe for target 'target/debs/libsaithrift-dev_1.0.4_amd64.deb' failed
make: *** [target/debs/libsaithrift-dev_1.0.4_amd64.deb] Error 1
Makefile.work:97: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/data/johnar/workspace/p4/buildimage-p4-all'
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 2
Build step 'Execute shell' marked build as failure
Archiving artifacts
Finished: FAILURE

@sajishv
Copy link

sajishv commented Aug 31, 2018

I too am looking for a resolution of this issue.

@xinliu-seattle
Copy link
Contributor

Sorry, current we don't have resource to work on this one.

@blakedot
Copy link

Same here; I'd like to try out sonic-p4 but it looks like the Jenkins build has been failing for 6 months...

@sslvjun
Copy link

sslvjun commented Nov 29, 2018

Hi, Is this problem solved now?

I modified src/sonic-swss/configure.ac, and it built success.

diff --git a/configure.ac b/configure.ac
index a33396c..aa2e37a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,7 +38,7 @@ AC_ARG_ENABLE(gtest,
 esac],[gtest=false])
 AM_CONDITIONAL(GTEST, test x$gtest = xtrue)
 
-CFLAGS_COMMON="-std=c++11 -Wall -fPIC -Wno-write-strings -I/usr/include/libnl3 -I/usr/include/swss"
+CFLAGS_COMMON="-std=c++11 -Wall -fPIC -Wno-write-strings -I/sonic/src/sonic-sairedis/SAI/inc/ -I/usr/include/libnl3 -I/usr/include/swss"
 
 AM_CONDITIONAL(sonic_asic_platform_barefoot,   test x$CONFIGURED_PLATFORM = xbarefoot)
 AM_COND_IF([sonic_asic_platform_barefoot],

Then another problem occured:

dpkg: dependency problems prevent configuration of python-sonic-utilities:
 python-sonic-utilities depends on psmisc; however:
  Package psmisc is not installed.

dpkg: error processing package python-sonic-utilities (--install):
 dependency problems - leaving unconfigured
Installing new version of config file /etc/iproute2/rt_dsfield ...
Installing new version of config file /etc/iproute2/rt_protos ...
dpkg: dependency problems prevent configuration of quagga:
 quagga depends on logrotate (>= 3.2-11); however:
  Package logrotate is not installed.

dpkg: error processing package quagga (--install):
 dependency problems - leaving unconfigured
Processing triggers for systemd (215-17+deb8u7) ...
Processing triggers for libc-bin (2.19-18+deb8u10) ...
Errors were encountered while processing:
 python-sonic-utilities
 quagga
The command '/bin/sh -c dpkg -i debs/libnl-3-200_3.2.27-2_amd64.deb debs/libnl-route-3-200_3.2.27-2_amd64.deb debs/libnl-genl-3-200_3.2.27-2_amd64.deb debs/libnl-nf-3-200_3.2.27-2_amd64.deb debs/libhiredis0.13_0.13.3-2_amd64.deb debs/libnl-cli-3-200_3.2.27-2_amd64.deb debs/libthrift-0.9.3_0.9.3-2_amd64.deb debs/python-thrift_0.9.3-2_amd64.deb debs/thrift-compiler_0.9.3-2_amd64.deb debs/sai-p4-bm_1.0.0_amd64.deb debs/libswsscommon_1.0.0_amd64.deb debs/p4-sai-adapter_0.1-0_amd64.deb debs/libsairedis_1.0.0_amd64.deb debs/libsaimetadata_1.0.0_amd64.deb debs/libteam5_1.26-1_amd64.deb debs/python-swsscommon_1.0.0_amd64.deb debs/swss_1.0.0_amd64.deb debs/syncd_1.0.0_amd64.deb debs/redis-tools_3.2.4-1~bpo8+1_amd64.deb debs/redis-server_3.2.4-1~bpo8+1_amd64.deb debs/libteamdctl0_1.26-1_amd64.deb debs/libteam-utils_1.26-1_amd64.deb debs/sonic-device-data_1.0-1_all.deb debs/python-sonic-utilities_1.2-1_all.deb debs/iproute2_4.9.0-1_amd64.deb debs/quagga_0.99.24.1-2.1_amd64.deb' returned a non-zero code: 1
[  FAIL LOG END  ] [ target/docker-sonic-p4.gz ]
slave.mk:418: recipe for target 'target/docker-sonic-p4.gz' failed
make: *** [target/docker-sonic-p4.gz] Error 1
Makefile.work:132: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/usr1/sunzhaozhong/test/sonic-buildimage'
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 2

I modified platform/p4/docker-sonic-p4/Dockerfile and platform/p4/docker-sonic-p4/Dockerfile.j2:

--- Dockerfile.bak      2018-11-14 21:19:20.288000000 -0500
+++ Dockerfile  2018-11-14 20:44:38.244000000 -0500
@@ -41,7 +41,9 @@
                        python-tabulate \
                        bash-completion \
                        libelf1 \
-                       libmnl0
+                       libmnl0 \
+                       psmisc \
+                       logrotate
 
 RUN pip install setuptools
 RUN pip install py2_ipaddress
@@ -74,4 +76,4 @@
 RUN echo "docker-sonic-p4" > /etc/hostname
 RUN touch /etc/quagga/zebra.conf
 
-ENTRYPOINT ["/bin/bash"]
+ENTRYPOINT ["/bin/bash"]
\ No newline at end of file

and

--- Dockerfile.j2.bak   2018-11-14 21:19:34.760000000 -0500
+++ Dockerfile.j2       2018-11-14 20:42:30.348000000 -0500
@@ -41,7 +41,9 @@
                        python-tabulate \
                        bash-completion \
                        libelf1 \
-                       libmnl0
+                       libmnl0 \
+                       psmisc \
+                       logrotate
 
 RUN pip install setuptools
 RUN pip install py2_ipaddress

I got docker-sonic-p4.gz finally! But when I ran the p4_test script, It executed ping failed.

@blakedot
Copy link

thanks @jcmathews! Is this upstream & Jenkins-buildable again?

stepanblyschak added a commit to stepanblyschak/sonic-buildimage that referenced this issue Nov 11, 2021
```
5f8ebfa (HEAD, origin/master, origin/HEAD, master) [AclOrch] move ACL counters to flex counter infrastructure (sonic-net#1943)
8119ec0 [bfdorch] Orchagent support hardware BFD (sonic-net#1883)
15074ac [sonic-swss]:enable unconfiguring PFC on last TC on a port (sonic-net#1962)
05c7c05 [Mux orch] set default as standby, change mux orch priority (sonic-net#2010)
fe5b2a9 [pytest]: Ignore errors deleting host ifs (sonic-net#2005)
70da9af [ci]: use native arm64 and armhf pool (sonic-net#2013)
e14a071 [qos] Add EXP to TC map support (sonic-net#1954)
c91a7f2 [switchorch] Implement VXLAN src port range feature  (sonic-net#1959)
b20f0f4 Gcov for swss daemon (sonic-net#1737)
01c243a [CRM][MPLS] Fix the mpls nexthop CRM attribute (sonic-net#2008)
8448a60 [vs tests]Migrating sonic-swss tests to use hwsku instead of fakeplatform (sonic-net#1978)
faa26db Fix random failure in PR/CI build. (sonic-net#2006)
e03edb6 Allow interface type value none (sonic-net#1991)
71b9650 [orchagent] Fix group name of port-buffer-drop in flexcounterorch.cpp (sonic-net#1967)
facdef5 [VS test] Skip flaky virtual chassis test (sonic-net#2004)
8261c1f [pytest]: Increase timeout when checking services (sonic-net#2000)
67278be [teammgrd]: Handle LAGs cleanup gracefully on Warm/Fast reboot. (sonic-net#1934)
e92c1df Enable FEC statistics collection for Ethernet ports (sonic-net#1994)
9f30ca1 VxLAN Tunnel Counters and Rates implementation (sonic-net#1859)
ac3103a Add missing neighbor resolution for MPLS route programming (sonic-net#1968)
bfba0ad [vlanmgr]Fix for STATE_DB port check logic (sonic-net#1980)
9ef2ba4 [vlanmgr]: Update VLAN removal code to work with 5.10 kernel and newer iproute2 versions (sonic-net#1970)
41fb26c [Mux orch] Handle setting unknown mux state (sonic-net#1984)
ac09bde [azp]: Increase timeout for VS tests (sonic-net#1988)
da8a43e [pytest]: Check if appl DB exists before deleting (sonic-net#1983)
553d75a [tunnel decap] Change tunnel orch order (sonic-net#1977)
7444e96 [macsecmgr]: Add rekey period in macsec mgr (sonic-net#1958)
d95823d [Buffermgr]Graceful handling of buffer model change (sonic-net#1956)
b0aa6a0 EVPN VxLAN enhancement to support P2MP tunnel based programming for Layer2 extension (sonic-net#1858)
85bdf54 Fix the option missing in kernel config issue (sonic-net#1973)
6b15584 Orchagent validates mirror session queue parameter against maximum value from SAI (sonic-net#1957)
fc9ffb9 [copp] Add ISIS, LDP and micro-BFD trap types to CoPP manager (sonic-net#1890)
452cbc1 [macsecorch]: Add IPG adjusting for MACsec gearbox model (sonic-net#1925)
```

Signed-off-by: Stepan Blyschak <[email protected]>
stepanblyschak added a commit to stepanblyschak/sonic-buildimage that referenced this issue Nov 11, 2021
```
5f8ebfa (HEAD, origin/master, origin/HEAD, master) [AclOrch] move ACL counters to flex counter infrastructure (sonic-net#1943)
8119ec0 [bfdorch] Orchagent support hardware BFD (sonic-net#1883)
15074ac [sonic-swss]:enable unconfiguring PFC on last TC on a port (sonic-net#1962)
05c7c05 [Mux orch] set default as standby, change mux orch priority (sonic-net#2010)
fe5b2a9 [pytest]: Ignore errors deleting host ifs (sonic-net#2005)
70da9af [ci]: use native arm64 and armhf pool (sonic-net#2013)
e14a071 [qos] Add EXP to TC map support (sonic-net#1954)
c91a7f2 [switchorch] Implement VXLAN src port range feature  (sonic-net#1959)
b20f0f4 Gcov for swss daemon (sonic-net#1737)
01c243a [CRM][MPLS] Fix the mpls nexthop CRM attribute (sonic-net#2008)
```

Signed-off-by: Stepan Blyschak <[email protected]>
lguohan pushed a commit that referenced this issue Nov 15, 2021
```
5f8ebfa (HEAD, origin/master, origin/HEAD, master) [AclOrch] move ACL counters to flex counter infrastructure (#1943)
8119ec0 [bfdorch] Orchagent support hardware BFD (#1883)
15074ac [sonic-swss]:enable unconfiguring PFC on last TC on a port (#1962)
05c7c05 [Mux orch] set default as standby, change mux orch priority (#2010)
fe5b2a9 [pytest]: Ignore errors deleting host ifs (#2005)
70da9af [ci]: use native arm64 and armhf pool (#2013)
e14a071 [qos] Add EXP to TC map support (#1954)
c91a7f2 [switchorch] Implement VXLAN src port range feature  (#1959)
b20f0f4 Gcov for swss daemon (#1737)
01c243a [CRM][MPLS] Fix the mpls nexthop CRM attribute (#2008)
```

Signed-off-by: Stepan Blyschak <[email protected]>
theasianpianist added a commit to theasianpianist/sonic-buildimage that referenced this issue Feb 5, 2022
The delete command for host interfaces during virtual server set up can occasionally fail if the interface has been auto-deleted before the command is run. This causes cascading failures for the VS test suite. Ignore such an error if this occurs.

Signed-off-by: Lawrence Lee <[email protected]>
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

5 participants