[Pkg-acpi-devel] Bug#542114: acpitool: Segfault on 2.6.30 and newer with -b/-B
Thomas Arendsen Hein
thomas at intevation.de
Sat Feb 13 14:22:01 UTC 2010
Package: acpitool
Version: 0.5-7
Severity: normal
Backtrace on my system with acpitool-dbg installed:
(gdb) run -B
Starting program: /usr/bin/acpitool -B
Program received signal SIGSEGV, Segmentation fault.
0xb7d9df8a in _IO_vfscanf () from /lib/i686/cmov/libc.so.6
(gdb) bt
#0 0xb7d9df8a in _IO_vfscanf () from /lib/i686/cmov/libc.so.6
#1 0xb7db18f1 in vsscanf () from /lib/i686/cmov/libc.so.6
#2 0xb7da14cb in sscanf () from /lib/i686/cmov/libc.so.6
#3 0x0805a653 in Get_Battery_Info_from_Sys (bat_nr=1, bat_info=0x8062008, verbose=0)
at battery.cpp:616
#4 0x0805bb1f in Do_Battery_Stuff (show_empty=1, info_level=1, verbose=0) at battery.cpp:111
#5 0x0804e379 in Print_ACPI_Info (show_ac=0, show_therm=0, show_trip=0, show_fan=0, show_batteries=1,
show_empty=1, show_version=0, show_cpu=0, show_wake=0, e_set=0, info_level=1, verbose=0)
at acpitool.cpp:109
#6 0x0804a464 in main (argc=2, argv=0xbffffb94) at main.cpp:229
(very similar backtrace with -b)
Number of batteries and AC on-/offline does not matter:
"acpi -V" with AC online and two batteries:
Battery 0: Full, 100%
Battery 0: design capacity 3550 mAh, last full capacity 3550 mAh = 100%
Battery 1: Unknown, 98%
Battery 1: design capacity 3808 mAh, last full capacity 3808 mAh = 100%
Adapter 0: on-line
"acpi -V" with AC offline and one battery:
Battery 0: Discharging, 98%, 03:17:28 remaining
Battery 0: design capacity 3808 mAh, last full capacity 3808 mAh = 100%
Adapter 0: off-line
And the output of "strace -s 1000 acpitool -B":
execve("/usr/bin/acpitool", ["acpitool", "-B"], [/* 26 vars */]) = 0
brk(0) = 0x9241000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7839000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=65219, ...}) = 0
mmap2(NULL, 65219, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7829000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libstdc++.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220q\4\0004\0\0\0\364\233\16\0\0\0\0\0004\0 \0\10\0(\0\36\0\35\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\234M\16\0\234M\16\0\5\0\0\0\0\20\0\0\1\0\0\0\204V\16\0\204V\16\0\204V\16\0lD\0\0\10\255\0\0\6\0\0\0\0\20\0\0\2\0\0\0\230\211\16\0\230\211\16\0\230\211\16\0\370\0\0\0\370\0\0\0\6\0\0\0\4\0\0\0\4\0\0\0004\1\0\0004\1\0\0004\1\0\0$\0\0\0$\0\0\0\4\0\0\0\4\0\0\0\7\0\0\0\204V\16\0\204V\16\0\204V\16\0\0\0\0\0\20\0\0\0\4\0\0\0\4\0\0\0P\345td\250S\f\0\250S\f\0\250S\f\0\254S\0\0\254S\0\0\4\0\0\0\4\0\0\0Q\345td\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0\0\0\4\0\0\0R\345td\204V\16\0\204V\16\0\204V\16\0|9\0\0|9\0\0\4\0\0\0\1\0\0\0\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\362\277\367^0V\270\31\317\250MMT\25\232\262\3,\220\235\377\3\0\0\337\r\0\0\253\5\0\0\320\v\0\0\232\v\0\0\264\3\0\0;\f\0\0r\6\0\0Z\7\0\0\16\2\0\0\263\v\0\0Y\0\0\0I\10\0\0:\n\0\0n\4\0\0r\0\0\0\346\v\0\0\0\0\0\0K\7\0\0\0\0\0\0V\0\0\0\323\v\0\0\233\n\0\0\323\r\0\0\241\5\0\0p\v\0\0\224\10\0\0003\7\0\0\210\n\0\0\247\2\0\0\20\f\0\0\314\6\0\0~\n\0\0\0\0\0\0J\1\0\0'\3\0\0M\5\0\0\316\r\0\0\t\3\0\0\"\5\0\0\231\4\0\0\255\5\0\0", 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=958628, ...}) = 0
mmap2(NULL, 983948, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7738000
mmap2(0xb781d000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe5) = 0xb781d000
mmap2(0xb7822000, 25484, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7822000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i686/cmov/libm.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`4\0\0004\0\0\0hB\2\0\0\0\0\0004\0 \0\t\0(\0!\0 \0\6\0\0\0004\0\0\0004\0\0\0004\0\0\0 \1\0\0 \1\0\0\5\0\0\0\4\0\0\0\3\0\0\0008\27\2\0008\27\2\0008\27\2\0\23\0\0\0\23\0\0\0\4\0\0\0\1\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0,6\2\0,6\2\0\5\0\0\0\0\20\0\0\1\0\0\0\334>\2\0\334N\2\0\334N\2\0\\\1\0\0\244\1\0\0\6\0\0\0\0\20\0\0\2\0\0\0\360>\2\0\360N\2\0\360N\2\0\350\0\0\0\350\0\0\0\6\0\0\0\4\0\0\0\4\0\0\0T\1\0\0T\1\0\0T\1\0\0D\0\0\0D\0\0\0\4\0\0\0\4\0\0\0P\345tdL\27\2\0L\27\2\0L\27\2\0\34\4\0\0\34\4\0\0\4\0\0\0\4\0\0\0Q\345td\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0\0\0\4\0\0\0R\345td\334>\2\0\334N\2\0\334N\2\0$\1\0\0$\1\0\0\4\0\0\0\1\0\0\0\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\365\36SP\6E`\10e\337+\37\314\353/\324\365\237w\321\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\6\0\0\0\22\0\0\0\214\2\0\0\17\0\0\0@\0\0\0\v\0\0\0%\220 \305\t\204g\v\0\302\20 \4iER\202\20\200\240\0}\210\272\10\10I\0\0\0\0\0\33\4\201\0\0\0\232U\20A P \200\224\202\220\21@\3722\0\304a\24\0\10\6\306\220\232\f\207\300 \250\0 \202\0\230\201\4E\7\0054a\2\0\0\251C\30\310", 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=149392, ...}) = 0
mmap2(NULL, 151680, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7712000
mmap2(0xb7736000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x23) = 0xb7736000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P#\0\0004\0\0\0\350\302\1\0\0\0\0\0004\0 \0\6\0(\0\34\0\33\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0X\276\1\0X\276\1\0\5\0\0\0\0\20\0\0\1\0\0\0\0\300\1\0\0\300\1\0\0\300\1\0\350\1\0\0H\3\0\0\6\0\0\0\0\20\0\0\2\0\0\0\24\300\1\0\24\300\1\0\24\300\1\0\340\0\0\0\340\0\0\0\6\0\0\0\4\0\0\0\4\0\0\0\364\0\0\0\364\0\0\0\364\0\0\0$\0\0\0$\0\0\0\4\0\0\0\4\0\0\0P\345td\334\256\1\0\334\256\1\0\334\256\1\0$\3\0\0$\3\0\0\4\0\0\0\4\0\0\0Q\345td\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0\0\0\4\0\0\0\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\361\35sj>C\204\330d\372\352\34\364*_\362!\223\310{\203\0\0\0\227\0\0\0\0\0\0\0\37\0\0\0 \0\0\0N\0\0\0\0\0\0\0005\0\0\0(\0\0\0\0\0\0\0i\0\0\0\0\0\0\0\0\0\0\0\23\0\0\0\0\0\0\0\7\0\0\0b\0\0\0\220\0\0\0\0\0\0\0m\0\0\0\217\0\0\0\16\0\0\0\0\0\0\0Y\0\0\0{\0\0\0\5\0\0\0%\0\0\0\210\0\0\0\0\0\0\0\0\0\0\0\216\0\0\0\20\0\0\0I\0\0\0\177\0\0\0\\\0\0\0d\0\0\0002\0\0\0\0\0\0\0\0\0\0\0\222\0\0\0\215\0\0\0\223\0\0\0\4\0\0\0h\0\0\0p\0\0\0\0\0\0\0=\0\0\0\36\0\0\0\0\0\0\0k\0\0\0)\0\0\0\0\0\0\0\206\0\0\0H\0\0\0a\0\0\0\0\0\0\0\0\0\0\0\v\0\0\0", 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=116552, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7711000
mmap2(NULL, 115528, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb76f4000
mmap2(0xb7710000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c) = 0xb7710000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260l\1\0004\0\0\0\34G\24\0\0\0\0\0004\0 \0\n\0(\0E\0D\0\6\0\0\0004\0\0\0004\0\0\0004\0\0\0@\1\0\0@\1\0\0\5\0\0\0\4\0\0\0\3\0\0\0`\274\22\0`\274\22\0`\274\22\0\23\0\0\0\23\0\0\0\4\0\0\0\1\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 \7\24\0 \7\24\0\5\0\0\0\0\20\0\0\1\0\0\0\320\21\24\0\320\21\24\0\320\21\24\0\314'\0\0\230W\0\0\6\0\0\0\0\20\0\0\2\0\0\0|-\24\0|-\24\0|-\24\0\360\0\0\0\360\0\0\0\6\0\0\0\4\0\0\0\4\0\0\0t\1\0\0t\1\0\0t\1\0\0D\0\0\0D\0\0\0\4\0\0\0\4\0\0\0\7\0\0\0\320\21\24\0\320\21\24\0\320\21\24\0\10\0\0\0@\0\0\0\4\0\0\0\4\0\0\0P\345tdt\274\22\0t\274\22\0t\274\22\0\224-\0\0\224-\0\0\4\0\0\0\4\0\0\0Q\345td\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0\0\0\4\0\0\0R\345td\320\21\24\0\320\21\24\0\320\21\24\0000\36\0\0000\36\0\0\4\0\0\0\1\0\0\0\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\306\216Y\235\312(;?p\177\nO/\343\265\237'\33\343\6\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\6\0\0\0\22\0\0\0\363\3\0\0\t\0\0\0\0\2\0\0\16\0\0\0\2400\20D\200 \2\1\214\3\346\220AE\210\0\204\0\10\0E\200\0`\300\200\0\f\212\f\0\0010\0\10 at 2\10\256\4\210H6l\240\0260\0&\204\200\216\4\10B$", 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1331684, ...}) = 0
mmap2(NULL, 1337704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb75ad000
mmap2(0xb76ee000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x141) = 0xb76ee000
mmap2(0xb76f1000, 10600, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb76f1000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb75ac000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb75ac6d0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb76ee000, 8192, PROT_READ) = 0
mprotect(0xb7736000, 4096, PROT_READ) = 0
mprotect(0xb781d000, 16384, PROT_READ) = 0
mprotect(0xb7858000, 4096, PROT_READ) = 0
munmap(0xb7829000, 65219) = 0
brk(0) = 0x9241000
brk(0x9262000) = 0x9262000
open("/proc/acpi/info", O_RDONLY|O_LARGEFILE) = 3
open("/sys/module/acpi/parameters/acpica_version", O_RDONLY|O_LARGEFILE) = 4
read(3, "version: 20090903\n", 8191) = 34
close(3) = 0
close(4) = 0
open("/proc/acpi/battery/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/sys/class/power_supply/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fcntl64(3, F_GETFD) = 0x1 (flags FD_CLOEXEC)
open("/sys/class/power_supply/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 4
getdents(4, /* 5 entries */, 32768) = 80
getdents(4, /* 0 entries */, 32768) = 0
close(4) = 0
close(3) = 0
open("/sys/class/power_supply/C1B4/type", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7838000
read(3, "Battery\n", 4096) = 8
close(3) = 0
munmap(0xb7838000, 4096) = 0
open("/sys/class/power_supply/C1B3/type", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7838000
read(3, "Battery\n", 4096) = 8
close(3) = 0
munmap(0xb7838000, 4096) = 0
open("/sys/class/power_supply/C1B2/type", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7838000
read(3, "Mains\n", 4096) = 6
close(3) = 0
munmap(0xb7838000, 4096) = 0
open("/sys/class/power_supply/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
open("/sys/class/power_supply/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 4
getdents(4, /* 5 entries */, 32768) = 80
getdents(4, /* 0 entries */, 32768) = 0
close(4) = 0
open("/sys/class/power_supply/C1B4/type", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7838000
read(4, "Battery\n", 4096) = 8
close(4) = 0
munmap(0xb7838000, 4096) = 0
open("/sys/class/power_supply/C1B3/type", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7838000
read(4, "Battery\n", 4096) = 8
close(4) = 0
munmap(0xb7838000, 4096) = 0
open("/sys/class/power_supply/C1B2/type", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7838000
read(4, "Mains\n", 4096) = 6
close(4) = 0
munmap(0xb7838000, 4096) = 0
close(3) = 0
open("/sys/class/power_supply/C1B3/uevent", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7838000
read(3, "POWER_SUPPLY_NAME=C1B3\nPOWER_SUPPLY_TYPE=Battery\nPOWER_SUPPLY_STATUS=Full\nPOWER_SUPPLY_PRESENT=1\nPOWER_SUPPLY_TECHNOLOGY=Li-ion\nPOWER_SUPPLY_VOLTAGE_MIN_DESIGN=14800000\nPOWER_SUPPLY_VOLTAGE_NOW=16725000\nPOWER_SUPPLY_CURRENT_NOW=0\nPOWER_SUPPLY_CHARGE_FULL_DESIGN=3550000\nPOWER_SUPPLY_CHARGE_FULL=3550000\nPOWER_SUPPLY_CHARGE_NOW=3550000\nPOWER_SUPPLY_MODEL_NAME=Travel\nPOWER_SUPPLY_MANUFACTURER=Hewlett-Packard\nPOWER_SUPPLY_SERIAL_NUMBER=01240 2007/08/10\n", 4096) = 452
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
/sys/class/power_supply/C1B3/uevent contains:
POWER_SUPPLY_NAME=C1B3
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_STATUS=Full
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=14800000
POWER_SUPPLY_VOLTAGE_NOW=16725000
POWER_SUPPLY_CURRENT_NOW=0
POWER_SUPPLY_CHARGE_FULL_DESIGN=3550000
POWER_SUPPLY_CHARGE_FULL=3550000
POWER_SUPPLY_CHARGE_NOW=3550000
POWER_SUPPLY_MODEL_NAME=Travel
POWER_SUPPLY_MANUFACTURER=Hewlett-Packard
POWER_SUPPLY_SERIAL_NUMBER=01240 2007/08/10
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (550, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-trunk-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages acpitool depends on:
ii libc6 2.10.2-2 GNU C Library: Shared libraries
ii libgcc1 1:4.4.2-9 GCC support library
ii libstdc++6 4.4.2-9 The GNU Standard C++ Library v3
Versions of packages acpitool recommends:
ii acpid 1:2.0.1-2 Advanced Configuration and Power I
acpitool suggests no packages.
-- no debconf information
More information about the Pkg-acpi-devel
mailing list