[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#528989: linux-image-2.6.26-2-amd64: Kernel errors when inserting memory card



Am Tue, 25 Aug 2009 23:33:54 +0200 schrieb Moritz Muehlenhoff
<jmm@inutil.org>:
> On Sun, May 17, 2009 at 04:20:59AM +0200, Christoph Franzen wrote:
> > Package: linux-image-2.6.26-2-amd64
> > Version: 2.6.26-15lenny2
> > Severity: important

> > I'm using Lenny (AMD64 with proposed updates) on a HP Pavilion
> > dv9668eg laptop with an internal card reader and a Turion X2 TL-60
> > dual core processor. See also the "lspci" ans "lsmod" outputs below.
> > 
> > Whenever a SD or SDHC card is inserted into the card reader,
> > the system fails randomly, but always, after some
> > subsequent accesses with one of these symptoms:
> > 
> > - Kernel Oops messages
> > - Fsck erronneously reporting a damaged file system
> > - Complete system freezes (only "Alt-Sysrq-b" works)
> > - Other kernel error messages
> > =================================================
> > -- Package-specific info:
> > ** Version:
> > Linux version 2.6.26-2-amd64 (Debian 2.6.26-15lenny2)
> > (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian
> > 4.1.2-25)) #1 SMP Wed May 13 15:37:46 UTC 2009
> > 
> > ** Command line:
> > root=/dev/sdb1 ro 
> > 
> > ** Tainted: P (1)
> 
> Sorry for the late response.
> 
> First of all we should rule out that the Nvidia kernel module is
> causing trouble. Does the error also occur if they're not loaded?
> 
> As a next step we should test, whether this has been fixed upstream
> in the mean time. Please install a 2.6.30 kernel from backports.org
> to test whether this is the case. If so, we can try to identify if
> isolated patches can resolve the problem for the Lenny kernel and
> apply them for a point update.

Hello,

I have done the following tests:

1) Installed 2.6.30 from the backports, but without the Nvidia
proprietary module, and rebooted into this configuration without
changing "xorg.conf" to the "nv" driver, so X did not start; inserted
the same 2GB SD card which I used before, mounted it by hand
("/dev/mmcblk0p1" on "/mnt"), tried "ls", copied all files from the
card to a temporary location on the hard disk, copied about 256 MiB of
files to the SD card, umounted the card again.
=> everything worked fine, no problems at all.

2) Changed "xorg.conf" to rule out the proprietary driver, rebooted
into 2.6.26 with the SD card still inserted.
=> The kernel crashed while booting as soon as the card was accessed.

3) Removed the card from the slot, booted into 2.6.30, X started with
"nv", as soon as the card was inserted it got automounted. I deleted
the 256 MiB of data from step 1) from the card, umounted via Gnome's
desktop icon, removed the card from the slot.
=> No problems at all, reading and writing succeeded.

4) Rebooted into 2.6.26 with Gnome and "nv" loaded as in step 3),
inserted the card.
=> The system froze immediately, even Alt-Sysrq-b did not work. No
keyboard or mouse input had any visible effect, the image on screen
remained as it was when the card was inserted, none of the Laptop's LEDs
did change its state.

So I conclude that the bug has been fixed in a kernel version after
2.6.26 and is no longer present in 2.6.30. Nvidia seems to have no
influence, because not loading it does not solve the problem in 2.6.26.
However, there is one more difference in the loaded modules: in 2.6.26
Ndiswrapper with a Windows driver for my wireless interface gets
loaded, this was not installed with the 2.6.30 kernel, because I did
not yet recompile it for this version.

Some information about the device:

It's a Ricoh multifunction chip with 5 functions: Firewire, SD/SDHC,
MMC, Memorystick/MS pro, XD.

The "module tree" is as follows (hopefully without spelling errors I'm
writing from another computer):

sdhc-pci -- sdhc --+-- mmc-core
       ricoh_mmc --+

So the block device is "/dev/mmcblk*" also for SD cards.

Memorysticks do not work, because there is no kernel module for this
function, inserting one does no harm as expected. All Firewire stuff
gets loaded (ohci1394 and related user space stuff) without problems,
but I have no 2nd device to test with. I haven't got an XD card, so
this is also untested.

So the bug might hide in any of the modules above (sdhc*, mmc_core).

I think it would be best to port the fix from 2.6.30 to Lenny, because
the average user could suffer from severe data loss by simply inserting
a card into the slot.

I'm no kernel hacker, so I don't know where exactly to search for the
bug, but I will test anything for you if you wish.

Best regards, Christoph

Attachment: signature.asc
Description: PGP signature


Reply to: