d6aa5525 | 31-May-2022 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
meson: add support for debug
Automatically enable the debugging code when doing debug build types, and enable that by default, so the code is built by default.
Change-Id: I17b1dbb79ba7ca85d9be65d1c
meson: add support for debug
Automatically enable the debugging code when doing debug build types, and enable that by default, so the code is built by default.
Change-Id: I17b1dbb79ba7ca85d9be65d1c6f0004abdcd88d6 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
ea119463 | 31-May-2022 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
main: Add unhandled exception debug information
In general destructors should not throw exceptions because they are possibly already being run during stack unwind from a previous exception. In thos
main: Add unhandled exception debug information
In general destructors should not throw exceptions because they are possibly already being run during stack unwind from a previous exception. In those situations the process will terminate with no opportunity for gracefully handling errors.
For the more typical case of primary exceptions during deconstruction, the exceptions coming out of sendIntrospectionCompleteSignal are unknown, so catch them, log them, and then terminate the process. Over time as the errors coming out of sendIntrospectionCompleteSignal are discovered, those errors can be added to a set of expected errors that need not terminate the process.
In the end, the behavior is only moderately changed - prior to this patch this exception would already propagate and the application terminate. The new behavior here is simply to make a note that it occurred, and to provide some guidance (this message) to whoever gets the bug when sendIntrospectionCompleteSignal inevitably does fail and throw an error.
Also, this makes clang happy (bugprone-exception-escape).
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: I67c11c732b3179afcf7174b6f09025083000b85b
show more ...
|
1f62380a | 31-May-2022 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
lint: fix trivial clang tidy errors
Change-Id: Ie5395004a451d6168249f56f75c5e6ae31dca4af Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> |
a664690b | 02-Jun-2022 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
associations: drop unused server parameter
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: Ic6d406b09f2552dcf0d6bf9ba284b37690f1563e |
a098a37a | 05-May-2022 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
style: comply with OpenBMC style guidelines
Change-Id: I72f86c59a0502777c861de901907c0a556c4c6c5 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> |
f944a450 | 05-May-2022 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
naming: be inclusive
Adhere to the project inclusive naming guidelines and also adhere to the OpenBMC style guidelines.
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: I5a365049
naming: be inclusive
Adhere to the project inclusive naming guidelines and also adhere to the OpenBMC style guidelines.
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: I5a365049b6fb27236dd55c8455fe13a4a9e7fd31
show more ...
|
2352088e | 26-May-2022 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
clang-format: update to OpenBMC latest
Ignore libmapper, because it is written in C and the CPP style guidelines are not appropriate.
Ignore subprojects; they can validate their formatting themselv
clang-format: update to OpenBMC latest
Ignore libmapper, because it is written in C and the CPP style guidelines are not appropriate.
Ignore subprojects; they can validate their formatting themselves.
Change-Id: Id88dcc49f4176c6443e7f53ca193ca8f3e83a51f Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
b15df6b2 | 11-Jan-2022 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
Use sdbusplus exception instead of the custom one
Currently mapper generates custom 'NotFoundException' exception when a path is not found in the object list. Instead of creating another exception u
Use sdbusplus exception instead of the custom one
Currently mapper generates custom 'NotFoundException' exception when a path is not found in the object list. Instead of creating another exception use 'ResourceNotFound' exception from the sdbusplus library.
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Change-Id: Ic4fa9d2eac56dc79782e7453113574197ffce49b
show more ...
|
0a13c765 | 28-Sep-2021 |
Ed Tanous <edtanous@google.com> |
Move mapper methods to free functions
As a design pattern, free functions are preferable to lambdas because they reduce scopes, and produce better stack traces which include the name of the function
Move mapper methods to free functions
As a design pattern, free functions are preferable to lambdas because they reduce scopes, and produce better stack traces which include the name of the function when things go wrong. This commit moves them. Unfortunately, because of the interface_map capture, we still need the lambda to be able to capture that reference, but that still seems much better than leaving everything in a lambda.
In theory, this also makes them easier to unit test, although that pattern isn't shown directly in this patchset.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ib3ade71ab4572378461a62e233738776578de2f1
show more ...
|
a02cd54c | 12-Oct-2021 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
meson.build: drop config.h
These DBus things (service, interface, path) are not intended to be configurable in any way. Try to discourage them from being changed by removing them from meson.build j
meson.build: drop config.h
These DBus things (service, interface, path) are not intended to be configurable in any way. Try to discourage them from being changed by removing them from meson.build just in case that suggests that perhaps they are meant to be overriden.
As the DBus names are the only content in config.h, config.h can be removed completely.
Change-Id: I654473333932a8626a0ace5ee5a865dd14aaf296 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
bedd4165 | 08-Sep-2021 |
Patrick Williams <patrick@stwcx.xyz> |
exception: add errno
NotFoundException inherits from an sdbusplus exception, which now requires a 'get_errno' interface.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I549f26a0f209
exception: add errno
NotFoundException inherits from an sdbusplus exception, which now requires a 'get_errno' interface.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I549f26a0f2096df3be6cc05870c58755e46f393b
show more ...
|
cbca32ec | 02-Aug-2021 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
build: drop autotools support
Change-Id: Ic159830e2ccbc8934f23eb4eff7d15c83a7ffaf0 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> |
0aa15907 | 08-May-2019 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
build: Add meson support
Add support for buildling with meson.
Support for --enable-oe-sdk is dropped because running unit tests on the build system is now supported directly with meson subprojects
build: Add meson support
Add support for buildling with meson.
Support for --enable-oe-sdk is dropped because running unit tests on the build system is now supported directly with meson subprojects:
meson buildir && ninja -C buildir test
I tested this by building a witherspoon image and booting it to multi-user and verifying the mapper-wait functionality works correctly.
Change-Id: I86e5efc7b7c89183219a4c890ad658e334765fc1 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
efd58275 | 03-Aug-2021 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
tests: fix use-after-free
sdbusplus::asio::connection saves a reference to the io context passed to its constructor so we need to increase its scope.
Change-Id: Ia1bf05871329a06ec39e6c0cef17e92c0d3
tests: fix use-after-free
sdbusplus::asio::connection saves a reference to the io context passed to its constructor so we need to increase its scope.
Change-Id: Ia1bf05871329a06ec39e6c0cef17e92c0d37b138 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
2d41d6ab | 03-Aug-2021 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
build: fix unused-parameter warnings
A couple changes to enable the use of -Wunused-parameter.
libmapper is built with the c compiler, which does not support omitting the parameter name in the func
build: fix unused-parameter warnings
A couple changes to enable the use of -Wunused-parameter.
libmapper is built with the c compiler, which does not support omitting the parameter name in the function definition, so use the de-facto workaround and define an UNUSED() cpp macro.
Change-Id: I1c0d79d33097417fc3689351c4787e591fc23e9c Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
b89c6614 | 22-Jul-2021 |
Lei YU <yulei.sh@bytedance.com> |
associations: Handle SdBusError exception
In checkIfPendingAssociation() it could create new interface on DBus objects. The interface::interface() could throw if it fails, and mapperx would crash du
associations: Handle SdBusError exception
In checkIfPendingAssociation() it could create new interface on DBus objects. The interface::interface() could throw if it fails, and mapperx would crash due to the exception:
phosphor-mapper[428]: terminate called after throwing an instance of 'sdbusplus::exception::SdBusError' phosphor-mapper[428]: what(): sd_bus_add_object_vtable: org.freedesktop.DBus.Error.InvalidArgs: Invalid argument
Workaround this issue by adding try-catch and skip the interface to prevent mapperx from crash.
Fixes openbmc/phosphor-objmgr#21
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: Ibe3e887dcd95c01e1270bf218fd47572852e1e54
show more ...
|
bb40bd36 | 12-Feb-2021 |
Adrian Ambrożewicz <adrian.ambrozewicz@intel.com> |
Introduced retries for timeout on do_associatons
do_introspect already has retry mechanism in place for busy workloads at early stages of system boot. This change introduces exactly the same handlin
Introduced retries for timeout on do_associatons
do_introspect already has retry mechanism in place for busy workloads at early stages of system boot. This change introduces exactly the same handling for next step of ObjectMapper flow - getting Associations.
During performance tests with spawning multiple sensors I was able to observe errors due to timeouted do_associations call. Copying retry behavior from do_introspect allowed me to spawn successfully 4000 sensors in the system (1500 without this change).
Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz@intel.com> Change-Id: I2c6c8b8b6b96186e0f49cf8b91c185a9c928c337
show more ...
|
3735ea2e | 11-Nov-2020 |
Patrick Williams <patrick@stwcx.xyz> |
exception: switch from org.freedesktop to openbmc
sd-bus makes it nearly impossible to differentiate between `org.freedesktop.DBus.Error` types caused by the sd-bus library or returned by an applica
exception: switch from org.freedesktop to openbmc
sd-bus makes it nearly impossible to differentiate between `org.freedesktop.DBus.Error` types caused by the sd-bus library or returned by an application. Therefore, we should migrate to having no error types of `org.freedesktop.DBus.*`, in order to allow clients to differentiate. There are no cases currently where code is explicitly looking for `FileNotFound`, so there should not be any dependencies on this change.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I414b8a19556a8608561fee912733e04bea1a2b3e
show more ...
|
21c60595 | 18-Aug-2020 |
Ed Tanous <ed@tanous.net> |
Fix includes and update to latest io_context
sdbusplus today #includes asio.hpp, which causes it to compile a lot of things that eventually get thrown away. This causes worse build problems than no
Fix includes and update to latest io_context
sdbusplus today #includes asio.hpp, which causes it to compile a lot of things that eventually get thrown away. This causes worse build problems than normal.
As part of cleaning this up, the mapper needs to move to utilizing its own #includes for features, rather than relying on sdbusplus.
Also, move names from io_service to io_context to prepare for boost 1.74.
Signed-off-by: Ed Tanous <ed@tanous.net> Change-Id: Ie8063e66eba7021b2dc3f4f0aeafeb1f2c5f8e1b
show more ...
|
64354ef2 | 21-Aug-2020 |
Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> |
Announce service availability on D-Bus after all initialization
This fixes a bug, where in, mapper was announcing the availability of service prior to initialiazing.
Change-Id: I20b9af7716501dcd93b
Announce service availability on D-Bus after all initialization
This fixes a bug, where in, mapper was announcing the availability of service prior to initialiazing.
Change-Id: I20b9af7716501dcd93b63f7c60bfc3c2692111c0 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
show more ...
|
eecc196b | 10-Jun-2020 |
Andrew Geissler <geissonator@yahoo.com> |
unit-test: ensure distinct dbus objects
sdbusplus recently added some code which ensures duplicate D-Bus objects are not hosted under the same service. Modify the objects the unit tests use to ensur
unit-test: ensure distinct dbus objects
sdbusplus recently added some code which ensures duplicate D-Bus objects are not hosted under the same service. Modify the objects the unit tests use to ensure they are distinct.
Without this change, three of the unit tests in associations were failing.
Change-Id: If52dc90d63b92b0e5dbae55c9488fdaec27fad17 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
2bb2d6ba | 13-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: replace message::variant with std::variant
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ifc7c680ca196882d890d8b7061fe56428285c276 |
b05bc12c | 13-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: remove deprecated variant_ns
Change-Id: I96964f562c505979ad3a5c6a919c8094ba219da9 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
c52be0d2 | 14-Jan-2020 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
Add a retry mechanism for introspection
Some processes, when starting up have long delays after registering on the D-Bus that cause the mapper to timeout on introspection. The mapper should be more
Add a retry mechanism for introspection
Some processes, when starting up have long delays after registering on the D-Bus that cause the mapper to timeout on introspection. The mapper should be more resilient and retry several times before giving up.
This adds a 3X retry as a balance between never giving up and breaking without cause.
Example errors before this change: phosphor-mapper[245]: Introspect call failed with error: generic:110, Connection timed out on process: xyz.openbmc_project.CPUSensor path: / phosphor-mapper[245]: Introspect call failed with error: generic:110, Connection timed out on process: xyz.openbmc_project.EntityManager path: /xyz/openbmc_project/EntityManager
Tested: Boot and see that there are no Introspect call failed timeuot messages.
Change-Id: I08c0219f445340588d973a2a19ade5a045b3f82e Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
d0cf9428 | 17-Sep-2019 |
John Wang <wangzqbj@inspur.com> |
Drop support for old association interface
A new association interface is defined in phosphor-dbus-interfaces It would be nice to move the local version of the interface to the new one.
The behavio
Drop support for old association interface
A new association interface is defined in phosphor-dbus-interfaces It would be nice to move the local version of the interface to the new one.
The behavior of how association work is described here: https://github.com/openbmc/docs/blob/master/object-mapper.md#associations
I did some searching and confirmed that all the old interfaces (except the openbmc/pyphosphor, but we have removed support for python) should have been removed, so drop the support for the old interface here.
Partially resolves openbmc/openbmc#3584
In addition, when I commited this change, ci reported code format error:
@libmapper/mapper.h -int mapper_wait_async(sd_bus*, sd_event*, char* [], void (*)(int, void*), void*, +int mapper_wait_async(sd_bus*, sd_event*, char*[], void (*)(int, void*), void*,
Fixed that.
Signed-off-by: John Wang <wangzqbj@inspur.com> Change-Id: I0c2d0458a3f55f4671b91f6492e7218ecc3df4aa
show more ...
|