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

Black cal causes gui2 to error out waiting for dbus messages. #36

Open
DDR0 opened this issue Aug 29, 2019 · 0 comments
Open

Black cal causes gui2 to error out waiting for dbus messages. #36

DDR0 opened this issue Aug 29, 2019 · 0 comments
Assignees
Labels
client This issue is specific to a certain client, or is a problem with the way the API is used. gui2 Issues pertaining to the back-of-camera UI, chronos-gui-2. (Bug DDR about these.) nondeterministic This bug reproduces irregularly. Perhaps a race condition or an out-of-memory error is occuring? performance Some API operations are slow. Some shouldn't be. This is one of them.

Comments

@DDR0
Copy link
Contributor

DDR0 commented Aug 29, 2019

The API is very slow during black cal, which is causing gui2 to drop in to a breakpoint when the API connection times out after 5 seconds. The API should still respond in a second or two, even under load.

Reproduction: With the gui2 main screen open, run the following via SSH:

gdbus call --system --dest ca.krontech.chronos.control --object-path /ca/krontech/chronos/control --method ca.krontech.chronos.control.startCalibration "{'blackCal': <true>}" &

The UI will issue many warnings, usually dropping into a debugger at some point so you can figure out what went wrong.

 WARNING Chronos.api _asyncCallFinished() slow call: control.call('get', ['batteryChargePercent']) took 2467ms/100ms. (Total call time was 4468ms.)
 WARNING Chronos.api _asyncCallFinished() slow call: control.call('get', ['batteryChargePercent']) took 1205ms/100ms. (Total call time was 2312ms.)
 WARNING Chronos.api _asyncCallFinished() slow call: control.call('get', ['batteryChargePercent']) took 854ms/100ms. (Total call time was 856ms.)
 WARNING Chronos.api _asyncCallFinished() slow call: control.call('get', ['batteryChargePercent']) took 355ms/100ms. (Total call time was 358ms.)
 WARNING Chronos.api _asyncCallFinished() slow call: control.call('get', ['batteryChargePercent']) took 5001ms/100ms. (Total call time was 5003ms.)
Traceback (most recent call last):
  File "/root/gui/src/api2.py", line 457, in _asyncCallFinished
    raise e
  File "/root/gui/src/api2.py", line 449, in _asyncCallFinished
    raise DBusException("{} timed out ({}ms)".format((self), (API_TIMEOUT_MS)))
api2.DBusException: control.call('get', ['batteryChargePercent']) timed out (5000ms)

While we can simply up the API timeout, this starts to get into territory where the timeout is no longer effective. It is already 50x the ideal maximum call time.

@DDR0 DDR0 added client This issue is specific to a certain client, or is a problem with the way the API is used. gui2 Issues pertaining to the back-of-camera UI, chronos-gui-2. (Bug DDR about these.) nondeterministic This bug reproduces irregularly. Perhaps a race condition or an out-of-memory error is occuring? performance Some API operations are slow. Some shouldn't be. This is one of them. labels Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client This issue is specific to a certain client, or is a problem with the way the API is used. gui2 Issues pertaining to the back-of-camera UI, chronos-gui-2. (Bug DDR about these.) nondeterministic This bug reproduces irregularly. Perhaps a race condition or an out-of-memory error is occuring? performance Some API operations are slow. Some shouldn't be. This is one of them.
Projects
None yet
Development

No branches or pull requests

2 participants