kcsbridge cannot work with the latest sdbusplus package.
Hi All,
I built the BMC FW from the latest OpenBMC branch. And I found the ksc channel is not working.
I got the following error message:
kcsbridged -c ipmi-kcs1
terminate called after throwing an instance of 'sdbusplus::exception::SdBusError'
what(): Invalid path or interface: org.freedesktop.DBus.Error.InvalidArgs: Invalid argument
Aborted (core dumped)
So I did a check of the recent package changes.
The latest sdbusplus add the "validate interface and path passed to DBus", but there is a problem when kcsbridge call the "add_interface" API, the part of the regex checking function.
https://github.com/openbmc/sdbusplus/blob/7f664254a4365612b82db2fd8fb82798686e777b/include/sdbusplus/asio/object_server.hpp#L811
kcsbridge takes the one parameter of the /dev/ipmi-kcs*. But regex function didn't allow the character '-', so I got the exception message.
Does it need to add the regex checking to the "add_interface" API? Or add the character '-' to the regex checking pattern?
Thanks
Fran Hsu
E-Mail : [email protected]
Quoted 13 lines · Fran Hsu (徐誌謙)
Hi All,
I built the BMC FW from the latest OpenBMC branch. And I found the ksc channel is not working.
I got the following error message:
kcsbridged -c ipmi-kcs1
terminate called after throwing an instance of 'sdbusplus::exception::SdBusError'
what(): Invalid path or interface: org.freedesktop.DBus.Error.InvalidArgs: Invalid argument
Aborted (core dumped)
So I did a check of the recent package changes.
The latest sdbusplus add the "validate interface and path passed to DBus", but there is a problem when kcsbridge call the "add_interface" API, the part of the regex checking function.
https://github.com/openbmc/sdbusplus/blob/7f664254a4365612b82db2fd8fb82798686e777b/include/sdbusplus/asio/object_server.hpp#L811
kcsbridge takes the one parameter of the/dev/ipmi-kcs*. But regex function didn't allow the character '-', so I got the exception message.
Does it need to add the regex checking to the "add_interface" API? Or add the character '-' to the regex checking pattern?
Quoted 4 lines
Thanks
Fran Hsu
E-Mail : [email protected]
Hi Fran,
kcsbridged needs an update to not use a -. This was added because:
- The dbus spec is very clear about valid names for Interfaces, Object Paths, and Services [1].
- In some cases, sdbus itself and/or the dbus daemon actively check for valid names and give an error, but in a few cases the error was being ignored by applications.
- For names that sdbus was not verifying, it is possible they add verification in the future and cause code breakage.
I know I was helping one developer recently who was adding a new dbus element and they were stumped as to why their object was not showing up as they expected. It was due to an invalid name that sdbus was dropping. Rather than a silent error from sdbus we made this a hard, obvious error, by throwing an exception.
Thanks for reporting the issue. Are you interested in working up a fix, otherwise Vernon is the only listed maintainer presently?
[1] https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names
Signature · 1 line
Patrick Williams
Quoted 33 lines · Patrick Williams
Quoted 13 lines · Fran Hsu (徐誌謙)
Hi All,
I built the BMC FW from the latest OpenBMC branch. And I found the ksc channel is not working.
I got the following error message:
kcsbridged -c ipmi-kcs1
terminate called after throwing an instance of 'sdbusplus::exception::SdBusError'
what(): Invalid path or interface: org.freedesktop.DBus.Error.InvalidArgs: Invalid argument
Aborted (core dumped)
So I did a check of the recent package changes.
The latest sdbusplus add the "validate interface and path passed to DBus", but there is a problem when kcsbridge call the "add_interface" API, the part of the regex checking function.
https://github.com/openbmc/sdbusplus/blob/7f664254a4365612b82db2fd8fb82798686e777b/include/sdbusplus/asio/object_server.hpp#L811
kcsbridge takes the one parameter of the/dev/ipmi-kcs*. But regex function didn't allow the character '-', so I got the exception message.
Does it need to add the regex checking to the "add_interface" API? Or add the character '-' to the regex checking pattern?Quoted 4 lines
Thanks
Fran Hsu
E-Mail : [email protected]Hi Fran,
kcsbridged needs an update to not use a -. This was added because:
- The dbus spec is very clear about valid names for Interfaces, Object Paths, and Services [1].
- In some cases, sdbus itself and/or the dbus daemon actively check for valid names and give an error, but in a few cases the error was being ignored by applications.
- For names that sdbus was not verifying, it is possible they add verification in the future and cause code breakage.
Quoted 8 lines
I know I was helping one developer recently who was adding a new dbus element and they were stumped as to why their object was not showing up as they expected. It was due to an invalid name that sdbus was dropping. Rather than a silent error from sdbus we made this a hard, obvious error, by throwing an exception.
Thanks for reporting the issue. Are you interested in working up a fix, otherwise Vernon is the only listed maintainer presently?
Currently, we are dealing with this issue using a symlink to alias the kcs device.
root@intel-obmc:/tmp# cat /lib/udev/rules.d/99-ipmi-kcs.rules KERNEL=="ipmi-kcs3", SYMLINK+="ipmi_kcs3" KERNEL=="ipmi-kcs4", SYMLINK+="ipmi_kcs4"
Then we add the instance of the kcsbridge with the ipmi_kcs3 name. Keep in mind that whatever name you use, it should match the name in the /usr/share/ipmid-providers/channel_config.json file.
--Vernon
Hi Vernon,
Thanks, but sorry I didn't check this mail first, so I pushed a fix to Gerrit for review.
Using the alias name is easier than modifying the source code.
I will abandon the code review.
Thanks,
Fran Hsu
E-Mail : [email protected]
Quoted 70 lines
-----Original Message-----
From: Vernon Mauery <[email protected]>
Sent: Saturday, June 6, 2020 4:15 AM
To: Patrick Williams <[email protected]>
Cc: Fran Hsu (徐誌謙) <[email protected]>; [email protected]
Subject: Re: kcsbridge cannot work with the latest sdbusplus package.Quoted 3 lines · Patrick Williams
Quoted 2 lines · Fran Hsu (徐誌謙)
Hi All,
I built the BMC FW from the latest OpenBMC branch. And I found the kscchannel is not working.
Quoted 3 lines
Quoted 3 lines
I got the following error message:
kcsbridged -c ipmi-kcs1
terminate called after throwing an instance of'
sdbusplus::exception::SdBusError'Quoted 1 line
Quoted 1 line
what(): Invalid path or interface:org.freedesktop.DBus.Error.InvalidArgs: Invalid argument
Quoted 3 lines
Quoted 3 lines
Aborted (core dumped)
So I did a check of the recent package changes.
The latest sdbusplus add the "validate interface and path passed to DBus",but there is a problem when kcsbridge call the "
add_interface" API, the part of the regex checking function.Quoted 1 line
Quoted 1 line
https://github.com/openbmc/sdbusplus/blob/7f664254a4365612b82db2fd8fb
Quoted 2 lines
Quoted 2 lines
82798686e777b/include/sdbusplus/asio/object_server.hpp#L811 kcsbridge takes the one parameter of the
/dev/ipmi-kcs*. But regexfunction didn't allow the character '-', so I got the exception message.
Quoted 1 line
Quoted 1 line
Does it need to add the regex checking to the "
add_interface" API? Or addthe character '-' to the regex checking pattern?
Quoted 20 lines
Quoted 5 lines
Thanks
Fran Hsu
E-Mail : [email protected]Hi Fran,
kcsbridged needs an update to not use a -. This was added because:
- The dbus spec is very clear about valid names for Interfaces, Object Paths, and Services [1].
- In some cases, sdbus itself and/or the dbus daemon actively check for valid names and give an error, but in a few cases the error was being ignored by applications.
- For names that sdbus was not verifying, it is possible they add verification in the future and cause code breakage.
Quoted 8 lines
I know I was helping one developer recently who was adding a new dbus element and they were stumped as to why their object was not showing up as they expected. It was due to an invalid name that sdbus was dropping. Rather than a silent error from sdbus we made this a hard, obvious error, by throwing an exception.
Thanks for reporting the issue. Are you interested in working up a fix, otherwise Vernon is the only listed maintainer presently?
Currently, we are dealing with this issue using a symlink to alias the kcs device.
root@intel-obmc:/tmp# cat /lib/udev/rules.d/99-ipmi-kcs.rules KERNEL=="ipmi-kcs3", SYMLINK+="ipmi_kcs3" KERNEL=="ipmi-kcs4", SYMLINK+="ipmi_kcs4"Then we add the instance of the kcsbridge with the
ipmi_kcs3name. Keep in mind that whatever name you use, it should match the name in the/usr/share/ipmid-providers/channel_config.jsonfile.--Vernon
Hi Patrick,
Thanks for the explanation, I push a fix to Gerrit for reviewing.
Thanks
Fran Hsu
E-Mail : [email protected]
Quoted 65 lines
-----Original Message-----
From: Patrick Williams <[email protected]>
Sent: Friday, June 5, 2020 11:33 PM
To: Fran Hsu (徐誌謙) <[email protected]>
Cc: [email protected]; Vernon Mauery <[email protected]>
Subject: Re: kcsbridge cannot work with the latest sdbusplus package.Quoted 2 lines · Fran Hsu (徐誌謙)
Hi All,
I built the BMC FW from the latest OpenBMC branch. And I found the kscchannel is not working.
Quoted 3 lines
I got the following error message:
kcsbridged -c ipmi-kcs1
terminate called after throwing an instance of'
sdbusplus::exception::SdBusError'Quoted 1 line
what(): Invalid path or interface:org.freedesktop.DBus.Error.InvalidArgs: Invalid argument
Quoted 3 lines
Aborted (core dumped)
So I did a check of the recent package changes.
The latest sdbusplus add the "validate interface and path passed to DBus",but there is a problem when kcsbridge call the "
add_interface" API, the part of the regex checking function.Quoted 1 line
https://github.com/openbmc/sdbusplus/blob/7f664254a4365612b82db2fd8fb8
Quoted 2 lines
2798686e777b/include/sdbusplus/asio/object_server.hpp#L811 kcsbridge takes the one parameter of the
/dev/ipmi-kcs*. But regex functiondidn't allow the character '-', so I got the exception message.
Quoted 1 line
Does it need to add the regex checking to the "
add_interface" API? Or addthe character '-' to the regex checking pattern?
Quoted 5 lines
Thanks
Fran Hsu
E-Mail : [email protected]Hi Fran,
kcsbridged needs an update to not use a -. This was added because:
- The dbus spec is very clear about valid names for Interfaces, Object Paths, and Services [1].
- In some cases, sdbus itself and/or the dbus daemon actively check for valid names and give an error, but in a few cases the error was being ignored by applications.
- For names that sdbus was not verifying, it is possible they add verification in the future and cause code breakage.
I know I was helping one developer recently who was adding a new dbus element and they were stumped as to why their object was not showing up as they expected. It was due to an invalid name that sdbus was dropping. Rather than a silent error from sdbus we made this a hard, obvious error, by throwing an exception.
Thanks for reporting the issue. Are you interested in working up a fix, otherwise Vernon is the only listed maintainer presently?
[1]
https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-na
mes--
Patrick Williams