/var/log/syslog.95.gz:Jun 28 09:59:05.175489 svcstr-7050-acs-2 NOTICE pmon#xcvrd[30]: :- ~RedisPipeline: RedisPipeline dtor is called from another thread, possibly due to exit(), Database: STATE_DB
/var/log/syslog.95.gz:Jun 28 09:59:05.175489 svcstr-7050-acs-2 NOTICE pmon#xcvrd[30]: message repeated 3 times: [ :- ~RedisPipeline: RedisPipeline dtor is called from another thread, possibly due to exit(), Database: STATE_DB]
/var/log/syslog.95.gz:Jun 28 09:59:05.175489 svcstr-7050-acs-2 NOTICE pmon#xcvrd[30]: :- ~RedisPipeline: RedisPipeline dtor is called from another thread, possibly due to exit(), Database: APPL_DB
/var/log/syslog.95.gz:Jun 28 09:59:05.175489 svcstr-7050-acs-2 NOTICE pmon#xcvrd[30]: :- ~RedisPipeline: RedisPipeline dtor is called from another thread, possibly due to exit(), Database: CONFIG_DB
/var/log/syslog.95.gz:Jun 28 09:59:05.175489 svcstr-7050-acs-2 NOTICE pmon#xcvrd[30]: :- ~RedisPipeline: RedisPipeline dtor is called from another thread, possibly due to exit(), Database: STATE_DB
Motivation and Context
The above messages are seen since the already established connections to redis-db from xcvrd main thread are closed by CmisManagerTask thread. Following is the sequence
In the context of xcvrd main thread, the CmisManagerTask.xcvr_table_helper is initialized here. This initiates connections to redis-db.
Once the CmisManagerTask thread is spawned, the previously established connections from the xcvrd main thread to redis-db are closed by CmisManagerTask thread. Also, new connections are initiated in context of CmisManagerTask thread through this. This causes the messages to appear.
In order to fix the current issue, the XcvrTableHelper instantiation from CmisManagerTask.__init__ has now been removed since the instantiation is already being done as part of task_worker function in the context of CmisManagerTask thread.
How Has This Been Tested?
Ensured that the messages are not seen any more during xcvrd boot-up.
Also, ensured that the CmisManagerTask thread is running without any crashes. Also, issued shut/no shut on a port to ensure that CmisManagerTask and xcvrd are stable.
202305 Cherry-pick for https://github.com/sonic-net/sonic-platform-daemons/pull/521
Description
During XCVRD boot-up, following messages are seen
Motivation and Context
The above messages are seen since the already established connections to redis-db from
xcvrd
main thread are closed byCmisManagerTask
thread. Following is the sequencexcvrd
main thread, theCmisManagerTask.xcvr_table_helper
is initialized here. This initiates connections to redis-db.CmisManagerTask
thread is spawned, the previously established connections from thexcvrd
main thread to redis-db are closed byCmisManagerTask
thread. Also, new connections are initiated in context ofCmisManagerTask
thread through this. This causes the messages to appear.In order to fix the current issue, the XcvrTableHelper instantiation from
CmisManagerTask.__init__
has now been removed since the instantiation is already being done as part oftask_worker
function in the context ofCmisManagerTask
thread.How Has This Been Tested?
Ensured that the messages are not seen any more during
xcvrd
boot-up. Also, ensured that the CmisManagerTask thread is running without any crashes. Also, issued shut/no shut on a port to ensure thatCmisManagerTask
andxcvrd
are stable.Additional Information (Optional)
MSFT ADO - 28645242