Skip to content

Revert "Revert "Event and alarm management (#17949)""#20064

Closed
yxieca wants to merge 1 commit intomasterfrom
revert-20052-revert
Closed

Revert "Revert "Event and alarm management (#17949)""#20064
yxieca wants to merge 1 commit intomasterfrom
revert-20052-revert

Conversation

@yxieca
Copy link
Contributor

@yxieca yxieca commented Aug 28, 2024

Reverts #20052

@liushilongbuaa
Copy link
Contributor

liushilongbuaa commented Aug 29, 2024

2024-08-28T20:33:46.5210110Z [ building ] [ target/debs/bullseye/sonic-eventd_1.0.0-0_amd64.deb ]
2024-08-28T20:33:46.5610605Z [ cached ] [ target/debs/bullseye/sonic-eventd_1.0.0-0_amd64.deb ]
PR checker succeeded because of cache. I will check it.

@liushilongbuaa
Copy link
Contributor

PR validation passed. It maybe related with cached libc package.
I start a job to test Link

@bhaveshdell
Copy link
Contributor

@yxieca Thanks for raising this PR.
The checker fail for vs image:

ApplicationInsightsTelemetrySender correlated 2 events with X-TFS-Session 01dd85f2-a8f6-4a51-a1b8-588da90070c1
##[error]Artifact sonic-buildimage.vs already exists for build 630343.

@liushilongbuaa
Copy link
Contributor

liushilongbuaa commented Aug 30, 2024

@bhaveshdell , PR validation passed. But I run a whole build failed. LINK

I searched on internet. It seems caused by Linker used older version of libstdc++.so
This issue only occurs on bullseye. You can reproduce the error by 'make target/docker-sonic-vs.gz'
SONiC image has deprecated bullseye sonic-slave. Build this target will not meet this error.

/usr/bin/ld: ./tests/eventdb_ut.o: in function `std::__new_allocator<std::__detail::_Hash_node_base*>::allocate(unsigned long, void const*)':
/usr/include/c++/12/bits/new_allocator.h:125: undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: /usr/include/c++/12/bits/new_allocator.h:125: undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: /usr/include/c++/12/bits/new_allocator.h:125: undefined reference to `std::__throw_bad_array_new_length()'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:64: eventd-tests] Error 1
make[2]: *** Waiting for unfinished jobs....
Finished building: rsyslog_plugin/main.cpp
 
Finished building: rsyslog_plugin/rsyslog_plugin.cpp
 
Finished building: rsyslog_plugin_tests/rsyslog_plugin_ut.cpp
 
make[2]: Leaving directory '/sonic/src/sonic-eventd'
dh_auto_build: error: make -j4 "INSTALL=install --strip-program=true" returned exit code 2
make[1]: *** [debian/rules:6: build] Error 25
make[1]: Leaving directory '/sonic/src/sonic-eventd'
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
[  FAIL LOG END  ] [ target/debs/bullseye/sonic-eventd_1.0.0-0_amd64.deb ]
[ building ] [ target/debs/bookworm/sonic-eventd_1.0.0-0_amd64.deb ] 
[ finished ] [ target/debs/bookworm/sonic-eventd_1.0.0-0_amd64.deb ] 

@liushilongbuaa
Copy link
Contributor

$ docker run --rm -ti sonicdev-microsoft.azurecr.io:443/sonic-slave-bullseye objdump -T /usr/lib/gcc/x86_64-linux-gnu/10/libstdc++.so | c++filt | grep throw_bad_array_new_length
000000000009a2c3 g    DF .text  000000000000002f  CXXABI_1.3.8 __cxa_throw_bad_array_new_length
$ docker run --rm -ti sonicdev-microsoft.azurecr.io:443/sonic-slave-bookworm objdump -T /usr/lib/gcc/x86_64-linux-gnu/12/libstdc++.so | c++filt | grep throw_bad_array_new_length
00000000000a000b g    DF .text  0000000000000033  GLIBCXX_3.4.29 std::__throw_bad_array_new_length()
000000000009d3c6 g    DF .text  0000000000000033  CXXABI_1.3.8 __cxa_throw_bad_array_new_length

@liushilongbuaa
Copy link
Contributor

liushilongbuaa commented Aug 30, 2024

src/sonic-eventd/src/eventutils.h used unordered_map
Refering CPP11, it is new feature in CPP11. But debian bullseye installs cpp10.
That's the root cause. It still needs investigation why PR validation passed.

@liushilongbuaa
Copy link
Contributor

@yxieca , how about upgrade docker-sonic-vs from bullseye to bookworm? Who drives upgrading distribution?
FROM docker-swss-layer-bullseye-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}

@bhaveshdell
Copy link
Contributor

@liushilongbuaa, I do not get this error in my local build. make target/docker-sonic-vs.gz succeeds.

@bhaveshdell
Copy link
Contributor

@liushilongbuaa, Please suggest how to resolve this build error.
Also how to reproduce, since I cannot reproduce it.
Thanks

@bhaveshdell
Copy link
Contributor

@@yxieca, Can you please help resolve this issue?

@liushilongbuaa
Copy link
Contributor

@liushilongbuaa, Please suggest how to resolve this build error. Also how to reproduce, since I cannot reproduce it. Thanks

disabling all cache can help reproduce.
I will try to upgrade docker-sonic-vs from bullseye to bookworm

@liushilongbuaa
Copy link
Contributor

#20258

@bhaveshdell
Copy link
Contributor

@liushilongbuaa Any update on PR #20258? It is failing vs build check.
Any estimate on when it will be fixed?

@liushilongbuaa
Copy link
Contributor

@bhaveshdell , can you create another PR to resolve conflict?
docker-sonic-vs is already upgrade to bookworm. #20697

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

Successfully merging this pull request may close these issues.

3 participants