Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[voq][pmon]xcvrd process show the backtrace in the syslog file on VOQ linecard #9505

Closed
mlok-nokia opened this issue Dec 11, 2021 · 5 comments

Comments

@mlok-nokia
Copy link
Contributor

Description

[voq][pmon] xcvrd process show the backtrace in the syslog file on VOQ linecard.

Dec 11 01:16:45.075905 sonic ERR pmon#sfp: SFP index 37 out of range (1-36)
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd Traceback (most recent call last):
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd   File "/usr/local/bin/xcvrd", line 8, in <module>
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd     sys.exit(main())
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd   File "/usr/local/lib/python3.7/dist-packages/xcvrd/xcvrd.py", line 1620, in main
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd     xcvrd.run()
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd   File "/usr/local/lib/python3.7/dist-packages/xcvrd/xcvrd.py", line 1539, in run
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd     port_mapping_data, retry_eeprom_set = self.init()
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd   File "/usr/local/lib/python3.7/dist-packages/xcvrd/xcvrd.py", line 1499, in init
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd     retry_eeprom_set = post_port_sfp_dom_info_to_db(is_warm_start, port_mapping_data, self.stop_event)
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd   File "/usr/local/lib/python3.7/dist-packages/xcvrd/xcvrd.py", line 511, in post_port_sfp_dom_info_to_db
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd     rc = post_port_sfp_info_to_db(logical_port_name, port_mapping, xcvr_table_helper.get_intf_tbl(asic_index), transceiver_dict, stop_event)
Dec 11 01:16:45.079431 sonic INFO pmon#/supervisord: xcvrd   File "/usr/local/lib/python3.7/dist-packages/xcvrd/xcvrd.py", line 291, in post_port_sfp_info_to_db
Dec 11 01:16:45.079431 sonic INFO pmon#/supervisord: xcvrd     if not _wrapper_get_presence(physical_port):
Dec 11 01:16:45.079431 sonic INFO pmon#/supervisord: xcvrd   File "/usr/local/lib/python3.7/dist-packages/xcvrd/xcvrd.py", line 127, in _wrapper_get_presence
Dec 11 01:16:45.079431 sonic INFO pmon#/supervisord: xcvrd     return platform_chassis.get_sfp(physical_port).get_presence()
Dec 11 01:16:45.079471 sonic INFO pmon#/supervisord: xcvrd AttributeError: 'NoneType' object has no attribute 'get_presence'

Steps to reproduce the issue:

  1. boot the latest image on a VOQ line card which has internal ports
  2. check the syslog file for the PMON module

Describe the results you received:

The below Backtrace in he syslog file

Dec 11 01:16:45.075905 sonic ERR pmon#sfp: SFP index 37 out of range (1-36)
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd Traceback (most recent call last):
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd   File "/usr/local/bin/xcvrd", line 8, in <module>
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd     sys.exit(main())
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd   File "/usr/local/lib/python3.7/dist-packages/xcvrd/xcvrd.py", line 1620, in main
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd     xcvrd.run()
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd   File "/usr/local/lib/python3.7/dist-packages/xcvrd/xcvrd.py", line 1539, in run
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd     port_mapping_data, retry_eeprom_set = self.init()
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd   File "/usr/local/lib/python3.7/dist-packages/xcvrd/xcvrd.py", line 1499, in init
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd     retry_eeprom_set = post_port_sfp_dom_info_to_db(is_warm_start, port_mapping_data, self.stop_event)
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd   File "/usr/local/lib/python3.7/dist-packages/xcvrd/xcvrd.py", line 511, in post_port_sfp_dom_info_to_db
Dec 11 01:16:45.079362 sonic INFO pmon#/supervisord: xcvrd     rc = post_port_sfp_info_to_db(logical_port_name, port_mapping, xcvr_table_helper.get_intf_tbl(asic_index), transceiver_dict, stop_event)
Dec 11 01:16:45.079431 sonic INFO pmon#/supervisord: xcvrd   File "/usr/local/lib/python3.7/dist-packages/xcvrd/xcvrd.py", line 291, in post_port_sfp_info_to_db
Dec 11 01:16:45.079431 sonic INFO pmon#/supervisord: xcvrd     if not _wrapper_get_presence(physical_port):
Dec 11 01:16:45.079431 sonic INFO pmon#/supervisord: xcvrd   File "/usr/local/lib/python3.7/dist-packages/xcvrd/xcvrd.py", line 127, in _wrapper_get_presence
Dec 11 01:16:45.079431 sonic INFO pmon#/supervisord: xcvrd     return platform_chassis.get_sfp(physical_port).get_presence()
Dec 11 01:16:45.079471 sonic INFO pmon#/supervisord: xcvrd AttributeError: 'NoneType' object has no attribute 'get_presence'

Describe the results you expected:

There should not such backtrace

Output of show version:

Latest code as Dec 01.

(paste your output here)

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

@mlok-nokia mlok-nokia changed the title [voq][pmon][xcvrd]xcvrd process show the backtrace in the syslog file on VOQ linecard [voq][pmon]xcvrd process show the backtrace in the syslog file on VOQ linecard Dec 11, 2021
@prgeor
Copy link
Contributor

prgeor commented Dec 14, 2021

Dec 11 01:16:45.075905 sonic ERR pmon#sfp: SFP index 37 out of range (1-36)

The index seems to be out of range due to which get_sfp() won't return the sfp object

@mlok-nokia
Copy link
Contributor Author

Dec 11 01:16:45.075905 sonic ERR pmon#sfp: SFP index 37 out of range (1-36)

The index seems to be out of range due to which get_sfp() won't return the sfp object

The port list which is returned by the port_mapping includes the internal ports (either Backplane or Inband port). These internal ports don't have transceiver. They need to be skipped or removed from port_mapping. The old method sfputilbase.py and sfputilhelper.py under sonic-platform-common have this handling.

@prgeor
Copy link
Contributor

prgeor commented Dec 14, 2021

Dec 11 01:16:45.075905 sonic ERR pmon#sfp: SFP index 37 out of range (1-36)
The index seems to be out of range due to which get_sfp() won't return the sfp object

The port list which is returned by the port_mapping includes the internal ports (either Backplane or Inband port). These internal ports don't have transceiver. They need to be skipped or removed from port_mapping. The old method sfputilbase.py and sfputilhelper.py under sonic-platform-common have this handling.

can you propose a fix similar to this sonic-net/sonic-platform-common#251

@mlok-nokia
Copy link
Contributor Author

mlok-nokia commented Dec 14, 2021

@prgeor Here is the fix: [voq][pmon]xcvrd process show backtrace in the syslog on VOQ linecard. sonic-net/sonic-platform-daemons#233

@prgeor
Copy link
Contributor

prgeor commented Jan 18, 2022

this issue has now been fixed. closing.

@prgeor prgeor closed this as completed Jan 18, 2022
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

No branches or pull requests

2 participants