Comments (8)
ACK, will start investigation this issue.
from sonic-swss-common.
I found there are 2 place have infinite loop issue:
We need exit these infinite loop when receive SIGTERM by add a SIGTERM handler and check SIGTERM status in loop. also we may need check if other signal also need handle, for example SIGKILL
Also need check if some other place in swss common have same issue.
from sonic-swss-common.
@qiluo-msft any reason the issue is not opened on buildimage for tracking? i believe we only track it and not submodules.
from sonic-swss-common.
To minimize code change and make code scalable, my proposal is:
1.Add a CancellationToken class.
2.And add new parameter to these existed API.
3.Code change in hostcfgd to use the new API with a signal handler.
from sonic-swss-common.
Here is a draft PR for this issue:
from swsscommon import swsscommon
global_cancellation_token = swsscommon.SignalHandlerHelper.GetCancellationToken(2)
swsscommon.SignalHandlerHelper.RegisterSignalHandler(2)c=swsscommon.ConfigDBConnector()
c.subscribe('A', lambda a: None)
c.connect()
c.listen(global_cancellation_token, None)
^C>>>
from sonic-swss-common.
Update: here is latest example:
from swsscommon import swsscommon
global_cancellation_token = swsscommon.CancellationToken()
swsscommon.SignalHandlerHelper.RegisterCancellationToken(2, global_cancellation_token)
swsscommon.SignalHandlerHelper.RegisterSignalHandler(2)c=swsscommon.ConfigDBConnector()
c.subscribe('A', lambda a: None)
c.connect()
c.listen(global_cancellation_token, None)
^C>>>
from sonic-swss-common.
@qiluo-msft any reason the issue is not opened on buildimage for tracking? i believe we only track it and not submodules.
If it is obvious issue in submodule, we will move it to submodule's repo.
from sonic-swss-common.
@liuh-80, @qiluo-msft as this one is blocking sonic-net/sonic-buildimage#10510. can you please see how we can expedite the solution and the review?
from sonic-swss-common.
Related Issues (20)
- [Question] Why use HSET instead of HMSET in consumer_state_table_pops.lua? HOT 1
- Why linkToDbNative must be called before linkToDb? HOT 5
- Break bug?
- remove the rate limitation when swssloglevel to Debug mode
- This repo is missing important files HOT 1
- Too many FD events on modifying PORT table in CONFIG_DB HOT 13
- Need azure pipeline to build bullseye target HOT 2
- DVS runtime error
- defaultvalueprovider_ut fails on address sanitizer HOT 1
- CI failed due to UT tests failed(ZMQ related logs) HOT 2
- Fixed, re-connect when exception happen.
- sonic-db-cli socket option not working when using PING HOT 1
- posted in the wrong repository
- >SonicDBConfig [](http://example.com/codeflow?start=20&length=13)
- String Equality tests in tests/main.cpp
- PR commit check failure: testslibsairedis test failed
- read.me file build instructions should be updated to match the latest version of sonic
- add build instruction for cross platform build
- Support for binary data for DBConnector::hgetall
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sonic-swss-common.