Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 35342 - USB crashes after upgrade to 2.4.20-gentoo-r9
Summary: USB crashes after upgrade to 2.4.20-gentoo-r9
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: x86-kernel@gentoo.org (DEPRECATED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-08 08:37 UTC by Guy Van Sanden
Modified: 2004-04-13 20:02 UTC (History)
2 users (show)

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


Attachments
diff between r8 and r9 (r8-r9-diff.txt,9.75 KB, text/plain)
2003-12-15 11:28 UTC, Guy Van Sanden
Details
r8 Ebuild (gentoo-sources-2.4.20-r8.ebuild,5.09 KB, text/plain)
2003-12-16 14:05 UTC, Guy Van Sanden
Details
Stack dump (usbcrash,640 bytes, text/plain)
2003-12-17 04:48 UTC, Guy Van Sanden
Details
r9 .config file (.config,31.61 KB, text/plain)
2003-12-17 05:25 UTC, Guy Van Sanden
Details
r9 genkernel config file (config-2.4.20-gentoo-r9,30.52 KB, text/plain)
2003-12-17 05:26 UTC, Guy Van Sanden
Details
Ksymoops output on error (oops.output,2.60 KB, text/plain)
2004-01-16 08:51 UTC, Guy Van Sanden
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guy Van Sanden 2003-12-08 08:37:21 UTC
I upgraded to 2.4.20-gentoo-r9 after GLSA:  kernel (200312-02) using genkernel.
After recompiling-installing the kernel, it boots fine, but when running lsusb
or plugging in a device, the system hangs with only this message in the log:
[kernel] invalid operand: 0000

I also tried the compile by copying /etc/kernels/config-2.4.20-gentoo-r8 to -r9,
to make sure everyting was configured identical.

Re-emerging gentoo-sources doesn't help

Reproducible: Always
Steps to Reproduce:
1. genkernel
2. lilo
3. reboot

Actual Results:  
Everything seems OK, but USB does not work (crash).
The light on an USB Storage stick does not even turn on.

Expected Results:  
Normal USB functionality

Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3, 2.4.20-gentoo-r8)
=================================================================
System uname: 2.4.20-gentoo-r8 i686 AMD Athlon(tm) XP 1700+
Gentoo Base System version 1.4.3.10
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache autoaddcvs"
GENTOO_MIRRORS="http://194.83.57.3/sites/www.ibiblio.org/gentoo/
http://ftp.easynet.nl/mirror/gentoo/
http://194.83.57.2/sites/www.ibiblio.org/gentoo/
http://194.83.57.15/sites/www.ibiblio.org/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 oss apm avi crypt encode foomaticdb gif jpeg libg++ mad mikmod mpeg
ncurses nls pdflib png quicktime spell xml2 xmms xv zlib gtkhtml gdbm berkdb
slang readline bonobo svga tcltk java sdl gpm tcpd pam libwww perl python esd
imlib oggvorbis gnome gtk motif opengl cdr X gtk2 qt kde -alsa arts pda truetype
sse 3dnow mmx scanner xosd acpi dvd cups mozilla ssl mysql"
Comment 1 Carsten Lohrke (RETIRED) gentoo-dev 2003-12-08 10:30:53 UTC
I have a similar setup (processor/compiler/cflags) and the usb stuff (stick,scanner) works fine here with -r9. 
Comment 2 Guy Van Sanden 2003-12-09 02:45:38 UTC
I tried xfs-sources-2.4.20-r4 and gentoo-sources-2.4.22-r1, and they both have USB working on my system (I tried to keep the config as much as possible the same).

Unfortunately, XFS sources does not seem to have low-latency patch, and for  some reason, 2.4.22 is unbearably slow on reiserfs internal tree checks (5-10 times slower than 2.4.20).

So, I reverted to 2.4.20-r8 again, but now I know that it is not a problem with how I configured the kernel.
Comment 3 Tim Yamin (RETIRED) gentoo-dev 2003-12-14 09:14:55 UTC
Can you please do the following if you are experiencing problems with -r9 and not -r8:

 ! Save your .config's!
 - Run "make mrproper" in both -r8 and -r9 trees.
 * Ensure that there is no difference between the trees other than the do_brk
   fix [ Run "diff -ur linux-2.4.20-gentoo-r8 linux-2.4.20-gentoo-r9" ]
 - Try recompiling linux-2.4.20-gentoo-r9 with your config.
Comment 4 Guy Van Sanden 2003-12-15 11:26:28 UTC
It still crashes (only got Dec  9 11:08:50 [kernel] Unable to handle kernel paging request at virtual address fffffcdc) in the logs before everything froze

>! Save your .config's!
Do I need to do this, even when using genkernel?  I thought I just had to copy the files in /etc/kernels?

Trying again with this procedure:
link /usr/src/linux to -r9
make mrproper in r8 and r9
there are no .config's in either directory
copy /etc/kernels/config-2.4.20-gentoo-r8 to config-2.4.20-gentoo-r9

diff -ur linux-2.4.20-gentoo-r8 linux-2.4.20-gentoo-r9 (in attachment)

genkernel
Gentoo Linux genkernel, version 1.8
 Copyright 2003 Gentoo Technologies, Inc., Bob Johnson, Daniel Robbins
 Distributed under the GNU General Public License version 2

Settings:
 make options: -j2 (from Portage/make.conf)
 source tree: /usr/src/linux-2.4.20-gentoo-r9
 config type: gentoo (customized)
 config loc: /etc/kernels/config-2.4.20-gentoo-r9
 initrd config: (default) /etc/kernels/settings

 * Running "make mrproper"...                                                         [ ok ]
 * Running "make oldconfig"...                                                        [ ok ]
 * Logging to /var/log/genkernel.log...                                               [ ok ]
 * Starting 2.4.20-gentoo-r9 build...                                                 [ ok ]
 * Running "make dep"...                                                              [ ok ]
 * Running "make bzImage"...                                                          [ ok ]
 * Running "make modules"...                                                          [ ok ]
 * Running "make modules_install"...                                                  [ ok ]
 * Moving bzImage to /boot/kernel-2.4.20-gentoo-r9...                                 [ ok ]
 * Copying System.map to /boot/System.map-2.4.20-gentoo-r9...                         [ ok ]
 * Building busybox...                                                                [ ok ]
 * Creating initrd...                                                                 [ ok ]

 * Build completed successfully!

 * Please specify /boot/kernel-2.4.20-gentoo-r9 and /boot/initrd-2.4.20-gentoo-r9
 * when customizing your boot loader configuration files.

 * A detailed log can be found at /var/log/genkernel.log.
Comment 5 Guy Van Sanden 2003-12-15 11:28:01 UTC
Created attachment 22251 [details]
diff between r8 and r9
Comment 6 Paul Varner (RETIRED) gentoo-dev 2003-12-15 14:47:05 UTC
Your diff is definitely interesting.  On my server, which I updated from -r8 to
-r9, I have the following:

garion src # diff -ur linux-2.4.20-gentoo-r8 linux-2.4.20-gentoo-r9
diff -ur linux-2.4.20-gentoo-r8/Makefile linux-2.4.20-gentoo-r9/Makefile
--- linux-2.4.20-gentoo-r8/Makefile     2003-12-15 16:27:56.000000000 -0600
+++ linux-2.4.20-gentoo-r9/Makefile     2003-12-03 01:06:26.000000000 -0600
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 20
-EXTRAVERSION = -gentoo-r8
+EXTRAVERSION = -gentoo-r9

 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)

Only in linux-2.4.20-gentoo-r9/kernel: proconfig.data
diff -ur linux-2.4.20-gentoo-r8/mm/mmap.c linux-2.4.20-gentoo-r9/mm/mmap.c
--- linux-2.4.20-gentoo-r8/mm/mmap.c    2003-12-15 16:27:56.000000000 -0600
+++ linux-2.4.20-gentoo-r9/mm/mmap.c    2003-12-03 01:06:26.000000000 -0600
@@ -1248,6 +1248,9 @@
        if (!len)
                return addr;

+       if ((addr + len) > TASK_SIZE || (addr + len) < addr)
+               return -EINVAL;
+
        /*
         * mlock MCL_FUTURE?
         */
Only in linux-2.4.20-gentoo-r9/mm: mmap.c.orig
Only in linux-2.4.20-gentoo-r9/net/ipsec/alg: ipsec_alg_static_init.c
Only in linux-2.4.20-gentoo-r9/net/ipsec/alg: libaes
Only in linux-2.4.20-gentoo-r9/net/ipsec/alg: libserpent
Only in linux-2.4.20-gentoo-r9/net/ipsec/alg: libtwofish
Only in linux-2.4.20-gentoo-r9/net/ipsec/alg: perlasm
Only in linux-2.4.20-gentoo-r9/net/ipsec/libdes/asm: dx86unix.S
Only in linux-2.4.20-gentoo-r9/net/ipsec/libdes/asm: yx86unix.S
Only in linux-2.4.20-gentoo-r9/net/ipsec/libfreeswan: version.c
Only in linux-2.4.20-gentoo-r9/scripts: makeproconfigdata
Comment 7 Guy Van Sanden 2003-12-16 03:50:49 UTC
This is very strange!

I have rm -rf'd /usr/src/2.4.20-gentoo-r9 and re-emerged it before, this diffs stays...
Comment 8 Paul Varner (RETIRED) gentoo-dev 2003-12-16 06:57:54 UTC
It looks like something has possibily patched your r8 kernel sources. As a test,
I would backup the 2.4.20-gentoo-r8 source, remove the current r8 source and
re-emerge  2.4.20-gentoo-r8 using:
'emerge -v =sys-kernel/gentoo-sources-2.4.20-r8'
Run make mrproper in the new source tree and then run the diff. At that point
the diff should really only contain the Makefile.  If that is the case, copy the
current r8 kernel/initrd/System.map in /boot and update grub/lilo to have an
entry for the backed up version and use genkernel to create a new r8 kernel and
see if it has the same problems as the r9 kernel. If it does, then we know that
something modified your copy of the r8 source and that your system doesn't like
the gentoo-sources for some reason.  Finally as a safety precaution, before
starting all of the above make a complete backup of /boot and /usr/src so you
can restore back to the current state if neccessary.
Comment 9 Tim Yamin (RETIRED) gentoo-dev 2003-12-16 09:07:32 UTC
Guy Van Sanden: Can I please have the MD5 sums of:

/var/db/pkg/sys-kernel/gentoo-sources-2.4.20-r8/gentoo-sources-2.4.20-r8.ebuild
/var/db/pkg/sys-kernel/gentoo-sources-2.4.20-r9/gentoo-sources-2.4.20-r9.ebuild

The only differences you should have in your trees are those Paul Varner reported in comment #6.
Comment 10 Guy Van Sanden 2003-12-16 10:11:17 UTC
73e93003f3d428f0211e324428a73032  /var/db/pkg/sys-kernel/gentoo-sources-2.4.20-r8/gentoo-sources-2.4.20-r8.ebuild
48d4543d5b1affb9395a7ab655b72655  /var/db/pkg/sys-kernel/gentoo-sources-2.4.20-r9/gentoo-sources-2.4.20-r9.ebuild
Comment 11 Tim Yamin (RETIRED) gentoo-dev 2003-12-16 13:19:04 UTC
Guy Van Sanden: Strange - I can't trace 73e93003f3d428f0211e324428a73032 to anything which is and was in CVS for -r8. Can you please attach that ebuild?
Comment 12 Guy Van Sanden 2003-12-16 14:05:15 UTC
Created attachment 22323 [details]
r8 Ebuild

This is my -r8 ebuild file
Comment 13 Tim Yamin (RETIRED) gentoo-dev 2003-12-16 14:51:23 UTC
Hmm. For some reason the WebCVS snapshot didn't conincide with that on my end - the ebuild looks fine and the patch is correct, as the netfilter change was added later so the patch you're getting is fine. What's strange is why -r9 gives you USB problems: none of the USB code has been modified at all: the only differences between the two trees are the do_brk patch and the netfilter change.

Can you please capture that OOPS message [ you should see lots of hexadecimal code which represents a stack trace; that's what we need ] and attach it here along with your .config for -r9. Thanks.
Comment 14 Guy Van Sanden 2003-12-17 04:48:46 UTC
Created attachment 22337 [details]
Stack dump

I got this stack-dump when inserting a USB stick

Doing lsusb (with or without the stick inserted) gives a kernel panic, so I'm
unable to save those messages
Comment 15 Guy Van Sanden 2003-12-17 05:25:59 UTC
Created attachment 22339 [details]
r9 .config file

This is my r9 .config, I used genkernel however, so I'm also uploading
/etc/kernels/config-2.4.20-gentoo-r9 (which was used)
Comment 16 Guy Van Sanden 2003-12-17 05:26:22 UTC
Created attachment 22340 [details]
r9 genkernel config file
Comment 17 Tim Yamin (RETIRED) gentoo-dev 2004-01-15 11:12:14 UTC
Guy Van Sanden: Can you please emerge ksymoops and do "ksymoops < file_with_output > file_with_out" on the faulty kernel and paste the output here please?
Comment 18 Guy Van Sanden 2004-01-16 08:48:20 UTC
tried 2.4.20-r10, same problem.
Something is odd though, if I plug a device in before boot (USB stick), and I do cdrecord --scanbus, the device is shown.
lsusb crashes though.
Comment 19 Tim Yamin (RETIRED) gentoo-dev 2004-01-16 08:51:21 UTC
-r10 has no changes other than the security fix so you will and should get this. I'm hoping to fix this and add a bunch of other stuff in -r11. Can I please have that stack trace?
Comment 20 Guy Van Sanden 2004-01-16 08:51:52 UTC
Created attachment 23929 [details]
Ksymoops output on error

Requested by plasmaroo, will this one do?

BTW, I'm still on a vulnerable kernel (-r8), since the 2.4.22 kernels give me
NFS problems (USB works though)
Comment 21 Tim Yamin (RETIRED) gentoo-dev 2004-01-16 09:27:16 UTC
Thanks, that's what I wanted - can you please enable CONFIG_USB_DEBUG and see if anything comes out from dmesg?
Comment 22 Guy Van Sanden 2004-01-17 01:18:34 UTC
CONFIG_USB_DEBUG set, but no more information is logged
Comment 23 Jason Cox (RETIRED) gentoo-dev 2004-04-08 21:15:13 UTC
Have you tried upgrading to one of the later 2.4, or even a 2,6, kernel? Does the issue still exist?
Comment 24 Jason Cox (RETIRED) gentoo-dev 2004-04-13 20:02:50 UTC
This bug has gone stale. Three months without hearing anything. Marking fixed unless I hear other wise.