Openbmc - Ipmid Crash issue. (Help Needed)
Kumar Thangavel
thangavel.k at hcl.com
Wed May 13 17:47:24 AEST 2020
Hi All,
Please find below the gerrit links for the Design and Sample code implementation of BIC request handling in the ipmi.
Design : https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/32213
Sample code implementation : https://gerrit.openbmc-project.xyz/c/openbmc/fb-ipmi-oem/+/32215
So, This is regarding the ipmi implementation issue as per the new design of handling BIC request,
1. The Netfn= 0x38 and cmd=1 is verified, we are getting the commands from the BIC, the same is received at ipmb and ipmid also. The register call back is also called. When we fill up the response from the ipmiOemBicHandler works fine. The response is received at the BIC as well.
2. But as per the new design, we need to call ipmid-command handler recursively. When we get the Netfn= 0x38 and cmd=1 command in ipmiOemBicHandler, the handler needs to open the packet and there will be an another command (for ex Netfn=6 and cmd=1 get_dev_id). ipmiOemBicHandler needs to send this command again to ipmid for getting the response. This makes a recursive call.
3. This recursive call is failed with boost::asio library, as "thread operation not supported". Then we tried enabling theading in ipmid, this crashes the ipmid process. (Method 2 in the gerrit link)
GDB LOG :
Program terminated with signal SIGSEGV, Segmentation fault.
#0 boost::asio::detail::epoll_reactor::epoll_reactor (ctx=..., this=<optimized out>)
at /usr/include/boost/asio/detail/impl/epoll_reactor.ipp:40
40 /usr/include/boost/asio/detail/impl/epoll_reactor.ipp: No such file or directory.
(gdb) bt
#0 boost::asio::detail::epoll_reactor::epoll_reactor (ctx=..., this=<optimized out>)
at /usr/include/boost/asio/detail/impl/epoll_reactor.ipp:40
#1 boost::asio::detail::service_registry::create<boost::asio::detail::epoll_reactor, boost::asio::execution_context> (owner=0x0)
at /usr/include/boost/asio/detail/impl/service_registry.hpp:87
#2 0x000340ac in boost::asio::detail::service_registry::do_use_service (owner=0x0, factory=<optimized out>, key=<synthetic pointer>...,
this=0x1879100) at /usr/include/boost/asio/detail/impl/service_registry.ipp:132
#3 boost::asio::detail::service_registry::do_use_service (owner=0x0, factory=<optimized out>, key=<synthetic pointer>..., this=0x1879100)
at /usr/include/boost/asio/detail/impl/service_registry.ipp:113
#4 boost::asio::detail::service_registry::use_service<boost::asio::detail::epoll_reactor> (this=0x1879100)
at /usr/include/boost/asio/detail/impl/service_registry.hpp:30
#5 boost::asio::use_service<boost::asio::detail::epoll_reactor> (e=...) at /usr/include/boost/asio/impl/execution_context.hpp:35
#6 boost::asio::detail::reactive_descriptor_service::reactive_descriptor_service (context=..., this=0x1879a78)
at /usr/include/boost/asio/detail/impl/reactive_descriptor_service.ipp:36
#7 boost::asio::detail::service_registry::create<boost::asio::detail::reactive_descriptor_service, boost::asio::io_context> (
owner=<optimized out>) at /usr/include/boost/asio/detail/impl/service_registry.hpp:87
#8 0x76d21b7c in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) q
Also we tried calling the recursive function with sd bus method, we see the same crash. (Method 1 in the gerrit link)
GDB LOG :
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x4b8ec990 in ?? ()
(gdb) bt
#0 0x4b8ec990 in ?? ()
#1 0x4bb709a0 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) list
685 /usr/include/c++/9.2.0/bits/shared_ptr.h: No such file or directory.
(gdb)
685 in /usr/include/c++/9.2.0/bits/shared_ptr.h
(gdb)
Could you please review the design and code implementation and provide your comments on this.
Thanks in Advance.
Note : if we are not using recursive method, we need to rewrite most of the commands Request and Response handling in the ipmid.
Thanks,
Kumar.
::DISCLAIMER::
________________________________
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20200513/79f0c6d2/attachment-0001.htm>
More information about the openbmc
mailing list