From 0573416ef546109849e0851d48ec1380426f7ef5 Mon Sep 17 00:00:00 2001 From: Vivek Date: Thu, 1 Dec 2022 05:55:27 -0800 Subject: [PATCH] Remove the argument that is causing the xcvrd to crash (#318) - Description Fixed SfpStateUpdateTask to not crash during port_cfg dynamic add/del event - Motivation and Context During port breakout, the subprocess invoked by parent xcvrd is crashing indicated in the log - How Has This Been Tested? Apply breakout and check if the subprocess is not crashing Signed-off-by: Vivek Reddy --- sonic-xcvrd/xcvrd/xcvrd.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sonic-xcvrd/xcvrd/xcvrd.py b/sonic-xcvrd/xcvrd/xcvrd.py index 8a1bd9b118c5..ef7deb2ed415 100644 --- a/sonic-xcvrd/xcvrd/xcvrd.py +++ b/sonic-xcvrd/xcvrd/xcvrd.py @@ -8,7 +8,6 @@ try: import ast import copy - import functools import json import multiprocessing import os @@ -1794,9 +1793,8 @@ def task_worker(self, stopping_event, sfp_error_event): timeout = RETRY_PERIOD_FOR_SYSTEM_READY_MSECS state = STATE_INIT sel, asic_context = port_mapping.subscribe_port_config_change(self.namespaces) - port_change_event_handler = functools.partial(self.on_port_config_change, stopping_event) while not stopping_event.is_set(): - port_mapping.handle_port_config_change(sel, asic_context, stopping_event, self.port_mapping, helper_logger, port_change_event_handler) + port_mapping.handle_port_config_change(sel, asic_context, stopping_event, self.port_mapping, helper_logger, self.on_port_config_change) # Retry those logical ports whose EEPROM reading failed or timeout when the SFP is inserted self.retry_eeprom_reading()