Created attachment 120093 [details] [review] Patch to handle '@' sign in device path. Dear developers, I'm running a regular (gentoo) Linux on my Acer Chromebook 13 (nyan-big). It's a Tegra K1 device. Using upower-0.99.x upowerd crashes on start: ----------------- TI:19:40:32 Starting upowerd version 0.99.3 TI:19:40:32 cannot find a keyboard backlight TI:19:40:32 daemon now coldplug TI:19:40:32 registering subsystem : power_supply TI:19:40:32 taking a guess for power supply scope TI:19:40:32 added native-path: bq24735@5-0009 TI:19:40:32 object path = /org/freedesktop/UPower/devices/line_power_bq24735@5_0009 ** (upowerd:16902): CRITICAL **: dbus_g_connection_register_g_object: assertion 'g_variant_is_object_path (at_path)' failed Program received signal SIGTRAP, Trace/breakpoint trap. ----------------- As you can see, the @ in the object path is the problem. Looking at the code, I found the path generation routine doesn't handle '@' in the path. The attached patch replaces '@' with an 'a' in spirit of the other sanitation cases. FYI, the corresponding device folder is: /sys/devices/soc0/7000d400.spi/spi_master/spi32766/spi32766.0/cros-ec-i2c-tunnel.2/i2c-5/5-0009/power_supply/bq24735@5-0009 And contains: $ find . ./type ./power ./power/control ./power/runtime_active_time ./power/autosuspend_delay_ms ./power/runtime_status ./power/runtime_suspended_time ./device ./subsystem ./online ./uevent
Created attachment 134091 [details] [review] daemon: Fix crash when '@' is present in the device name GDBus doesn't like '@' in the object path, so escape it.
Created attachment 134092 [details] [review] linux: Add test for crash when battery has funky name
Attachment 134091 [details] pushed as fa38e1c - daemon: Fix crash when '@' is present in the device name Attachment 134092 [details] pushed as fb9f19c - linux: Add test for crash when battery has funky name
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.