[arm64]disable snmp's parallel make for now, because it causes compile fail with file truncated#6592
Conversation
…e fail with file truncated on arm64 arch
|
do we know the reason? |
The direct cause is different jobs compile same file at the same time, ld use the truncated object file. see the log(from https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-arm64-all/40/consoleText): |
|
is this only arm64 problem or it is a generic problem? looks like a generic problem, then we should disable the paralledl build for all platforms. |
It should be a generic problem. ARM64 compile is much more slower than x86, the problem has a very high probability of occurrence. I'm not yet carefully analyzed why hasn't this question come out before. It suspected to be related to the PR #6408 changes. |
|
since it is generic, can disable for the parallel build for all platforms? |
I looked into this problem again. it seems this problem only occurs on ARM64. On x86 platform, the object ".libs/inetCidrRouteTable_interface.o" is compiled once(From the compile log https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-all/186/artifact/target/debs/buster/libsnmp-base_5.7.3+dfsg-5_all.deb.log): On armhf platform, the object ".libs/inetCidrRouteTable_interface.o" is also compiled once (From compile log https://sonic-jenkins.westus2.cloudapp.azure.com/job/marvell/job/buildimage-mrvl-armhf-all/54/artifact/target/debs/buster/libsnmp-base_5.7.3+dfsg-5_all.deb.log): But on ARM64 platform, the object ".libs/inetCidrRouteTable_interface.o" is compiled twice.(From the compile log https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-arm64-all/40/consoleText): snmpd's makefile is changed in PR #6408. before this change, snmpd's dh_auto_build use "make -j1" to build(https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-arm64-all/lastSuccessfulBuild/artifact/target/debs/buster/libsnmp-base_5.7.3+dfsg-5_all.deb.log); After this change, dh_auto_build use parallel build. Then, I suggest disable parallel build only for ARM64. |
snmpd's compile is always failed with file truncated on ARM64 arch, the error log is like "/usr/bin/ld: mibgroup/ip-forward-mib/inetCidrRouteTable/.libs/inetCidrRouteTable_interface.o: file not recognized: file truncated" Co-authored-by: Xianghong Gu <xgu@centecnetworks.com>
snmpd's compile is always failed with file truncated on ARM64 arch, the error log is like "/usr/bin/ld: mibgroup/ip-forward-mib/inetCidrRouteTable/.libs/inetCidrRouteTable_interface.o: file not recognized: file truncated" Co-authored-by: Xianghong Gu <xgu@centecnetworks.com>
I have been seeing intermittent (~40%) build failures with the same error described in PR #6592, even with that fix present ``` /usr/bin/ld: mibgroup/ip-forward-mib/ipCidrRouteTable/.libs/ipCidrRouteTable_interface.o: file not recognized: file truncated ... libtool: error: 'mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.lo' is not a valid libtool object make[5]: *** [Makefile:1020: libnetsnmpmibs.la] Error 1 make[5]: *** Waiting for unfinished jobs.... ``` #### How I did it Use `-j1` for the libsnmp build regardless of the value of `$(MULTIARCH_QEMU_ENVIRON)` #### How to verify it Performed 10 builds of the libsnmp target (`target/debs/buster/libsnmp-base_5.7.3+dfsg-5_all.deb`) with and without this change. Without the change, hit the error 40% of the time. With the change did not see the error at all Signed-off-by: Justin Sherman <jusherma@cisco.com>
I have been seeing intermittent (~40%) build failures with the same error described in PR #6592, even with that fix present ``` /usr/bin/ld: mibgroup/ip-forward-mib/ipCidrRouteTable/.libs/ipCidrRouteTable_interface.o: file not recognized: file truncated ... libtool: error: 'mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.lo' is not a valid libtool object make[5]: *** [Makefile:1020: libnetsnmpmibs.la] Error 1 make[5]: *** Waiting for unfinished jobs.... ``` #### How I did it Use `-j1` for the libsnmp build regardless of the value of `$(MULTIARCH_QEMU_ENVIRON)` #### How to verify it Performed 10 builds of the libsnmp target (`target/debs/buster/libsnmp-base_5.7.3+dfsg-5_all.deb`) with and without this change. Without the change, hit the error 40% of the time. With the change did not see the error at all Signed-off-by: Justin Sherman <jusherma@cisco.com>
I have been seeing intermittent (~40%) build failures with the same error described in PR #6592, even with that fix present ``` /usr/bin/ld: mibgroup/ip-forward-mib/ipCidrRouteTable/.libs/ipCidrRouteTable_interface.o: file not recognized: file truncated ... libtool: error: 'mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.lo' is not a valid libtool object make[5]: *** [Makefile:1020: libnetsnmpmibs.la] Error 1 make[5]: *** Waiting for unfinished jobs.... ``` #### How I did it Use `-j1` for the libsnmp build regardless of the value of `$(MULTIARCH_QEMU_ENVIRON)` #### How to verify it Performed 10 builds of the libsnmp target (`target/debs/buster/libsnmp-base_5.7.3+dfsg-5_all.deb`) with and without this change. Without the change, hit the error 40% of the time. With the change did not see the error at all Signed-off-by: Justin Sherman <jusherma@cisco.com>
…#8324) I have been seeing intermittent (~40%) build failures with the same error described in PR sonic-net#6592, even with that fix present ``` /usr/bin/ld: mibgroup/ip-forward-mib/ipCidrRouteTable/.libs/ipCidrRouteTable_interface.o: file not recognized: file truncated ... libtool: error: 'mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.lo' is not a valid libtool object make[5]: *** [Makefile:1020: libnetsnmpmibs.la] Error 1 make[5]: *** Waiting for unfinished jobs.... ``` #### How I did it Use `-j1` for the libsnmp build regardless of the value of `$(MULTIARCH_QEMU_ENVIRON)` #### How to verify it Performed 10 builds of the libsnmp target (`target/debs/buster/libsnmp-base_5.7.3+dfsg-5_all.deb`) with and without this change. Without the change, hit the error 40% of the time. With the change did not see the error at all Signed-off-by: Justin Sherman <jusherma@cisco.com>
Disable snmp's parallel make for now, because it causes compile fail with file truncated.
- Why I did it
snmpd's compile is always failed with file truncated on ARM64 arch, the error log is like "/usr/bin/ld: mibgroup/ip-forward-mib/inetCidrRouteTable/.libs/inetCidrRouteTable_interface.o: file not recognized: file truncated"
- How I did it
Disable snmp's parallel make for now on ARM64 compile.
- How to verify it
make configure PLATFORM=centec-arm64 PLATFORM_ARCH=arm64
make target/debs/buster/libsnmp-base_5.7.3+dfsg-5_all.deb NOSTRETCH=1
- Which release branch to backport (provide reason below if selected)
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)