Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 402433 - Kernel 3.2.1-gentoo-r2 - oops when I eject sd card in try_to_wake_up+0x200/0x200
Summary: Kernel 3.2.1-gentoo-r2 - oops when I eject sd card in try_to_wake_up+0x200/0x200
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: http://git.kernel.org/?p=linux/kernel...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-06 18:32 UTC by Naveen Goswamy
Modified: 2012-06-21 13:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Some logs of the kernel when it oops'd (Oops1.txt,6.22 KB, text/plain)
2012-02-06 18:32 UTC, Naveen Goswamy
Details
Another example of oops (Oops2.txt,4.59 KB, text/plain)
2012-02-06 18:32 UTC, Naveen Goswamy
Details
my kernel config file (.config,93.54 KB, text/plain)
2012-02-06 18:34 UTC, Naveen Goswamy
Details
Dave Jones backport of Jun'ichi Nomura (daves.patch,3.43 KB, text/plain)
2012-02-29 18:35 UTC, Naveen Goswamy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Naveen Goswamy 2012-02-06 18:32:02 UTC
Created attachment 301053 [details]
Some logs of the kernel when it oops'd

Using gentoo-sources, linux-3.2.1-gentoo-r2, I get a kernel oops when I eject my sd card, after using it normally (mount, use, unmount, eject).

I am attaching my kernel .config, as well as two examples of the kernel panic/oops from /var/log/messages
Comment 1 Naveen Goswamy 2012-02-06 18:32:41 UTC
Created attachment 301055 [details]
Another example of oops
Comment 2 Naveen Goswamy 2012-02-06 18:34:02 UTC
Created attachment 301057 [details]
my kernel config file
Comment 3 Naveen Goswamy 2012-02-06 18:35:11 UTC
speedy src # emerge --info
Portage 2.1.10.44 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.13-r4, 3.2.1-gentoo-r2_MINE_V01 x86_64)
=================================================================
System uname: Linux-3.2.1-gentoo-r2_MINE_V01-x86_64-Intel-R-_Core-TM-_i3_CPU_M_370_@_2.40GHz-with-gentoo-2.0.3
Timestamp of tree: Mon, 06 Feb 2012 16:15:01 +0000
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.1.4-r3
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo pd-overlay sabayon x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://gentoo.arcticnetwork.ca/pub/gentoo/ http://gentoo.arcticnetwork.ca/ rsync://mirror.the-best-hosting.net/gentoo-distfiles http://mirror.the-best-hosting.net"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/pd-overlay /var/lib/layman/sabayon /usr/local/portage"
SYNC="rsync://rsync5.ca.gentoo.org/gentoo-portage"
USE="X \ a52 aac acl acpi alsa amd64 aperfmperf apic arat arch_perfmon bash-completion berkdb bluetooth branding bts bzip2 cairo cdda cdr clflush cli cmov consolekit constant_tsc cracklib crypt cups cx16 cx8 cxx dbus de doc dri ds_cpl dtes64 dts dvd dvdr emboss encode ept est evdev exif fam firefox flac flexpriority fortran fpu fxsr gdbm gdu gif gpm gtk ht iconv intel ipv6 jack jpeg kde lahf_lm lame lcms ldap libnotify lm lock mad mca mce mmx mmxext mng modules monitor mp3 mp4 mpeg msr mtrr mudflap multilib ncurses nls nonstop_tsc nptl nptlonly nx ogg opengl openmp pae pam pango pat pbe pcre pdcm pdf pebs pge png pni policykit popcnt ppds pppd pse pse36 python qt qt3support qt4 rdtscp readline rep_good rtmp sdl sep session spell ss sse sse2 sse4_1 sse4_2 ssl ssse3 startup-notification svg synaptics syscall sysfs tcpd thunar tiff tm tm2 tpr_shadow truetype tsc udev unicode usb vaapi vme vmx vnmi vorbis vpid x264 xcb xcomposite xinerama xml xorg xtopology xtpr xulrunner xv xvid zlib zsh-completion" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Naveen Goswamy 2012-02-08 18:48:51 UTC
Note that this issue happens with kernel=3.2.5 as well, but not kernel<=3.0.6
Comment 5 Naveen Goswamy 2012-02-13 02:16:17 UTC
Note that this problem does not happen when virtualbox drivers are not loaded.

The following links also address this issue

http://marc.info/?l=linux-scsi&m=132388619710052

http://marc.info/?l=linux-scsi&m=132909845126932&w=2
Comment 6 Naveen Goswamy 2012-02-13 02:27:14 UTC
Fedora bugzilla has this too

https://bugzilla.redhat.com/show_bug.cgi?id=754518
Comment 7 Naveen Goswamy 2012-02-13 17:43:31 UTC
Sorry, it does happen still (even without vbox drivers)
Comment 8 Naveen Goswamy 2012-02-29 18:33:35 UTC
There is a patch that was written by Jun'ichi Nomura for the 3.3 kernel which fixes this issue.  I have tested it with 3.3-rc5.  The patch is available here:

https://lkml.org/lkml/2012/2/22/1

In that same mailing list thread, Dave Jones posted a backport of the patch to the 3.2 kernel.  I have tested that patch with 3.2.1-gentoo-r2 and it also works.

I am attaching the 3.2 backported patch to this bug-ticket as well.
Comment 9 Naveen Goswamy 2012-02-29 18:35:08 UTC
Created attachment 303761 [details]
Dave Jones backport of Jun'ichi Nomura
Comment 10 Naveen Goswamy 2012-02-29 18:37:35 UTC
Comment on attachment 303761 [details]
Dave Jones backport of Jun'ichi Nomura

This fixes the issue I experienced with ejecting the SD card crashing/oopsing my kernel, it is a modified version of a linux-3.3 patch proposed by Jun'ichi Nomura
Comment 11 Mike Pagano gentoo-dev 2012-06-14 01:09:17 UTC
The referenced patch appears to be in kernels >= 3.3.0.  Can you please test with a later kernel and post the results.
Comment 12 Naveen Goswamy 2012-06-14 11:47:04 UTC
3.2.12 from the gentoo portage tree is what I run now, didn't need to be patched, I think the code was merged upstream by this version.

I will try something newer next week and post the results.

Cheers,

Naveen
Comment 13 Naveen Goswamy 2012-06-21 10:29:42 UTC
So, after testing, it seems the bug is also resolved in gentoo sources for the linux 3.4.3 kernel
Comment 14 Mike Pagano gentoo-dev 2012-06-21 13:49:15 UTC
Thanks for testing