Kernel Oops when loading battery module
Hi!
Today I updated from kernel 2.4.20-pre5 with acpi-20020829-2.4.20-pre5 to kernel 2.4.20 with the new acpi-20021205-2.4.20 patch (no other patches applied).
Unfortunately I have some problems with ACPI now. My system is a Dell Inspiron 8200 with bios version A07. ACPI has been compiled as modules.
1. /proc/acpi/processor/CPU0/performance now reports wrong speeds:
| state count: 2 | active state: P0 | states: | *P0: 258 MHz, 0 mW, 0 uS | P1: 0 MHz, 0 mW, 0 uS
This should be 1600 for P0 and 1200 for P1.
2. /proc/acpi/thermal_zone/THM/temperature reports a constant temperature of 25 °C. (The special module i8k still shows the correct value varying between about 50 and 65 C)
3. the worst problem: when loading the battery module, i get:
--- snip ---
Dec 6 22:54:05 matrix kernel: ACPI-0189: *** Warning: Buffer created with zero length in AML Dec 6 22:54:05 matrix kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000010 Dec 6 22:54:05 matrix kernel: printing eip: Dec 6 22:54:05 matrix kernel: c0189f01 Dec 6 22:54:05 matrix kernel: *pde = 00000000 Dec 6 22:54:05 matrix kernel: Oops: 0002 Dec 6 22:54:05 matrix kernel: CPU: 0 Dec 6 22:54:05 matrix kernel: EIP: 0010:[<c0189f01>] Not tainted Dec 6 22:54:05 matrix kernel: EFLAGS: 00010246 Dec 6 22:54:05 matrix kernel: eax: 00000000 ebx: 00000000 ecx: c12df540 edx: cbd7cf00 Dec 6 22:54:05 matrix kernel: esi: cd654c00 edi: cff344c0 ebp: cbd7cf00 esp: cb643b8c Dec 6 22:54:05 matrix kernel: ds: 0018 es: 0018 ss: 0018 Dec 6 22:54:05 matrix kernel: Process modprobe (pid: 335, stackpage=cb643000) Dec 6 22:54:05 matrix kernel: Stack: cd654c00 00000001 00000000 00000000 00000000 00000000 00000000 00000001 Dec 6 22:54:05 matrix kernel: cbd7cf00 cca61f00 cd6545b4 00000000 c018a089 cbd7cf00 cbd7cf00 00000000 Dec 6 22:54:05 matrix kernel: 00000000 c0193f32 cca61f00 cb643be8 00000003 00000000 cd6545b4 cd654400 Dec 6 22:54:05 matrix kernel: Call Trace: [<c018a089>] [<c0193f32>] [<c0193fca>] [<c018aa0c>] [<c018b099>] Dec 6 22:54:05 matrix kernel: [<c019ab74>] [<c01a2f94>] [<c01a3157>] [<c01a18a8>] [<c01a2ee5>] [<c01a06d5>] Dec 6 22:54:05 matrix kernel: [<c01a2f94>] [<c019b1f8>] [<c018c2c5>] [<c019bc5c>] [<d4b720d6>] [<c01975b8>] Dec 6 22:54:05 matrix kernel: [<c0197549>] [<c01973a1>] [<c01a18a8>] [<c01a1a48>] [<d4b720d6>] [<c01990f8>] Dec 6 22:54:05 matrix kernel: [<d4b720d6>] [<d4b710df>] [<d4b720d6>] [<d4b720c8>] [<d4b71495>] [<d4b72805>] Dec 6 22:54:05 matrix kernel: [<d4b729a0>] [<d4b71e93>] [<d4b72803>] [<d4b7280e>] [<d4b729a0>] [<c01a457b>] Dec 6 22:54:05 matrix kernel: [<d4b729a0>] [<c01a464d>] [<d4b729a0>] [<c01a4244>] [<d4b729a0>] [<d4b729a0>] Dec 6 22:54:05 matrix kernel: [<c01a4838>] [<c01a45f0>] [<d4b729a0>] [<d4b71fcc>] [<d4b729a0>] [<c011b5cb>] Dec 6 22:54:05 matrix kernel: [<d4b71060>] [<d4b71060>] [<c0107433>] Dec 6 22:54:05 matrix kernel: Dec 6 22:54:05 matrix kernel: Code: 89 50 10 89 3c 24 e8 84 1a 01 00 c7 04 24 37 00 00 00 e8 c8
--- snip ---
The system is still running, but lsmod shows that the battery module hangs in the state "(initialising)".
Here are some more kernel messages from booting which might be interesting:
--- snip ---
Dec 6 22:53:22 matrix kernel: klogd 1.4.1, log source = /proc/kmsg started. Dec 6 22:53:22 matrix kernel: Cannot find map file. Dec 6 22:53:22 matrix kernel: Loaded 728 symbols from 37 modules. Dec 6 22:53:22 matrix kernel: Linux version 2.4.20 (root@matrix) (gcc version 3.1) #2 Fre Dez 6 22:43:52 CET 2002 Dec 6 22:53:22 matrix kernel: BIOS-provided physical RAM map: Dec 6 22:53:22 matrix kernel: BIOS-e820: 0000000000000000 - 000000000009fc00 (usable) Dec 6 22:53:22 matrix kernel: BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved) Dec 6 22:53:22 matrix kernel: BIOS-e820: 0000000000100000 - 000000000ffe2800 (usable) Dec 6 22:53:22 matrix kernel: BIOS-e820: 000000000ffe2800 - 0000000010000000 (reserved) Dec 6 22:53:22 matrix kernel: BIOS-e820: 00000000feda0000 - 00000000fee00000 (reserved) Dec 6 22:53:22 matrix kernel: BIOS-e820: 00000000ffb80000 - 0000000100000000 (reserved) Dec 6 22:53:22 matrix kernel: 255MB LOWMEM available. Dec 6 22:53:22 matrix kernel: ACPI: have wakeup address 0xc0001000 Dec 6 22:53:22 matrix kernel: On node 0 totalpages: 65506 Dec 6 22:53:22 matrix kernel: zone(0): 4096 pages. Dec 6 22:53:22 matrix kernel: zone(1): 61410 pages. Dec 6 22:53:22 matrix kernel: zone(2): 0 pages. Dec 6 22:53:22 matrix kernel: ACPI: RSDP (v000 DELL ) @ 0x000fde50 Dec 6 22:53:22 matrix kernel: ACPI: RSDT (v001 DELL CPi R 10194.02588) @ 0x000fde64 Dec 6 22:53:22 matrix kernel: ACPI: FADT (v001 DELL CPi R 10194.02588) @ 0x000fde90 Dec 6 22:53:22 matrix kernel: ACPI: DSDT (v001 INT430 SYSFexxx 00000.04097) @ 0x00000000 Dec 6 22:53:22 matrix kernel: ACPI: BIOS passes blacklist Dec 6 22:53:22 matrix kernel: ACPI: MADT not present Dec 6 22:53:22 matrix kernel: Dell Inspiron with broken BIOS detected. Refusing to enable the local APIC. Dec 6 22:53:22 matrix kernel: Kernel command line: BOOT_IMAGE=Linux ro root=302 hdb=ide-scsi video=vesa:mtrr Dec 6 22:53:22 matrix kernel: ide_setup: hdb=ide-scsi Dec 6 22:53:22 matrix kernel: Initializing CPU#0 Dec 6 22:53:22 matrix kernel: Detected 1595.319 MHz processor. Dec 6 22:53:23 matrix kernel: Console: colour dummy device 80x25 Dec 6 22:53:23 matrix kernel: Calibrating delay loop... 3185.04 BogoMIPS Dec 6 22:53:23 matrix kernel: Memory: 256676k/262024k available (1319k kernel code, 4960k reserved, 418k data, 112k init, 0k highmem) Dec 6 22:53:23 matrix kernel: Dentry cache hash table entries: 32768 (order: 6, 262144 bytes) Dec 6 22:53:23 matrix kernel: Inode cache hash table entries: 16384 (order: 5, 131072 bytes) Dec 6 22:53:23 matrix kernel: Mount-cache hash table entries: 4096 (order: 3, 32768 bytes) Dec 6 22:53:23 matrix kernel: Buffer-cache hash table entries: 16384 (order: 4, 65536 bytes) Dec 6 22:53:23 matrix kernel: Page-cache hash table entries: 65536 (order: 6, 262144 bytes) Dec 6 22:53:23 matrix kernel: CPU: L1 I cache: 0K, L1 D cache: 8K Dec 6 22:53:23 matrix kernel: CPU: L2 cache: 512K Dec 6 22:53:23 matrix kernel: Intel machine check architecture supported. Dec 6 22:53:23 matrix kernel: Intel machine check reporting enabled on CPU#0. Dec 6 22:53:23 matrix kernel: CPU: After generic, caps: 3febf9ff 00000000 00000000 00000000 Dec 6 22:53:23 matrix kernel: CPU: Common caps: 3febf9ff 00000000 00000000 00000000 Dec 6 22:53:23 matrix kernel: CPU: Intel(R) Pentium(R) 4 Mobile CPU 1.60GHz stepping 04 Dec 6 22:53:23 matrix kernel: Enabling fast FPU save and restore... done. Dec 6 22:53:23 matrix kernel: Enabling unmasked SIMD FPU exception support... done. Dec 6 22:53:23 matrix kernel: Checking 'hlt' instruction... OK. Dec 6 22:53:23 matrix kernel: POSIX conformance testing by UNIFIX Dec 6 22:53:23 matrix kernel: mtrr: v1.40 (20010327) Richard Gooch ([email protected]) Dec 6 22:53:23 matrix kernel: mtrr: detected mtrr type: Intel Dec 6 22:53:23 matrix kernel: ACPI: Subsystem revision 20021205 Dec 6 22:53:23 matrix kernel: PCI: PCI BIOS revision 2.10 entry at 0xfbfee, last bus=2 Dec 6 22:53:23 matrix kernel: PCI: Using configuration type 1 Dec 6 22:53:23 matrix kernel: ...................................................................................................................................................................... ACPI-0263: *** Info: GPE Block0 defined as GPE0 to GPE15 Dec 6 22:53:23 matrix kernel: ACPI-0263: *** Info: GPE Block1 defined as GPE16 to GPE31 Dec 6 22:53:23 matrix kernel: ................................................................................................................................<6>ACPI: Interpreter enabled Dec 6 22:53:23 matrix kernel: ACPI: Using PIC for interrupt routing Dec 6 22:53:23 matrix kernel: ACPI: System [ACPI] (supports S0 S1 S3 S4 S5) Dec 6 22:53:23 matrix kernel: ACPI: PCI Root Bridge [PCI0] (00:00) Dec 6 22:53:23 matrix kernel: PCI: Probing PCI hardware (bus 00) Dec 6 22:53:23 matrix kernel: Transparent bridge - Intel Corp. 82801BAM/CAM PCI Bridge Dec 6 22:53:23 matrix kernel: ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT] Dec 6 22:53:23 matrix kernel: ACPI: PCI Interrupt Link [LNKA] (IRQs 9 10 *11) Dec 6 22:53:23 matrix kernel: ACPI: PCI Interrupt Link [LNKB] (IRQs 5 7, enabled at IRQ 11) Dec 6 22:53:23 matrix kernel: ACPI: PCI Interrupt Link [LNKC] (IRQs 9 10 *11) Dec 6 22:53:24 matrix kernel: ACPI: PCI Interrupt Link [LNKD] (IRQs 5 7 9 10 *11) Dec 6 22:53:24 matrix kernel: ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.AGP_._PRT] Dec 6 22:53:24 matrix kernel: ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCIE._PRT] Dec 6 22:53:24 matrix kernel: ACPI: Power Resource [PADA] (on) Dec 6 22:53:24 matrix kernel: PCI: Probing PCI hardware Dec 6 22:53:24 matrix kernel: PCI: Using ACPI for IRQ routing Dec 6 22:53:24 matrix kernel: PCI: if you experience problems, try using option 'pci=noacpi' or even 'acpi=off'
--- snip ---
_All_ of the above still worked fine with the old kernel plus patch, so some change in between must have introduced an incompatibility.
Please tell me if i can supply more information to find the error. It would be great if ACPI would work again with the new kernel. :-)
Thanks
Markus Wiesner
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Quoted 9 lines · Markus Wiesner
Hi!
Today I updated from kernel 2.4.20-pre5 with acpi-20020829-2.4.20-pre5 to kernel 2.4.20 with the new acpi-20021205-2.4.20 patch (no other patches applied).
Unfortunately I have some problems with ACPI now. My system is a Dell Inspiron 8200 with bios version A07. ACPI has been compiled as modules.
Have you been able to use a battery monitor without crashing your machine with any version of acpi? I have the same machine as you, but sustained polling of /proc/acpi/battery/BAT1/state causes a system hang with no errors.
I use bios A04, but tried A07 and had same problem. A07 would not unblank after a lid event so I went back to A04.
See thread "[ACPI] Repeatable lockup with sustained polling of battery state" for details on how to reproduce the crash.
James Strandboge
Signature · 11 lines
Email: [email protected] GPG/PGP ID: 26384A3A Fingerprint: D9FF DF4A 2D46 A353 A289 E8F5 AA75 DCBE 2638 4A3A ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf
Quoted 5 lines · James D Strandboge
Quoted 4 lines · Markus Wiesner
Today I updated from kernel 2.4.20-pre5 with acpi-20020829-2.4.20-pre5 to kernel 2.4.20 with the new acpi-20021205-2.4.20 patch (no other patches applied).
Quoted 7 lines
Quoted 3 lines
Unfortunately I have some problems with ACPI now. My system is a Dell Inspiron 8200 with bios version A07. ACPI has been compiled as modules.
Have you been able to use a battery monitor without crashing your machine with any version of acpi? I have the same machine as you, but sustained polling of
/proc/acpi/battery/BAT1/statecauses a system hang with no errors.
I can't even load the battery module. I get the kernel Oops when I try it, /proc/acpi/battery then exists but is empty and the modules stays in the state "initializing".
Quoted 2 lines
I use bios A04, but tried A07 and had same problem. A07 would not unblank after a lid event so I went back to A04.
Try switching to a text console (ctrl-alt-f1) and then back to X (alt-f7). After that my display worked again.
Quoted 2 lines
See thread "[ACPI] Repeatable lockup with sustained polling of battery state" for details on how to reproduce the crash.
Wish I could test it with the current version. ;-)
My only "battery monitor" is a script that "cat"s the state of my two batteries to the console on request. Except a slight delay (that seems to be normal) and one of the batteries very rarely not being recognized I had no problems with the old version, even when running the script fast several times.
Markus Wiesner
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Quoted 7 lines · Markus Wiesner
Quoted 2 lines · James D Strandboge
I use bios A04, but tried A07 and had same problem. A07 would not unblank after a lid event so I went back to A04.
Try switching to a text console (ctrl-alt-f1) and then back to X (alt-f7). After that my display worked again.
I had this all automated with an acpid lid event script to do this because A04 needed to go to a console and back too. I don't see why my script wouldn't work on A07, but I'll disable this script and try again manually.
Quoted 5 lines
Quoted 2 lines
See thread "[ACPI] Repeatable lockup with sustained polling of battery state" for details on how to reproduce the crash.
Wish I could test it with the current version. ;-)
yeah
Quoted 6 lines
My only "battery monitor" is a script that "cat"s the state of my two batteries to the console on request. Except a slight delay (that seems to be normal) and one of the batteries very rarely not being recognized I had no problems with the old version, even when running the script fast several times.
Could you send me your script (off list)? My script sounds like it does the same thing, but I would get this strange hang. Could you also send me your dsdt so I can compare it to mine?
While we're at it, can you use the Fn+F1 and Fn+F3 keys while in linux with acpi? They do nothing here, but others like Fn+F10 (CD eject) works fine. What about Fn+D to blank the screen (doesn't work here)? Is acpi compiled as modules? Do you have an nvidia card, and if so are you using xfree86 nv driver or Nvidia's nvidia driver?
Sorry for so many questions, but you gave me hope! :-)
Jamie Strandboge
Signature · 11 lines
Email: [email protected] GPG/PGP ID: 26384A3A Fingerprint: D9FF DF4A 2D46 A353 A289 E8F5 AA75 DCBE 2638 4A3A ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf
On an i8100 w/ bios A13 I get the same (kind of) oops with 2.5-bk current, so the bug is not 2.4 specific.
I'm back at 2.4.20-rc1-jhc1 (rc1 w/ htree, latest acpi at that time, and some other pulls I canot remember....)
I had everything compiled in, so was not able to get a trace....
-JimC
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Ditto with my i8200 and the battery module - at least it is repeatable - BIOS A7.
Quoted 4 lines
While we're at it, can you use the Fn+F1 and Fn+F3 keys while in linux
with acpi? They do nothing here, but others like Fn+F10 (CD eject)
works fine. What about Fn+D to blank the screen (doesn't work here)? Is acpi compiled as modules? Do you have an nvidia card, and if so are you using xfree86 nv driver or Nvidia's nvidia driver?
I did a bit of research about i8200 and ACPI, apparently when an ACPI capable OS is loaded, most of the buttons (except F10/F8/Esc) are disabled.
Regards,
Matt
Signature · 10 lines
Matthew Tippett - [email protected] - (416) 435-4118 Technology Forum - http://www.technology-forum.org/ Commercial Open Source - http://www.commercialos.org/ ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf
Quoted 3 lines · James D Strandboge
While we're at it, can you use the Fn+F1 and Fn+F3 keys while in linux with acpi? They do nothing here, but others like Fn+F10 (CD eject) works fine. What about Fn+D to blank the screen (doesn't work here)?
As Matthew Tippett already wrote: a certain module (can't remember which one, acpi or i8k) disables those functions.
Quoted 2 lines
Is acpi compiled as modules? Do you have an nvidia card, and if so are you using xfree86 nv driver or Nvidia's nvidia driver?
ACPI is compiled as modules and i have a nvidia card with the 1.0-3123 driver from nvidia.
Markus Wiesner
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Quoted 7 lines · Markus Wiesner
Quoted 2 lines · James D Strandboge
Could you send me your script (off list)? My script sounds like it does the same thing, but I would get this strange hang.
Sure. But it's really very simple. In fact only a set of shortcuts for "cat /proc/acpi/[...]" :-)
Quoted 7 lines
An idea would be to redirect output to
/dev/consoleand then execute the script with a single key combination and view its output in xconsole.Quoted 1 line
Could you also send me your dsdt so I can compare it to mine?
You mean
/proc/acpi/dsdt? Ok, attached that, too.
Well, I recompiled with 20020829 and 2.4.20-pre5-- still have the same problem. Can you run the attached script with your working configuration and let me know if your laptop locks up? Feel free to go in single user mode-- I don't need X or anything running to get the lockup.
Jamie
Signature · 3 lines
Email: [email protected] GPG/PGP ID: 26384A3A Fingerprint: D9FF DF4A 2D46 A353 A289 E8F5 AA75 DCBE 2638 4A3A
#!/bin/sh
let i=0
while [ /bin/true ]
do
let i=i+1
REMAIN=grep remain /proc/acpi/battery/BAT1/state | awk '{ print $3 }' if [ $REMAIN -lt 0 ]
then
echo "problem"
exit 1
fi
echo "$i: $REMAIN remaining"
done
exit 0;
Quoted 5 lines · James D Strandboge
Well, I recompiled with 20020829 and 2.4.20-pre5-- still have the same problem. Can you run the attached script with your working configuration and let me know if your laptop locks up? Feel free to go in single user mode-- I don't need X or anything running to get the lockup.
Test 1:
ac-adapter attached, output redirected to /tmp/acpi.log (tmpfs) so that the svga-framebuffer console does not slow down things. No lockup, stopped test at 10000.
Test 2:
Output to console, somewhere between 4000 and 5000 i removed the power chord. At about 5800 the system locked up! Sysrq-key still worked, as well as ping from an external host, but nothing else. Alt-SysRq-k (kill programs on current console) did not help. At least I could sync and unmount before reboot. :-)
Test 3 (after the reboot, nice to have a journaling filesystem :-) ):
Output to console, system running on battery. This time as in the first test no lockup, stopped the test at 10000.
So there is something wrong anywhere, but it's a bit difficult to reproduce.
Markus Wiesner
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Quoted 19 lines · Markus Wiesner
Quoted 5 lines · James D Strandboge
Well, I recompiled with 20020829 and 2.4.20-pre5-- still have the same problem. Can you run the attached script with your working configuration and let me know if your laptop locks up? Feel free to go in single user mode-- I don't need X or anything running to get the lockup.
Test 1:
ac-adapter attached, output redirected to/tmp/acpi.log(tmpfs) so that the svga-framebuffer console does not slow down things. No lockup, stopped test at 10000.Test 2:
Output to console, somewhere between 4000 and 5000 i removed the power chord. At about 5800 the system locked up! Sysrq-key still worked, as well as ping from an external host, but nothing else. Alt-SysRq-k (kill programs on current console) did not help. At least I could sync and unmount before reboot. :-)
Quoted 4 lines
Test 3 (after the reboot, nice to have a journaling filesystem :-) ):
Output to console, system running on battery. This time as in the first test no lockup, stopped the test at 10000.
I get the lockup circa 16000 without having to remove the ac adapter. My host is pingable too, and some keyboard keys work (like CapsLock), but otherwise dead. I can also use Fn+F10 to eject the cdrom. I didn't try SysRq.
Sorry it is affecting you-- this bug will bite on a regular battery monitor that continuously polls every 2 seconds (like gnome battstat), but I am glad to know that it isn't some hardware issue or something on my end.
Jamie
Signature · 11 lines
Email: [email protected] GPG/PGP ID: 26384A3A Fingerprint: D9FF DF4A 2D46 A353 A289 E8F5 AA75 DCBE 2638 4A3A ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf