mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-02-04 13:00:27 +01:00
read-only-mirror of https://gitlab.freedesktop.org/upower/upower
The AC was plugged and unplugged repeatedly, and hit this leak in up_device_supply_battery_refresh(). Four variables in UpBatteryInfo need to be free. ... <snip> ... ==2825085== 1,152 bytes in 9 blocks are definitely lost in loss record 1,851 of 1,865 ==2825085== at 0x484CE40: realloc (vg_replace_malloc.c:1801) ==2825085== by 0x4916ADA: g_realloc (gmem.c:171) ==2825085== by 0x4939E06: g_string_expand (gstring.c:82) ==2825085== by 0x4939EA1: g_string_sized_new (gstring.c:113) ==2825085== by 0x11262C: up_device_get_id (up-device.c:347) ==2825085== by 0x113136: up_device_notify (up-device.c:241) ==2825085== by 0x4A1B811: g_closure_invoke (gclosure.c:833) ==2825085== by 0x4A4C0C1: signal_emit_unlocked_R.isra.0 (gsignal.c:3735) ==2825085== by 0x4A3CCE8: signal_emit_valist_unlocked (gsignal.c:3534) ==2825085== by 0x4A3CF71: g_signal_emit_valist (gsignal.c:3277) ==2825085== by 0x4A3D033: g_signal_emit (gsignal.c:3597) ==2825085== by 0x4A27C75: g_object_dispatch_properties_changed.lto_priv.0 (gobject.c:1827) ==2825085== ==2825085== LEAK SUMMARY: ==2825085== definitely lost: 3,663 bytes in 333 blocks ==2825085== indirectly lost: 0 bytes in 0 blocks ==2825085== possibly lost: 960 bytes in 3 blocks ==2825085== still reachable: 172,351 bytes in 2,205 blocks ==2825085== suppressed: 0 bytes in 0 blocks ==2825085== Reachable blocks (those to which a pointer was found) are not shown. ==2825085== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==2825085== ==2825085== For lists of detected and suppressed errors, rerun with: -s ==2825085== ERROR SUMMARY: 20 errors from 20 contexts (suppressed: 0 from 0) Resolves: #305 |
||
|---|---|---|
| .ci | ||
| contrib | ||
| data/zsh-completion | ||
| dbus | ||
| doc | ||
| etc | ||
| libupower-glib | ||
| po | ||
| policy | ||
| rules | ||
| src | ||
| tools | ||
| .git-blame-ignore-revs | ||
| .gitconfig | ||
| .gitlab-ci.yml | ||
| .markdownlint.json | ||
| .pre-commit-config.yaml | ||
| AUTHORS | ||
| code-of-conduct.md | ||
| COMMITMENT | ||
| COPYING | ||
| HACKING.md | ||
| meson.build | ||
| meson_options.txt | ||
| NEWS | ||
| README.md | ||
| RELEASE | ||
UPower
Requirements:
glib-2.0 >= 2.66.0
gio-2.0 >= 2.16.1
gudev-1.0 >= 235 (Linux)
libimobiledevice-1.0 >= 0.9.7 (optional)
polkit-gobject-1 >= 124
UPower is an abstraction for enumerating power devices, listening to device events and querying history and statistics. Any application or service on the system can access the org.freedesktop.UPower service via the system message bus.
Debugging
When doing bug reports, the following information can be useful:
grep . /sys/class/power_supply/*/*
This includes the current kernel view of all power supplies in the system. It is always a good idea to include this information.udevadm info -e
This shows the hardware configuration and is relevant when e.g. the type of an external device is misdetected.upower -d
Shows upower's view of the stateupower --monitor-detail
Dumps device information every time that a change happens. This helps with debugging dynamic issues.udevadm monitor
Dumps the udev/kernel reported hardware changes (and addition/removal). This is helpful when debugging dynamic issues, in particular if it is not clear whether the issue is coming from the kernel or upower.
In addition, it can also be useful to run upower in debug mode and post the logs. There are two ways of doing so:
- Run upower daemon manually, you can do so using:
sudo /usr/libexec/upowerd -rd - Modify the systemd service and restart. This is best done by:
-
sudo systemctl edit upower.service -
Adding the two lines:
[Service] Environment=G_MESSAGES_DEBUG=all -
sudo systemctl restart upower.service -
Grab logs using
journalctl -u upower.serviceor similar
-