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

Crash when calling ONLP's SFP API from openolt agent #3

Closed
saswat108 opened this issue Oct 14, 2019 · 2 comments
Closed

Crash when calling ONLP's SFP API from openolt agent #3

saswat108 opened this issue Oct 14, 2019 · 2 comments

Comments

@saswat108
Copy link

Hello Team,

While trying to use the ONLP's SFP API in openolt agent, I am encountering this error:

"Assignment of different size bitmaps
Aborted"

This is the sequence of function calls my function in openolt agent is making:

onlp_sfp_bitmap_t bitmap;
onlp_sfp_bitmap_t_init(&bitmap);
onlp_sfp_bitmap_get(&bitmap); ==> aborts here

I also see a coredump with the following backtrace:

#0 0x00007ffff5f6bc83 in aim_bitmap_get () from /lib/x86_64-linux-gnu/libonlp.so.1
#1 0x00007ffff5f6c142 in onlp_sfp_eeprom_read_locked__ () from /lib/x86_64-linux-gnu/libonlp.so.1
#2 0x00007ffff5f6c1e0 in onlp_sfp_eeprom_read () from /lib/x86_64-linux-gnu/libonlp.so.1
#3 0x00007ffff66189fa in platform_get_sfp_info () from /lib/x86_64-linux-gnu/libpkpi.so.0
#4 0x000000000042c08a in IfOperIndication (olt=, msg=0x7fffd80008c0) at src/indications.cc:267
#5 0x00007ffff5958c8b in ?? () from /broadcom/libbal_host_api.so
#6 0x00007ffff5953760 in bcmos_dft_task_handler () from /broadcom/libbal_host_api.so
#7 0x00007ffff76f04a4 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#8 0x00007ffff4fe5d0f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Regards,
Saswat

@Lewis-Kang
Copy link

Lewis-Kang commented Oct 14, 2019

Do you call onlp_init() before using other onlp APIs?
There is an application that uses onlp APIs. FYI. https://github.com/opencomputeproject/OpenNetworkLinux/blob/master/packages/base/any/onlp/src/onlp/module/src/onlp_main.c

@saswat108
Copy link
Author

Thanks, Lewis-Kang!
Adding onlp_init() resolved the issue.

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