Package: acpitool
Version: 0.5.1-6
Followup-For: Bug #885623
X-Debbugs-Cc: phil...@marek.priv.at
acpitool breaks with a Lenovo L480 and Linux version 5.10.0-8-amd64:
# acpitool
acpitool: battery.cpp:816: int Count_Batteries_SysFS(): Assertion
`findex < 4' failed.
Abgebrochen
# gdb --args acpitool
GNU gdb (Debian 10.1-2) 10.1.90.20210103-git
...
(gdb) r
Starting program: /usr/bin/acpitool
acpitool: battery.cpp:816: int Count_Batteries_SysFS(): Assertion
`findex < 4' failed.
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: Datei oder Verzeichnis
nicht gefunden.
(gdb) bt full
#0 __GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:50
...
#4 0x0000555555566b17 in Count_Batteries_SysFS () at
battery.cpp:816
namelist = 0x5555555969c0
n = <optimized out>
battery_dir = 0x555555585090
filename =
{"/sys/class/power_supply/ucsi-source-psy-USBC000:0099/type\000\000\000\000\000\000\000",
"/sys/class/power_supply/ucsi-source-psy-USBC000:0098/type\000\377\377\177\000\000@g",
"/sys/class/power_supply/ucsi-source-psy-USBC000:0097/type\000\000\000\000\000\000\000",
"/sys/class/power_supply/ucsi-source-psy-USBC000:0096/type\000\000\000\000\000\000\000"}
str =
"\000\000\000\000\000\000\000\000\000\246K\fN\236\267\"\001\377\377\377\377\377\377\377",
'\000' <repeats 33 times>, "\246K\fN\236\267\"\000
\000\000\000\000\000\000\001", '\000' <repeats 15 times>,
"\301hVUUU\000\000\000\000\000"
name = <optimized out>
dirname = 0x55555556c472 "/sys/class/power_supply/"
findex = 4
batcount = 0
__PRETTY_FUNCTION__ = "int Count_Batteries_SysFS()"
#5 0x000055555556922d in Do_Battery_Stuff (show_empty=0,
info_level=info_level@entry=0, verbose=verbose@entry=0) at
battery.cpp:81
Batt_Info = {0x0, 0x0}
Bat_Nr = <optimized out>
Remaining_Percentage = <optimized out>
Remaining_Time = <optimized out>
Battery_Left_Percent = <optimized out>
Time_In_Seconds = 0
Hours = 0
Minutes = 0
The problem is (135 entries total) - though I believe that the
kernel-side could use a better representation:
# ls /sys/class/power_supply/
AC/ ucsi-source-psy-USBC000:00121/
BAT0/ ucsi-source-psy-USBC000:00122/
ucsi-source-psy-USBC000:001/ ucsi-source-psy-USBC000:00123/
ucsi-source-psy-USBC000:0010/ ucsi-source-psy-USBC000:00124/
ucsi-source-psy-USBC000:00100/ ucsi-source-psy-USBC000:00125/
ucsi-source-psy-USBC000:00101/ ucsi-source-psy-USBC000:00126/
Eg.
lrwxrwxrwx 1 root root 0 8. Sep 09:55 ucsi-source-psy-USBC000:0077
->
../../devices/platform/USBC000:00/power_supply/ucsi-source-psy-USBC000:0077
lrwxrwxrwx 1 root root 0 8. Sep 09:55 ucsi-source-psy-USBC000:0078
->
../../devices/platform/USBC000:00/power_supply/ucsi-source-psy-USBC000:0078
-- System Information:
Debian Release: bookworm/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable-debug'), (500,
'testing-debug'), (500, 'unstable'), (500, 'stable'), (1,
'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 5.10.0-8-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8),
LANGUAGE=de_AT:de
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages acpitool depends on:
ii libc6 2.31-17
ii libgcc-s1 11.2.0-4
ii libstdc++6 11.2.0-4
Versions of packages acpitool recommends:
ii acpid 1:2.0.32-1
acpitool suggests no packages.
-- no debconf information