hadess / iio-sensor-proxy

IIO accelerometer sensor to input device proxy
197 stars 64 forks source link

Assertion on startup #147

Closed hadess closed 7 years ago

hadess commented 7 years ago

From https://github.com/systemd/systemd/issues/5160

Feb  3 09:13:34 ABO-HP iio-sensor-proxy[1101]: ERROR:iio-sensor-proxy.c:185:send_dbus_event: assertion failed: (data->connection)
Feb  3 09:13:34 ABO-HP systemd[1]: iio-sensor-proxy.service: Main process exited, code=killed, status=6/ABRT
Feb  3 09:13:34 ABO-HP systemd[1]: Failed to start IIO Sensor Proxy service.
Feb  3 09:13:34 ABO-HP systemd[1]: iio-sensor-proxy.service: Unit entered failed state.
Feb  3 09:13:34 ABO-HP systemd[1]: iio-sensor-proxy.service: Failed with result 'signal'.
Forage commented 7 years ago

Is there any additional information I can provide to track it down?

hadess commented 7 years ago

A backtrace of the assertion would be useful, but it's more likely that I just need to stare at the code.

hadess commented 7 years ago

It's a simple race, if the D-Bus setup is slower than setting up the devices, or we can't own the name quickly enough for whatever reason, then we'd assert when sending out the first changes through D-Bus.

The fix would be to postpone the D-Bus changes until we own the D-Bus name. I have a local patch that needs testing.

Forage commented 7 years ago

I can test it. You wouldn't happen to have (a PPA with) a build, would you? ;-)

Forage commented 7 years ago

I can confirm that installing the 2.2 fixes the problem for me. There are no longer instability issues when starting Ubuntu. Thank you!