Kernel oops when inserting pcmcia CF reader

Bug #111690 reported by Andrey Zaitsev
14
Affects Status Importance Assigned to Milestone
Linux
Fix Released
Medium
linux (Ubuntu)
Invalid
Undecided
Unassigned
linux-source-2.6.20 (Ubuntu)
Won't Fix
Medium
Unassigned

Bug Description

Binary package hint: linux-image-2.6.20-15-generic

I have Acer Aspire 5101 AWLMi laptop with AMD Turion64 (single core) CPU, and installed amd64 version of Ubuntu 7.04. This bug is perfectly reproducible in Ubumtu 6.10 and 7.04. When I insert PCMCIA compact flash card reader I get the following dmesg output:

[ 267.670692] pccard: PCMCIA card inserted into slot 0
[ 267.670698] cs: memory probe 0x0c0000-0x0fffff: excluding 0xc0000-0xcffff 0xe0000-0xfffff
[ 267.675119] cs: memory probe 0x30000000-0x33ffffff: excluding 0x30000000-0x33ffffff
[ 267.675137] cs: memory probe 0x60000000-0x60ffffff: clean.
[ 267.683202] cs: memory probe 0xa0000000-0xa0ffffff: clean.
[ 267.691279] cs: memory probe 0xd0200000-0xd02fffff: excluding 0xd0200000-0xd021ffff
[ 267.698541] pcmcia: registering new device pcmcia0.0
[ 267.913779] Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP:
[ 267.913784] [<ffffffff80222ef2>] dma_alloc_coherent+0x52/0x240
[ 267.913792] PGD 18c12067 PUD 18c16067 PMD 0
[ 267.913795] Oops: 0000 [1] SMP
[ 267.913798] CPU 0
[ 267.913799] Modules linked in: pata_pcmcia wlan_tkip ipv6 binfmt_misc rfcomm l2cap bluetooth fglrx(P) ppdev powernow_k8 cpufreq_conservative cpufreq_stats
 cpufreq_ondemand freq_table cpufreq_userspace cpufreq_powersave dev_acpi tc1100_wmi sony_acpi pcc_acpi sbs i2c_ec dock container asus_acpi button video batt
ery ac backlight parport_pc lp parport fuse joydev pcmcia snd_hda_intel snd_hda_codec snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss snd_seq_mid
i snd_rawmidi snd_seq_midi_event snd_seq yenta_socket rsrc_nonstatic pcmcia_core snd_timer snd_seq_device wlan_scan_sta sdhci ath_rate_sample pcspkr psmouse
k8temp mmc_core serio_raw i2c_piix4 ath_pci wlan snd soundcore i2c_core shpchp pci_hotplug snd_page_alloc ath_hal(P) af_packet tsdev evdev ext3 jbd mbcache 8
139cp ide_cd cdrom ide_disk atiixp generic 8139too mii ehci_hcd ata_generic libata scsi_mod ohci_hcd usbcore thermal processor fan fbcon tileblit font bitbli
t softcursor vesafb cfbcopyarea cfbimgblt cfbfillrect capability commoncap
[ 267.913850] Pid: 5809, comm: modprobe Tainted: P 2.6.20-15-generic #2
[ 267.913853] RIP: 0010:[<ffffffff80222ef2>] [<ffffffff80222ef2>] dma_alloc_coherent+0x52/0x240
[ 267.913860] RSP: 0000:ffff810001869748 EFLAGS: 00010206
[ 267.913862] RAX: 0000000000000000 RBX: 00000000000010d0 RCX: 00000000000010d4
[ 267.913865] RDX: 00000000ffffffff RSI: 0000000000000800 RDI: ffff810005c9a0c0
[ 267.913868] RBP: 00000000000000d0 R08: 0000000000000000 R09: ffff810005f9bc80
[ 267.913871] R10: 00000000fffffffc R11: 0000000000000001 R12: 00000000000007ff
[ 267.913874] R13: 00000000ffffffff R14: ffff810005c9a0c0 R15: 0000000000000800
[ 267.913878] FS: 00002b2ea423a6f0(0000) GS:ffffffff8054e000(0000) knlGS:0000000000000000
[ 267.913881] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 267.913883] CR2: 0000000000000000 CR3: 0000000018d2a000 CR4: 00000000000006e0
[ 267.913887] Process modprobe (pid: 5809, threadinfo ffff810001868000, task ffff81001bc93040)
[ 267.913889] Stack: ffff810018ce0558 ffff810005f9bc98 00000000000000d0 0000000000000000
[ 267.913895] ffff810018ce0558 0000000000000800 ffff810005c9a0c0 ffffffff803aa35b
[ 267.913899] 0000000000000002 ffff810018ce0520 ffff810005c9a0c0 000000000001a10e
[ 267.913903] Call Trace:
[ 267.913915] [<ffffffff803aa35b>] dmam_alloc_coherent+0x5b/0xb0
[ 267.913940] [<ffffffff8809ab46>] :libata:ata_port_start+0x26/0x70
[ 267.913957] [<ffffffff8809f70b>] :libata:ata_device_add+0x23b/0x540
[ 267.913974] [<ffffffff884be4dc>] :pata_pcmcia:pcmcia_init_one+0x47c/0x4f0
[ 267.914093] [<ffffffff80309ff9>] sysfs_make_dirent+0x29/0xb0
[ 267.914106] [<ffffffff88314936>] :pcmcia:pcmcia_device_probe+0xd6/0x150
[ 267.914118] [<ffffffff803a6ad5>] really_probe+0xe5/0x190
[ 267.914126] [<ffffffff803a6dac>] __driver_attach+0x7c/0xd0
[ 267.914132] [<ffffffff803a6d30>] __driver_attach+0x0/0xd0
[ 267.914136] [<ffffffff803a5d29>] bus_for_each_dev+0x49/0x80
[ 267.914147] [<ffffffff803a612e>] bus_add_driver+0x7e/0x1e0
[ 267.914156] [<ffffffff802ac395>] sys_init_module+0x1905/0x1ab0
[ 267.914176] [<ffffffff802315a1>] __up_write+0x21/0x130
[ 267.914193] [<ffffffff8026111e>] system_call+0x7e/0x83
[ 267.914206]
[ 267.914207]
[ 267.914208] Code: 4c 23 28 49 39 d5 0f 46 d9 49 c1 ec 0b 90 4c 89 e0 ba ff ff
[ 267.914216] RIP [<ffffffff80222ef2>] dma_alloc_coherent+0x52/0x240
[ 267.914221] RSP <ffff810001869748>
[ 267.914223] CR2: 0000000000000000
[ 267.914225]

... and media doesn't mount.
I must say that I've not seen this bug in Debian 4.0 and openSUSE 10.2 (both have 2.6.18 kernel) so I think this bug is specific to Ubuntu.

Revision history for this message
Andrey Zaitsev (a-zaitsev) wrote :

Additional info: output of lshal. uname, udev ect, ls -l /dev/sd* returned empty list, gvm log is alsa empty

Revision history for this message
Andrey Zaitsev (a-zaitsev) wrote :
Revision history for this message
Andrey Zaitsev (a-zaitsev) wrote :

s/alsa/also

Revision history for this message
Andrey Zaitsev (a-zaitsev) wrote :
Revision history for this message
Andrey Zaitsev (a-zaitsev) wrote :
Revision history for this message
Andrey Zaitsev (a-zaitsev) wrote :
Revision history for this message
Andrey Zaitsev (a-zaitsev) wrote :

Output of pccardctl with different options. It seems that CF card is identified but not mounted.

Changed in linux-source-2.6.20:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Revision history for this message
Oleksij Rempel (olerem) wrote :

> I must say that I've not seen this bug in Debian 4.0 and openSUSE 10.2 (both have 2.6.18 kernel) so I think this bug is specific to Ubuntu.

It looks not logically for me. Ubumtu 6.10 have kernel-2.6.17; Ubumtu 7.04 kernel 2.6.20. This all distributions not comparable. Did all tested distributions are amd64 ? Have you tried latest git of vanilla_kernel ?

I looks like libata specific bug, and libatas pata support is highly experimental.
Take a look to this bug http://bugzilla.kernel.org/show_bug.cgi?id=7711

I think the best way to get it fixed is upstream.

Revision history for this message
Andrey Zaitsev (a-zaitsev) wrote :

> Did all tested distributions are amd64 ?

Yes teseted distros were amd64.

> Have you tried latest git of vanilla_kernel ?

No I have not, all kernels were default kernels that come with distributions, no 3d party patches applied or self-compiled kernels used.

> Take a look to this bug http://bugzilla.kernel.org/show_bug.cgi?id=7711

Maybe they (tested distros) have ATA support disabled in kernel, or use ide-cs instead of pata_pcmcia, I don't know. Unfortunately I have no access to dmesg of tested distros (I simply deinstalled them) to prove it. I can try to install Debian on a separate partition on weekend and post some debug info if needed.

> I think the best way to get it fixed is upstream.

Is there any way to disable pata_pcmcia support, for example blacklist it and use ide-cs instead?

Revision history for this message
Oleksij Rempel (olerem) wrote : Re: [Bug 111690] Re: Kernel oops when inserting pcmcia CF reader

> Is there any way to disable pata_pcmcia support, for example blacklist
> it and use ide-cs instead?

No.

Ubuntu kernel do not have this module.

You don't need to install debian on your system to test or fix it.

Possible solutions:
1. ask ubuntu-kernel-team to include this module. because i think libata
module will not be fixed on ubuntu.
2. try vanilla kernel,( www.kernel.org ) and if it's not fixed fill a
bug at bugzilla.kernel.org and ask to fix it, they will do it ;) -- the
best choice!!! after this it will be included in the next release in
any distr.

Revision history for this message
Andrey Zaitsev (a-zaitsev) wrote :

Thanx for reply.

Well, quick investigationn of packages.debian.org shows that there is now ata support in their kernel instead they use ide-cs, so this is why CF worked in debian.

Ok I'll try to fill a bug at bugzilla.kernel.org, and use an usb multicard reader :) If any pacth will be introduced will it be backported by ubuntu kernel team? As I understand the module will be fixed in the latest kernel (2.6.22 or whatever)?

Revision history for this message
Andrey Zaitsev (a-zaitsev) wrote :

Hello!

I've made an experiment: downloaded and burned i386 version of Feisty, booted from CD and magic happened! CompactFlash mounted perfectly! I've attached corresponding dmesg part. So what are your suggestions? Is it a packaging problem?

PS. I'm very close to switching to i386 distro :)

Revision history for this message
Oleksij Rempel (olerem) wrote :

No! It looks like kernel_64bit problem.
You can go windows-user way and install other distro.
Or linux-user way and fix this issue and make 64bit_kernel more stable
;) Remember awry thing what working was done with somebody's help, you
can help other too.

Revision history for this message
Andrey Zaitsev (a-zaitsev) wrote :

Ok I'll stay with this one, :) you are right! Nevertheless here is corresponding bug report at bugzilla.kernel.org http://bugzilla.kernel.org/show_bug.cgi?id=8424

Andrew Morton paid attention to it - it's a good sign. :)

Changed in linux-source-2.6.20:
status: Confirmed → Triaged
Changed in linux:
status: Unknown → Confirmed
Revision history for this message
jmspeex (jean-marc-valin) wrote :

I'm hit by exactly the same bug on my Dell D820 with the 64-bit version of Edgy. It's really annoying because it really mean I have no way to use that CF card in my laptop at all. Bug occurs 100% of the time, so it's quite serious. I can attach the dmesg, but it's fairly similar to the one above.

Changed in linux:
status: Confirmed → Fix Released
Revision history for this message
Oleksij Rempel (olerem) wrote :

it seems to be fixed for gutsy. Please try.

Regards,
Alex

Revision history for this message
Launchpad Janitor (janitor) wrote : This bug is now reported against the 'linux' package

Beginning with the Hardy Heron 8.04 development cycle, all open Ubuntu kernel bugs need to be reported against the "linux" kernel package. We are automatically migrating this bug to the new "linux" package. However, development has already began for the upcoming Intrepid Ibex 8.10 release. It would be helpful if you could test the upcoming release and verify if this is still an issue - http://www.ubuntu.com/testing . If the issue still exists, please update this report by changing the Status of the "linux" task from "Incomplete" to "New". We appreciate your patience and understanding as we make this transition. Thanks!

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Revision history for this message
Launchpad Janitor (janitor) wrote : Kernel team bugs

Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. Thanks.

Revision history for this message
Jim Lieb (lieb) wrote :

This problem was fixed in later kernels. If there is an issue with current kernels, please submit a new bug report.

Changed in linux (Ubuntu):
status: Incomplete → Invalid
Changed in linux:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.