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

phosphor-dbus-monitor: elog doesn't work for deferrable callbacks #3352

Closed
AlexanderAmelkin opened this issue Aug 8, 2018 · 4 comments
Closed

Comments

@AlexanderAmelkin
Copy link
Contributor

As we're trying to implement extended temperature-based shutdown we've stumbled at this behavior in pdm:

  1. Method watch->callback(Context::START) is called on program start from main() function in main.cpp in a loop: for (auto& watch : ConfigPropertyWatches::get());
  2. If there was any condition in yaml file with defer attribute, a DeferrableCallback is created for it. operator() is called then for DeferrableCallback on program start with Context::START as an argument;
  3. Object timer is created on the first operator() call in DeferrableCallback. The argument to operator(), which is Context::START, is passed to the timer constructor and is saved there;
  4. Timer's context is not changed on subsequent calls to operator();
  5. When the timer expires, it calls operator() with the saved Context::START context, always;
  6. If the next callback is a DBus method call, the context is not checked and the method is called, but if the next callback is ElogWithMetadataCapture, the context is checked and the method is not called for Context::START

Due to that, we now can not log sensor threshold crossing if we want to do it with a delay and an extra check for persistence of the condition.

We'd like to know if it's a bug or an intended behavior? Maybe we must use some different approach to logging/acting on threshold crossing?

@mine260309
Copy link
Contributor

@spinler may have a look into this.

@spinler
Copy link
Contributor

spinler commented Aug 9, 2018

@AlexanderAmelkin That would be good to get fixed. Do you have a proposal?

@AlexanderAmelkin
Copy link
Contributor Author

@spinler, it's great to know that this is indeed a bug. We will think about the fix. Don't have any ready.

@geissonator
Copy link
Contributor

geissonator commented Aug 22, 2018

Issue moved to openbmc/phosphor-dbus-monitor #1 via ZenHub

We've decided to start tracking the bugs in the repo they belong to now.

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

4 participants