Comments (5)
@andywongarista could you take a look if possible?
from sonic-platform-common.
@prgeor Could you please check this issue?.
from sonic-platform-common.
I haven't been able to reproduce this error exactly but I'm encountering a different error:
SONiC Software Version: SONiC.branch.master-ars.98914b08-buildimage.3855ce284-nightly-2021.12.23.18.34
Distribution: Debian 10.11
Kernel: 4.19.0-12-2-amd64
Build commit: 9c0ebe7ae
Build date: Thu Dec 23 18:43:55 UTC 2021
Built by: jenkins@jenkins-arsonic-2-vb59s
Platform: x86_64-arista_7060dx4_32
HwSKU: Arista-7060DX4-C32
ASIC: broadcom
ASIC Count: 1
Serial Number: JPE21204635
Model Number: DCS-7060DX4-32
Hardware Revision: 04.00
Uptime: 23:13:28 up 3:47, 2 users, load average: 0.23, 0.22, 0.27
>>> from sonic_platform.chassis import Chassis
>>> c=Chassis()
>>> c.get_sfp(1).get_transceiver_info()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/dist-packages/sonic_platform_base/sonic_xcvr/sfp_optoe_base.py", line 24, in get_transceiver_info
return api.get_transceiver_info() if api is not None else None
File "/usr/local/lib/python3.7/dist-packages/sonic_platform_base/sonic_xcvr/api/public/cmis.py", line 121, in get_transceiver_info
admin_info = self.xcvr_eeprom.read(consts.ADMIN_INFO_FIELD)
File "/usr/local/lib/python3.7/dist-packages/sonic_platform_base/sonic_xcvr/xcvr_eeprom.py", line 30, in read
return field.decode(raw_data, **decoded_deps)
File "/usr/local/lib/python3.7/dist-packages/sonic_platform_base/sonic_xcvr/fields/xcvr_field.py", line 252, in decode
result[field.name] = field.decode(raw_data[offset - start: offset + field.get_size() - start],
File "/usr/local/lib/python3.7/dist-packages/sonic_platform_base/sonic_xcvr/fields/xcvr_field.py", line 252, in decode
result[field.name] = field.decode(raw_data[offset - start: offset + field.get_size() - start],
File "/usr/local/lib/python3.7/dist-packages/sonic_platform_base/sonic_xcvr/fields/xcvr_field.py", line 203, in decode
code = struct.unpack(self.format, raw_data)[0]
struct.error: unpack requires a buffer of 1 bytes
I believe the inclusion of page 01 fields in the ADMIN_INFO_FIELD
group is causing this error for 400G DAC, e.g. https://github.com/Azure/sonic-platform-common/blob/77da9c8440dda385db745c070453ff343acc1eac/sonic_platform_base/sonic_xcvr/mem_maps/public/cmis.py#L64
from sonic-platform-common.
I haven't been able to reproduce this error exactly but I'm encountering a different error:
SONiC Software Version: SONiC.branch.master-ars.98914b08-buildimage.3855ce284-nightly-2021.12.23.18.34 Distribution: Debian 10.11 Kernel: 4.19.0-12-2-amd64 Build commit: 9c0ebe7ae Build date: Thu Dec 23 18:43:55 UTC 2021 Built by: jenkins@jenkins-arsonic-2-vb59s Platform: x86_64-arista_7060dx4_32 HwSKU: Arista-7060DX4-C32 ASIC: broadcom ASIC Count: 1 Serial Number: JPE21204635 Model Number: DCS-7060DX4-32 Hardware Revision: 04.00 Uptime: 23:13:28 up 3:47, 2 users, load average: 0.23, 0.22, 0.27 >>> from sonic_platform.chassis import Chassis >>> c=Chassis() >>> c.get_sfp(1).get_transceiver_info() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.7/dist-packages/sonic_platform_base/sonic_xcvr/sfp_optoe_base.py", line 24, in get_transceiver_info return api.get_transceiver_info() if api is not None else None File "/usr/local/lib/python3.7/dist-packages/sonic_platform_base/sonic_xcvr/api/public/cmis.py", line 121, in get_transceiver_info admin_info = self.xcvr_eeprom.read(consts.ADMIN_INFO_FIELD) File "/usr/local/lib/python3.7/dist-packages/sonic_platform_base/sonic_xcvr/xcvr_eeprom.py", line 30, in read return field.decode(raw_data, **decoded_deps) File "/usr/local/lib/python3.7/dist-packages/sonic_platform_base/sonic_xcvr/fields/xcvr_field.py", line 252, in decode result[field.name] = field.decode(raw_data[offset - start: offset + field.get_size() - start], File "/usr/local/lib/python3.7/dist-packages/sonic_platform_base/sonic_xcvr/fields/xcvr_field.py", line 252, in decode result[field.name] = field.decode(raw_data[offset - start: offset + field.get_size() - start], File "/usr/local/lib/python3.7/dist-packages/sonic_platform_base/sonic_xcvr/fields/xcvr_field.py", line 203, in decode code = struct.unpack(self.format, raw_data)[0] struct.error: unpack requires a buffer of 1 bytes
I believe the inclusion of page 01 fields in the
ADMIN_INFO_FIELD
group is causing this error for 400G DAC, e.g.
Yes. I could able to repro the same issue as well.
from sonic-platform-common.
issue is now fixed
from sonic-platform-common.
Related Issues (20)
- SfpUtilBase: not all EEPROM data are parsed HOT 10
- Enhance pcieutil to check actual presence of pcie device HOT 1
- xcvrd crashes while parsing QSFP-DD fields HOT 1
- Pytest: test_crm failed on loganalyzer error
- SFP-Refactor: Could not able to fetch get_transceiver_info() HOT 3
- [SFP-refactor] xcvrd crashes while trying to read CMIS passive cables HOT 2
- test-xcrvd unit test unstable HOT 1
- [SFP-Refactor] Modify transceiver dict vendor key name
- QSFP-DD FW upgrade doesn't work
- [syseeprom] Vendor extension TLV content is not displayed HOT 1
- [sonic_ssd] Nokia-7215: "show platform ssdhealth" not showing health percent HOT 1
- This repo is missing important files
- [sonic_xcvr]create_xcvr_api don't support port_id=0x0c
- xcvrd crash: Exception occured at CmisManagerTask thread due to TypeError HOT 2
- Question about cdb get_fw_info using cmis 4.0
- Incorrect vdm freeze and unfreeze is followed on collecting PM stats
- Unable to parse `Extended Specification Compliance` and `10/40G Ethernet Compliance Code` for `QSFP+ or later with SFF-8636 or SFF-8436` whose ID is 0x0D and `revision compliance` is greater than 2
- The order of the `SfpUtilHelper.logical` ports list is broken
- SFF-8472 Rx power conversion function incorrect
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-platform-common.