2007-11-02 07:35:27

by Rolf Eike Beer

[permalink] [raw]
Subject: [2.6.24-rc1][BUG] Oops on battery removal

Hi,

this happened while I removed my battery on bootup. Complete dmesg is
attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was
d919fd433b5823d1cf9d0688eb2eec183de9b74c).

Greetings,

Eike

BUG: unable to handle kernel NULL pointer dereference at virtual address
0000001c
printing eip: c02a82cb *pde = 00000000
Oops: 0000 [#1] SMP
Modules linked in: iptable_filter ip_tables ip6table_filter ip6_tables
x_tables ipv6 af_packet cpufreq_conservative cpufreq_ondemand
cpufreq_userspace cpufreq_powersave acpi_cpufreq speedstep_lib freq_table
snd_pcm_oss snd_mixer_oss snd_seq snd_seq_device twofish twofish_common cbc
blkcipher dm_crypt nls_utf8 ntfs ext3 jbd loop mmc_block pcmcia container
battery iwl3945 firmware_class yenta_socket button ohci1394 backlight output
ac power_supply rsrc_nonstatic pcmcia_core mmc_core ieee1394 intel_agp joydev
agpgart snd_hda_intel sr_mod cdrom r8169 snd_pcm snd_timer mac80211 snd
soundcore snd_page_alloc i2c_i801 i2c_core cfg80211 serio_raw sg usbhid
ehci_hcd uhci_hcd sd_mod usbcore dm_snapshot edd dm_mod fan ata_piix libata
scsi_mod thermal processor

Pid: 47, comm: kacpi_notify Not tainted (2.6.24-rc1-git #68)
EIP: 0060:[<c02a82cb>] EFLAGS: 00010286 CPU: 0
EIP is at klist_del+0xc/0x39
EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000000
ESI: c2e2bc00 EDI: c2e2bc20 EBP: c1c88d7c ESP: c1c88d70
DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
Process kacpi_notify (pid: 47, ti=c1c88000 task=c1cb5350 task.ti=c1c88000)
Stack: c2e2bc00 c2e2bc00 c1ce960c c1c88d90 c0231ab6 c2e2bc00 c2e2ba00 c1c88e1c
c1c88d9c c0231ced c2e2ba1c c1c88da8 f8bee01a c2e2ba00 c1c88db4 f8c3904b
c2e2ba00 c1c88de4 f8c391a2 c01d47bc c01d47bc 00000001 00000000 000080d0
Call Trace:
[<c0104edd>] show_trace_log_lvl+0x1a/0x2f
[<c0104f8d>] show_stack_log_lvl+0x9b/0xa3
[<c010503c>] show_registers+0xa7/0x179
[<c0105222>] die+0x114/0x1f5
[<c02abced>] do_page_fault+0x4b0/0x589
[<c02aa58a>] error_code+0x72/0x78
[<c0231ab6>] device_del+0x1a/0x246
[<c0231ced>] device_unregister+0xb/0x15
[<f8bee01a>] power_supply_unregister+0x1a/0x1d [power_supply]
[<f8c3904b>] sysfs_remove_battery+0x1f/0x22 [battery]
[<f8c391a2>] acpi_battery_update+0x3f/0x255 [battery]
[<f8c396e9>] acpi_battery_get_property+0x2b/0x149 [battery]
[<f8bee2c2>] power_supply_show_property+0x32/0xf0 [power_supply]
[<f8bee59e>] power_supply_uevent+0xfd/0x187 [power_supply]
[<c02322d8>] dev_uevent+0xca/0xe8
[<c01d1a28>] kobject_uevent_env+0x15a/0x376
[<c01d1c4e>] kobject_uevent+0xa/0xc
[<c0231cb9>] device_del+0x21d/0x246
[<c0231ced>] device_unregister+0xb/0x15
[<f8bee01a>] power_supply_unregister+0x1a/0x1d [power_supply]
[<f8c3904b>] sysfs_remove_battery+0x1f/0x22 [battery]
[<f8c391a2>] acpi_battery_update+0x3f/0x255 [battery]
[<f8c398ff>] acpi_battery_notify+0x1e/0x73 [battery]
[<c01f9b50>] acpi_ev_notify_dispatch+0x4f/0x5a
[<c01f447d>] acpi_os_execute_notify+0x24/0x2f
[<c0130d05>] run_workqueue+0x7d/0x110
[<c01316f5>] worker_thread+0xbe/0xcd
[<c0134247>] kthread+0x3b/0x64
[<c0104b63>] kernel_thread_helper+0x7/0x10
=======================
Code: 08 e8 63 20 00 00 83 7d f0 00 74 09 85 ff 74 05 89 f8 ff 55 f0 8b 45 ec
5a 59 5b 5e 5f 5d c3 55 89 e5 57 89 c7 56 53 8b 18 89 d8 <8b> 73 1c e8 7b 20
00 00 89 f8 e8 58 ff ff ff 85 c0 b8 00 00 00
EIP: [<c02a82cb>] klist_del+0xc/0x39 SS:ESP 0068:c1c88d70
CPU0 attaching NULL sched-domain.
CPU1 attaching NULL sched-domain.
CPU0 attaching sched-domain:
domain 0: span 3
groups: 1 2
CPU1 attaching sched-domain:
domain 0: span 3
groups: 2 1
BUG: unable to handle kernel NULL pointer dereference at virtual address
0000001c
printing eip: c02a82cb *pde = 00000000
Oops: 0000 [#2] SMP
Modules linked in: iptable_filter ip_tables ip6table_filter ip6_tables
x_tables ipv6 af_packet cpufreq_conservative cpufreq_ondemand
cpufreq_userspace cpufreq_powersave acpi_cpufreq speedstep_lib freq_table
snd_pcm_oss snd_mixer_oss snd_seq snd_seq_device twofish twofish_common cbc
blkcipher dm_crypt nls_utf8 ntfs ext3 jbd loop mmc_block pcmcia container
battery iwl3945 firmware_class yenta_socket button ohci1394 backlight output
ac power_supply rsrc_nonstatic pcmcia_core mmc_core ieee1394 intel_agp joydev
agpgart snd_hda_intel sr_mod cdrom r8169 snd_pcm snd_timer mac80211 snd
soundcore snd_page_alloc i2c_i801 i2c_core cfg80211 serio_raw sg usbhid
ehci_hcd uhci_hcd sd_mod usbcore dm_snapshot edd dm_mod fan ata_piix libata
scsi_mod thermal processor

Pid: 2773, comm: hald Tainted: G D (2.6.24-rc1-git #68)
EIP: 0060:[<c02a82cb>] EFLAGS: 00010286 CPU: 1
EIP is at klist_del+0xc/0x39
EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000000
ESI: c2e2bc00 EDI: c2e2bc20 EBP: c33b9e8c ESP: c33b9e80
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process hald (pid: 2773, ti=c33b9000 task=c3304d30 task.ti=c33b9000)
Stack: c2e2bc00 c2e2bc00 c1ce960c c33b9ea0 c0231ab6 c2e2bc00 c2e2ba00 00000001
c33b9eac c0231ced c2e2ba1c c33b9eb8 f8bee01a c2e2ba00 c33b9ec4 f8c3904b
c39b3ec0 c33b9ef4 f8c391a2 c0163a98 c27f1cbc 00000246 c3bf9cf8 c33b9efc
Call Trace:
[<c0104edd>] show_trace_log_lvl+0x1a/0x2f
[<c0104f8d>] show_stack_log_lvl+0x9b/0xa3
[<c010503c>] show_registers+0xa7/0x179
[<c0105222>] die+0x114/0x1f5
[<c02abced>] do_page_fault+0x4b0/0x589
[<c02aa58a>] error_code+0x72/0x78
[<c0231ab6>] device_del+0x1a/0x246
[<c0231ced>] device_unregister+0xb/0x15
[<f8bee01a>] power_supply_unregister+0x1a/0x1d [power_supply]
[<f8c3904b>] sysfs_remove_battery+0x1f/0x22 [battery]
[<f8c391a2>] acpi_battery_update+0x3f/0x255 [battery]
[<f8c393ed>] acpi_battery_read+0x11/0x20 [battery]
[<f8c3941c>] acpi_battery_read_state+0xf/0x11 [battery]
[<c01889de>] seq_read+0xea/0x264
[<c019fdef>] proc_reg_read+0x63/0x76
[<c0172645>] vfs_read+0xa6/0x12f
[<c0172a3e>] sys_read+0x3d/0x61
[<c0103f12>] sysenter_past_esp+0x5f/0x85
=======================
Code: 08 e8 63 20 00 00 83 7d f0 00 74 09 85 ff 74 05 89 f8 ff 55 f0 8b 45 ec
5a 59 5b 5e 5f 5d c3 55 89 e5 57 89 c7 56 53 8b 18 89 d8 <8b> 73 1c e8 7b 20
00 00 89 f8 e8 58 ff ff ff 85 c0 b8 00 00 00
EIP: [<c02a82cb>] klist_del+0xc/0x39 SS:ESP 0068:c33b9e80


Attachments:
(No filename) (0.00 B)
signature.asc (194.00 B)
This is a digitally signed message part.
Download all attachments

2007-11-02 08:37:49

by Rolf Eike Beer

[permalink] [raw]
Subject: Re: [2.6.24-rc1][BUG] Oops on battery removal

Rolf Eike Beer wrote:
> Hi,
>
> this happened while I removed my battery on bootup. Complete dmesg is
> attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was
> d919fd433b5823d1cf9d0688eb2eec183de9b74c).

Ok, I found out that it has nothing to do with the actual removal as it seems.
When I start the laptop with battery already detached I get the same error.

Eike


Attachments:
(No filename) (377.00 B)
signature.asc (194.00 B)
This is a digitally signed message part.
Download all attachments

2007-11-02 09:29:30

by Alexey Starikovskiy

[permalink] [raw]
Subject: Re: [2.6.24-rc1][BUG] Oops on battery removal

Rolf Eike Beer wrote:
> Rolf Eike Beer wrote:
>> Hi,
>>
>> this happened while I removed my battery on bootup. Complete dmesg is
>> attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was
>> d919fd433b5823d1cf9d0688eb2eec183de9b74c).
>
> Ok, I found out that it has nothing to do with the actual removal as it seems.
> When I start the laptop with battery already detached I get the same error.
>
> Eike
Please check if this patch helps.

Thanks,
Alex.


Attachments:
remove_cycle_at_battery_removal.patch (985.00 B)

2007-11-02 11:50:26

by Rolf Eike Beer

[permalink] [raw]
Subject: Re: [2.6.24-rc1][BUG] Oops on battery removal

Alexey Starikovskiy wrote:
> Rolf Eike Beer wrote:
> > Rolf Eike Beer wrote:
> >> Hi,
> >>
> >> this happened while I removed my battery on bootup. Complete dmesg is
> >> attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was
> >> d919fd433b5823d1cf9d0688eb2eec183de9b74c).
> >
> > Ok, I found out that it has nothing to do with the actual removal as it
> > seems. When I start the laptop with battery already detached I get the
> > same error.

> Please check if this patch helps.

It made things worse:

Nov 2 12:37:20 donald kernel: ACPI: EC: non-query interrupt received,
switching to interrupt mode
Nov 2 12:37:20 donald acpid: received event "battery BAT1 00000080 00000000"
Nov 2 12:37:20 donald acpid: notifying client 2856[101:102]
Nov 2 12:37:20 donald acpid: notifying client 2911[0:0]
Nov 2 12:37:20 donald acpid: notifying client 3048[0:0]
Nov 2 12:37:20 donald acpid: completed event "battery BAT1 00000080 00000000"
Nov 2 12:37:20 donald kernel: WARNING:
at /home/eike/repos/linux-2.6/lib/kref.c:33 kref_get()
Nov 2 12:37:20 donald kernel: [<c0104edd>] show_trace_log_lvl+0x1a/0x2f
Nov 2 12:37:20 donald kernel: [<c010576e>] show_trace+0x12/0x14
Nov 2 12:37:20 donald kernel: [<c010585b>] dump_stack+0x16/0x18
Nov 2 12:37:20 donald kernel: [<c01d1d3c>] kref_get+0x37/0x43
Nov 2 12:37:20 donald kernel: [<c01d10af>] kobject_get+0x12/0x17
Nov 2 12:37:20 donald kernel: [<c0231509>] get_device+0x13/0x1d
Nov 2 12:37:20 donald kernel: [<c02319e8>] device_remove_file+0xe/0x2a
Nov 2 12:37:20 donald kernel: [<f8be7043>] sysfs_remove_battery+0x17/0x22
[battery]
Nov 2 12:37:20 donald kernel: [<f8be71a2>] acpi_battery_update+0x3f/0x255
[battery]
Nov 2 12:37:20 donald kernel: [<f8be73ed>] acpi_battery_read+0x11/0x20
[battery]
Nov 2 12:37:20 donald powersaved[3048]: WARNING (filter_function:201) Hal
service stopped. Battery information no longer available
Nov 2 12:37:20 donald kernel: [<f8be741c>] acpi_battery_read_state+0xf/0x11
[battery]
Nov 2 12:37:20 donald kernel: [<c01889ca>] seq_read+0xea/0x264
Nov 2 12:37:20 donald kernel: [<c019fddb>] proc_reg_read+0x63/0x76
Nov 2 12:37:20 donald kernel: [<c0172631>] vfs_read+0xa6/0x12f
Nov 2 12:37:20 donald kernel: [<c0172a2a>] sys_read+0x3d/0x61
Nov 2 12:37:20 donald kernel: [<c0103f12>] sysenter_past_esp+0x5f/0x85
Nov 2 12:37:20 donald kernel: =======================
Nov 2 12:37:20 donald kernel: WARNING:
at /home/eike/repos/linux-2.6/lib/kref.c:33 kref_get()
Nov 2 12:37:20 donald kernel: [<c0104edd>] show_trace_log_lvl+0x1a/0x2f
Nov 2 12:37:20 donald kernel: [<c010576e>] show_trace+0x12/0x14
Nov 2 12:37:20 donald kernel: [<c010585b>] dump_stack+0x16/0x18
Nov 2 12:37:20 donald kernel: [<c01d1d3c>] kref_get+0x37/0x43
Nov 2 12:37:20 donald kernel: [<c01d10af>] kobject_get+0x12/0x17
Nov 2 12:37:20 donald kernel: [<c0231509>] get_device+0x13/0x1d
Nov 2 12:37:20 donald kernel: [<c02319e8>] device_remove_file+0xe/0x2a
Nov 2 12:37:20 donald kernel: [<f8b9b3dd>]
power_supply_remove_attrs+0x16/0x37 [power_supply]
Nov 2 12:37:20 donald kernel: [<f8b9b012>] power_supply_unregister+0x12/0x1d
[power_supply]
Nov 2 12:37:20 donald kernel: [<f8be704b>] sysfs_remove_battery+0x1f/0x22
[battery]
Nov 2 12:37:20 donald kernel: [<f8be71a2>] acpi_battery_update+0x3f/0x255
[battery]
Nov 2 12:37:20 donald kernel: [<f8be73ed>] acpi_battery_read+0x11/0x20
[battery]
Nov 2 12:37:20 donald kernel: [<f8be741c>] acpi_battery_read_state+0xf/0x11
[battery]
Nov 2 12:37:20 donald kernel: [<c01889ca>] seq_read+0xea/0x264
Nov 2 12:37:20 donald kernel: [<c019fddb>] proc_reg_read+0x63/0x76
Nov 2 12:37:20 donald kernel: [<c0172631>] vfs_read+0xa6/0x12f
Nov 2 12:37:20 donald kernel: [<c0172a2a>] sys_read+0x3d/0x61
Nov 2 12:37:20 donald kernel: [<c0103f12>] sysenter_past_esp+0x5f/0x85
Nov 2 12:37:20 donald kernel: =======================

tons more of stuff like this, system us unusable with this kernel now. In the
meantime I upgraded to current git, last commit is now
b4d367fb20ed19be4a53fa88b407248aeb8bd461

Eike


Attachments:
(No filename) (3.98 kB)
signature.asc (194.00 B)
This is a digitally signed message part.
Download all attachments

2007-11-02 13:00:25

by Alexey Starikovskiy

[permalink] [raw]
Subject: Re: [2.6.24-rc1][BUG] Oops on battery removal

Rolf Eike Beer wrote:
> Alexey Starikovskiy wrote:
>> Rolf Eike Beer wrote:
>>> Rolf Eike Beer wrote:
>>>> Hi,
>>>>
>>>> this happened while I removed my battery on bootup. Complete dmesg is
>>>> attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was
>>>> d919fd433b5823d1cf9d0688eb2eec183de9b74c).
>>> Ok, I found out that it has nothing to do with the actual removal as it
>>> seems. When I start the laptop with battery already detached I get the
>>> same error.
>
>> Please check if this patch helps.
>
> It made things worse:
How about this patch?


Attachments:
remove_cycle_at_battery_removal.patch (985.00 B)

2007-11-02 13:26:53

by Rolf Eike Beer

[permalink] [raw]
Subject: Re: [2.6.24-rc1][BUG] Oops on battery removal

Alexey Starikovskiy wrote:
> Rolf Eike Beer wrote:
> > Alexey Starikovskiy wrote:
> >> Rolf Eike Beer wrote:
> >>> Rolf Eike Beer wrote:
> >>>> Hi,
> >>>>
> >>>> this happened while I removed my battery on bootup. Complete dmesg is
> >>>> attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was
> >>>> d919fd433b5823d1cf9d0688eb2eec183de9b74c).
> >>>
> >>> Ok, I found out that it has nothing to do with the actual removal as it
> >>> seems. When I start the laptop with battery already detached I get the
> >>> same error.
> >>
> >> Please check if this patch helps.
> >
> > It made things worse:
>
> How about this patch?

Ehm, that is the same patch as before!

Btw: it has an empty From: line

Eike


Attachments:
(No filename) (712.00 B)
signature.asc (194.00 B)
This is a digitally signed message part.
Download all attachments

2007-11-02 13:42:19

by Alexey Starikovskiy

[permalink] [raw]
Subject: Re: [2.6.24-rc1][BUG] Oops on battery removal

Rolf Eike Beer wrote:
> Alexey Starikovskiy wrote:
>> Rolf Eike Beer wrote:
>>> Alexey Starikovskiy wrote:
>>>> Rolf Eike Beer wrote:
>>>>> Rolf Eike Beer wrote:
>>>>>> Hi,
>>>>>>
>>>>>> this happened while I removed my battery on bootup. Complete dmesg is
>>>>>> attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was
>>>>>> d919fd433b5823d1cf9d0688eb2eec183de9b74c).
>>>>> Ok, I found out that it has nothing to do with the actual removal as it
>>>>> seems. When I start the laptop with battery already detached I get the
>>>>> same error.
>>>> Please check if this patch helps.
>>> It made things worse:
>> How about this patch?
>
> Ehm, that is the same patch as before!
Yes, sorry... Two patches in parallel -- not good.
> Btw: it has an empty From: line
I know, thanks.
>
> Eike
Patch updated.


Attachments:
remove_cycle_at_battery_removal.patch (1.24 kB)

2007-11-02 14:23:20

by Rolf Eike Beer

[permalink] [raw]
Subject: Re: [2.6.24-rc1][BUG] Oops on battery removal

Alexey Starikovskiy wrote:
> Rolf Eike Beer wrote:
> > Alexey Starikovskiy wrote:
> >> Rolf Eike Beer wrote:
> >>> Alexey Starikovskiy wrote:
> >>>> Rolf Eike Beer wrote:
> >>>>> Rolf Eike Beer wrote:
> >>>>>> Hi,
> >>>>>>
> >>>>>> this happened while I removed my battery on bootup. Complete dmesg
> >>>>>> is attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was
> >>>>>> d919fd433b5823d1cf9d0688eb2eec183de9b74c).
> >>>>>
> >>>>> Ok, I found out that it has nothing to do with the actual removal as
> >>>>> it seems. When I start the laptop with battery already detached I get
> >>>>> the same error.
> >>>>
> >>>> Please check if this patch helps.
> >>>
> >>> It made things worse:
> >>
> >> How about this patch?
> >
> > Ehm, that is the same patch as before!
>
> Yes, sorry... Two patches in parallel -- not good.

Tested-by: Rolf Eike Beer <[email protected]>

It makes the crash go away. But there is something weird going on. Before I
logged into X I did an "cat /proc/acpi/battery/BAT1/*" and it showed the
battery as present with some (random?) values. Now I'm in X and everything
looks fine there (as in "not present").

Eike


Attachments:
(No filename) (1.13 kB)
signature.asc (194.00 B)
This is a digitally signed message part.
Download all attachments