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

Sometimes return "Connection timed out" when set auto mode continuously #30

Open
harveyquta opened this issue Dec 23, 2022 · 5 comments

Comments

@harveyquta
Copy link
Contributor

When set auto mode continuously, it will sometimes return "Connection timed out". But when set to manual mode, it won't happen.

set auto mode cmd:
busctl set-property xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone2 xyz.openbmc_project.Control.Mode Manual b false; \
busctl set-property xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone0 xyz.openbmc_project.Control.Mode Manual b false; \
busctl set-property xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone1 xyz.openbmc_project.Control.Mode Manual b false;

return:
Failed to set property Manual on interface xyz.openbmc_project.Control.Mode: Connection timed out

But if adding sleep between each busctl cmd, like below, the error will not happen.
busctl set-property xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone2 xyz.openbmc_project.Control.Mode Manual b false; sleep 0.1; \
busctl set-property xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone0 xyz.openbmc_project.Control.Mode Manual b false; sleep 0.1; \
busctl set-property xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone1 xyz.openbmc_project.Control.Mode Manual b false;

@harveyquta
Copy link
Contributor Author

if set manual mode continuously, the error also will not happen.

@Krellan
Copy link
Member

Krellan commented Dec 24, 2022

Very strange. I wonder what would be causing this?

@williamspatrick
Copy link
Member

Daemon blocked on sysfs calls to update fan speeds and not able to respond to dbus fast enough?

@harveyquta
Copy link
Contributor Author

Seems like what @williamspatrick said.
After I mark the dbus_call in dbus/dbuswrite.cpp, "Connection timed out" will not happen.
When set manual to false, _redundantWrite will be set to true, and pid will set property mandatorily one time.

@Krellan
Copy link
Member

Krellan commented Jun 6, 2023

This is a general problem, not just with the setting of automatic mode.

Sometimes D-Bus calls are just straight up forgotten about. The caller receives the timeout. The swampd program receives nothing at all, so it takes no action.

This problem happens rarely enough that it is tricky to debug. Any thoughts?

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

3 participants