#
afac94d1 |
| 23-Oct-2024 |
George Liu <liuxiwei@ieisystem.com> |
Fix the coredump problem caused by lock acquisition failure
As net-ipmid depends on ipmid, stress testing found that frequent start/stop of net-ipmid will cause coredump due to lock acquisition fail
Fix the coredump problem caused by lock acquisition failure
As net-ipmid depends on ipmid, stress testing found that frequent start/stop of net-ipmid will cause coredump due to lock acquisition failure in ipmid's inithannelPersistData. Since net-ipmid depends on ipmid, stress testing found that if net-ipmid is started/stopped frequently, it will exit abnormally due to failure to obtain the lock in the inithannelPersistData method of ipmid. ``` netipmid-eth1[893]: terminate called after throwing an instance of ‘boost::interprocess::lock_exception’ netipmid-eth1[893]: what(): boost::interprocess::lock_exception ```
Because in the main method of net-ipmid, the ipmi::ipmiChannelInit method is called first, and then the startEventLoop method is called to process the signal. This will cause a bug: 1. After net-ipmid@eth0 starts, ipmi::ipmiChannelInit will be executed to initialize and construct ChannelConfig. 2. The initChannelPersistData method will be executed in the construction method to obtain the lock and load the configuration. 3. If the stop method of net-ipmid is executed before the construction method is completed, the held lock will not be released correctly 4. If start is executed immediately at this time, the ipmid process will coredump because the current lock is undefined.
This submission moves the signal processing to before the ipmi::ipmiChannelInit method, which will ensure that if net-ipmid starts and captures abnormal operations, it will stop io first, so that the held lock will be released correctly.
Tested: Using this patch, no ipmid coredump occurs in the stress test.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I29694405679330c083fa35d04443fb2e31bfca3b
show more ...
|
#
bc8958fe |
| 03-Jul-2022 |
George Liu <liuxiwei@inspur.com> |
Update to latest clang-format
Refer:https://github.com/openbmc/docs/blob/ac5d544553934f8083c61c5986a1420261bc8a4c/style/cpp/.clang-format
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id:
Update to latest clang-format
Refer:https://github.com/openbmc/docs/blob/ac5d544553934f8083c61c5986a1420261bc8a4c/style/cpp/.clang-format
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I1e06864afc29ce7de463e62fa2a0eb6f70e8fd93
show more ...
|
#
2085ae07 |
| 10-Jun-2021 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
replace tuple-based singleton with individual singletons
The tuple-based singletons did not actually enforce singleton behavior and the requirement of the accessor mechanism to include all of the me
replace tuple-based singleton with individual singletons
The tuple-based singletons did not actually enforce singleton behavior and the requirement of the accessor mechanism to include all of the member types at once was starting to cause a header prerequisite tangle. This removes the cross-dependencies and enforces actual singletons by making a single way to access the class.
Tested: Run ipmitool to show that behavior has not changed
Change-Id: Ie966e1142363d279365b1095066380c8383e9f9b Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
#
7408e76a |
| 17-May-2020 |
Andrew Geissler <geissonator@yahoo.com> |
string: ensure string included
Latest upstream yocto appears to have removed a free include of string. This is causing compile failures for files which do not include it properly.
Signed-off-by: An
string: ensure string included
Latest upstream yocto appears to have removed a free include of string. This is causing compile failures for files which do not include it properly.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I76b1d73d045f98bd457c155086e000a430134918
show more ...
|
#
8c0bf983 |
| 20-Oct-2019 |
Alvin Wang <alvinwang@msn.com> |
Add VLAN device binding
IPMI net channel supports the VLAN. This patch will bind the service to VLAN device if the VLANID is set in net channel.
Tested: In all the steps, use following commands to
Add VLAN device binding
IPMI net channel supports the VLAN. This patch will bind the service to VLAN device if the VLANID is set in net channel.
Tested: In all the steps, use following commands to check if ipmi overlan is still working and lan channel info is correct. ipmitool -I lanplus ... mc info ipmitool -I lanplus ... lan print 1
1. Start the phosphor-ipmi-net@eth0.service and this service binds to eth0 device # Command to get the binding device journalctl -u phosphor-ipmi-net@eth0.service -o verbose | grep \ INTERFACE INTERFACE=eth0
2. Set the VLANID (123) for channel 1 (eth0) and restart the service. The service is binded to eth0.123 # Command to set the channel 1 VLANID ipmitool -I lanplus ... lan set 1 vlan id 123
# Command to restart systemctl restart phosphor-ipmi-net@eth0.service
# Command to check the binding journalctl -u phosphor-ipmi-net@eth0.service -o verbose | grep \ INTERFACE INTERFACE=eth0.123
3. Disable the VLANID for channel 0 and restart the service. The service is binded to eth0 # Command to disable the channel 1 VLANID ipmitool -I lanplus ... lan set 1 vlan id off
# Command to restart systemctl restart phosphor-ipmi-net@eth0.service
# Command to check the binding journalctl -u phosphor-ipmi-net@eth0.service -o verbose | grep \ INTERFACE INTERFACE=eth0
Limitation: Need to restart this service when the VLANID is changed. This should be done in phosphor-host-ipmid.
Change-Id: I6c05aacf6b18cb1fa0d1cabe6ad36f0d683948d1 Signed-off-by: Alvin Wang <alvinwang@msn.com>
show more ...
|
#
d92bc324 |
| 15-Mar-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
spawn one rmcpp bridge per interface
According to the new architecture, each bridge should be a separate process, or at the very least, be attached on a separate D-Bus connection with a well-known n
spawn one rmcpp bridge per interface
According to the new architecture, each bridge should be a separate process, or at the very least, be attached on a separate D-Bus connection with a well-known name that corresponds to the channel name.
This commit brings netipmid to a state where it can be launched as: systemctl start phosphor-ipmi-net@eth0
with a parameterized unit file and socket file that binds the socket to the interface specified. If not launched this way, it will by default be bound to all interfaces.
This includes the new parameterized service and socket file and the autoconf/automake magic to install them to the correct place.
Tested-by: launch netipmid via current unit file/socket file launch netipmid via parameterize unit file/socket file
Change-Id: Ib202015fb560da269e535f11c0ac316b17f6c262 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
#
7a4ea795 |
| 25-Oct-2018 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
netipmid: Remove unused event references
Now that all the provider libraries are only loaded by the main ipmid queue, there are no callers for the event object, so it can be removed. The same goes f
netipmid: Remove unused event references
Now that all the provider libraries are only loaded by the main ipmid queue, there are no callers for the event object, so it can be removed. The same goes for the event loop; all users of the sd_event object have been replaced with boost::asio, so it can be removed.
Change-Id: Id271c4960a2c5386d6163cc9baecdc368e5e328f Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
#
6f353e86 |
| 09-Nov-2018 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
netipmid: move sol timers to asio
The IPMI SOL console was using sd_event-based timers directly (without any abstraction). This moves to a much higher level abstraction that is very easy to use: asi
netipmid: move sol timers to asio
The IPMI SOL console was using sd_event-based timers directly (without any abstraction). This moves to a much higher level abstraction that is very easy to use: asio timers.
Change-Id: Id5df76a1918cdfae420e01884d664234810b7abd Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
#
7e4a6517 |
| 09-Nov-2018 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
netipmid: move sol console sockets to asio
Rewrite the SOL console sockets use boost::asio. This reduces code size and ties better into the main asio io loop.
Change-Id: Ia79b9aa3fa3c7ce1ddd9b609b0
netipmid: move sol console sockets to asio
Rewrite the SOL console sockets use boost::asio. This reduces code size and ties better into the main asio io loop.
Change-Id: Ia79b9aa3fa3c7ce1ddd9b609b032160a88394f8c Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
#
7a0142c5 |
| 09-Nov-2018 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
netipmid: move raw sockets to boost::asio sockets
Replacing the raw socket code with boost::asio sockets once again provides a simple API with fewer lines of code.
Change-Id: Ibdd4b5ecbead947128200
netipmid: move raw sockets to boost::asio sockets
Replacing the raw socket code with boost::asio sockets once again provides a simple API with fewer lines of code.
Change-Id: Ibdd4b5ecbead947128200f17025c351d9b3ec859 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
#
cbccb05a |
| 24-Oct-2018 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
netipmid: move event loop to boost::asio::io_context
Replacing the event loop with asio provides for more flexibility and less code than the sd_event model. Intially, this will require the loop to h
netipmid: move event loop to boost::asio::io_context
Replacing the event loop with asio provides for more flexibility and less code than the sd_event model. Intially, this will require the loop to handle both sd_events with a wrapper, but after all the sd_event sources are replaced with asio event sources the wrapper can be removed.
Change-Id: Icf020c6c26a214bb1239641733c89603501c0c49 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
#
9e801a2b |
| 12-Oct-2018 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
netipmid: apply clang-format rules
Lots of whitespace change. Let clang-format do its job and keep the code looking nice.
Change-Id: Idfcad1a99cab8170d55a06163de8ad3f420b68b7 Signed-off-by: Vernon
netipmid: apply clang-format rules
Lots of whitespace change. Let clang-format do its job and keep the code looking nice.
Change-Id: Idfcad1a99cab8170d55a06163de8ad3f420b68b7 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
#
166c71a1 |
| 23-Mar-2018 |
Ratan Gupta <ratagupt@in.ibm.com> |
Create sd_event outside from EventLoop
Presently timer in the provider library needs the sd_event and sd_event gets created in the startEventLoop. RegisterCallbackHandlers gets called before the sta
Create sd_event outside from EventLoop
Presently timer in the provider library needs the sd_event and sd_event gets created in the startEventLoop. RegisterCallbackHandlers gets called before the startEventLoop hence not getting the event.
This commit creates the sd_event outside from the sd_event_loop and pass the sd_event reference to the startEventLoop function.
Tested: run the fru print in net-ipmid context.
Change-Id: I2b227154ba60e56d7faa6c8000c20a5231c4417c Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|
#
04edb9b0 |
| 20-Mar-2018 |
Ratan Gupta <ratagupt@in.ibm.com> |
Define the ipmid_get_sd_bus_event_connection
Due to the phosphor-host-ipmid commit (7a7f01) transporthandler.cpp start referring to the ipmid_get_sd_bus_event_connection function and transporthandle
Define the ipmid_get_sd_bus_event_connection
Due to the phosphor-host-ipmid commit (7a7f01) transporthandler.cpp start referring to the ipmid_get_sd_bus_event_connection function and transporthandler.cpp is a provider library for phosphor-net-ipmid.
This commit defines the ipmid_get_sd_bus_event_connection function in the context of phosphor-net-ipmid process.
Change-Id: I7fbc39f526138615966a90f78884a80b4cf063f4 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|
#
28d993a8 |
| 21-Apr-2017 |
Tom Joseph <tomjoseph@in.ibm.com> |
Add API to add host console socket to the event loop.
Change-Id: Iee5eacb0948fa5bed8426f38cdbdc04cdf7afa90 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
|
#
807c7e89 |
| 09-Feb-2017 |
Tom Joseph <tomjoseph@in.ibm.com> |
Interfaces for the sd_event_loop adaptation
The sd_event_loop is adapted for handling the udp socket for IPMI network traffic, host console unix socket, character accumulate interval timer & retry i
Interfaces for the sd_event_loop adaptation
The sd_event_loop is adapted for handling the udp socket for IPMI network traffic, host console unix socket, character accumulate interval timer & retry interval timer for the SOL payload.
Change-Id: I6ccec70821c01ae6db0bf04049a61e7854a798ec Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
show more ...
|