Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 100315 - halt, poweroff, init 0, init 6, reboot, all end up with a kernel oops
Summary: halt, poweroff, init 0, init 6, reboot, all end up with a kernel oops
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High critical
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard: linux-2.6.14
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-25 21:10 UTC by Joe Acosta
Modified: 2005-10-28 10:00 UTC (History)
0 users

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


Attachments
2.6.10 kernel config file (.config,33.54 KB, text/plain)
2005-07-26 10:29 UTC, Joe Acosta
Details
2.6.12 kernel config file (.config,34.65 KB, text/plain)
2005-07-26 10:38 UTC, Joe Acosta
Details
image of the kernel oops (dsc00287_01.jpg,296.08 KB, image/jpeg)
2005-07-26 14:24 UTC, Joe Acosta
Details
kernel oops transcribed text (kernel_2.6.12-r6_oops.txt,1.51 KB, text/plain)
2005-07-26 14:26 UTC, Joe Acosta
Details
image of oops (dsc00303.jpg,1.20 MB, image/jpeg)
2005-09-16 21:10 UTC, Joe Acosta
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Acosta 2005-07-25 21:10:35 UTC
Not sure what to put in this bug, but it seems that if I halt my system, reboot
my system using reboot or init 6 or init 0 or halt or poweroff or shutdown -h
now, they all have the same result.  After unloading the pcmcia modules the
sytem has unmounted the drives and I get an kernel oops.  

Reproducible: Always
Steps to Reproduce:
1. emerge sync on 2005 July 22
2. make new kernel
3. reboot to new kernel
4. get oops on every shutdown, halt, reboot, etc.



Expected Results:  
It should just shutdown, I'm going to test 2.6.10 and see if I get the same
thing.  I did not have this problem in 2.6.11, but I can't find the ebuild for
2.6.11.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-07-26 00:08:24 UTC
emerge --info missing.
Comment 2 Joe Acosta 2005-07-26 09:06:23 UTC
Okay here is my emerge --info

Gentoo Base System version 1.6.13
Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.5-20050130,
glibc-2.3.5-r0, 2.6.12-gentoo-r6 i586)
=================================================================
System uname: 2.6.12-gentoo-r6 i586 Mobile Pentium MMX
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i386-pc-linux-gnu"
CFLAGS="-O2 -mcpu=i586 -fomit-frame-pointer"
CHOST="i386-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/rc.d /etc/splash /etc/terminfo /etc/wget
/etc/env.d"
CXXFLAGS="-O2 -mcpu=i586 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X alsa apm avi berkdb bitmap-fonts crypt curl directfb emboss encode
fbcon foomaticdb fortran gdbm gif gpm gtk gtk2 imlib ipv6 jpeg libg++ libwww mad
mikmod mp3 mpeg ncurses ogg oggvorbis oss pam pdflib perl png python qt
quicktime readline spell ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts
vorbis xml2 xmms zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTDIR_OVERLAY
Comment 3 Joe Acosta 2005-07-26 10:29:37 UTC
Created attachment 64363 [details]
2.6.10 kernel config file

I'm uploading my 2.6.10 config file.  It seems that 2.6.10 has no problems with
poweroff.
Comment 4 Joe Acosta 2005-07-26 10:38:46 UTC
Created attachment 64364 [details]
2.6.12 kernel config file

This is the 2.6.12 kernel config that I am using.

This should be very similar to the 2.6.10, except I think 2.6.12 has more
patches applied to it.

I'd upload the oops message, but the fs is already unmounted and the system is
not in working order at that point.  I do have a photo of it that I will try to
upload to show more.
Comment 5 Joe Acosta 2005-07-26 14:24:50 UTC
Created attachment 64383 [details]
image of the kernel oops

an image of the kernel oops
Comment 6 Joe Acosta 2005-07-26 14:26:34 UTC
Created attachment 64384 [details]
kernel oops transcribed text

My transcription of the kernel oops image I just uploaded for the download
challenged
Comment 7 Joe Acosta 2005-07-30 13:34:01 UTC
Okay, I have verified that when running 2.6.10 I do not have this problem.  I
think it is a patch applied to 2.6.12 that is not applied to 2.6.10.
Comment 8 Daniel Drake (RETIRED) gentoo-dev 2005-07-31 07:23:20 UTC
Is this reproducable with the latest development kernel? (currently
vanilla-sources-2.6.13_rc4)
Comment 9 Daniel Drake (RETIRED) gentoo-dev 2005-08-14 03:35:05 UTC
see comment #8
Comment 10 Joe Acosta 2005-08-14 11:30:35 UTC
(In reply to comment #9)
> see comment #8

Okay I've noticed that there is an rc6 now, but I am going to emerge rc4.

Also when I do the emerge its a masked package, and it also requires udev and
hotplug, which are not on my system.

Comment 11 Daniel Drake (RETIRED) gentoo-dev 2005-08-14 12:03:55 UTC
No, please use rc6 (rc4 was the latest 2 weeks ago). And yes you need udev,
devfs is no more.
Comment 12 Joe Acosta 2005-08-14 13:47:53 UTC
(In reply to comment #11)
> No, please use rc6 (rc4 was the latest 2 weeks ago). And yes you need udev,
> devfs is no more.

Okay, I'm building vanilla sources 2.6.13 rc6.  It will takea few hours on this
old 233mhz.

 

Comment 13 Joe Acosta 2005-08-14 15:31:25 UTC
Okay, just tested the poweroff with 2.6.13-rc6.  It works.  So does reboot.

However none of my sound modules seem to load.  I gets lots of unknown symbol in
module.  snd_pcm_lib_free_pages, snd_device_free, and more.  I'll have to double
check the config, but I think something else is going on.

Then it complains about the wireless extensions for eth0 have been compiled with
version 18, but this program supports version 17.  My guess is I need to
recompile or update cardmgr and pcmcia tools.  

Comment 14 Daniel Drake (RETIRED) gentoo-dev 2005-08-15 10:25:12 UTC
Sounds like you made some changes without updating modules or bzimage. Remove
/lib/modules/2.6.13-rc6, remake everything, copy over a new bzimage, reinstall
all your modules, and try again.

You probably need to recompile your wireless stuff.
Comment 15 Joe Acosta 2005-08-20 13:59:07 UTC
I did a make clean, and make bzImage and make module and then make
modules_install.  Then I copy'd the System.map and bzImage to /boot as well as
the config file.

I also did a modules-update too, just to see if that had any effect.

I still get Unknown symbol snd_ctl_add, snd_pcm_new, etc, etc, etc

Sound of course does not work.....

is there some change in the /etc/modules.d file needed?

Comment 16 Daniel Drake (RETIRED) gentoo-dev 2005-08-20 14:21:03 UTC
Did you "rm -rf /lib/modules/2.6.13-rc6" first as suggested?
Comment 17 Joe Acosta 2005-08-21 12:03:11 UTC
(In reply to comment #16)
> Did you "rm -rf /lib/modules/2.6.13-rc6" first as suggested?

Yes, I did.  That was the first thing I did.  Did the /etc/modules.d config file
format change for alsa or something?

Comment 18 Daniel Drake (RETIRED) gentoo-dev 2005-08-29 08:52:03 UTC
gentoo-sources-2.6.13 now in portage
Comment 19 Joe Acosta 2005-09-10 21:46:20 UTC
Okay here is what I found out.

2.6.12-r10 still has the bug.  This is the current gentoo-sources version.

2.6.13 that was release does not have this issue.  It however has another issue,
or mabe something has changed and is not documented.  

In the /etc/modules.d/alsa file I had 

options snd device_mode=0666

which is supposed to set the permissions on the devices when they are created. 
This is not working for me.  Once I removed this line, I am able to load the
modules.  However the problem ends up, that the devices are created with the
wrong permissions, so I have to be root to use the devices. They are created
with 660 instead of 666.

Should I open a new bug for this new issue?
Comment 20 Daniel Drake (RETIRED) gentoo-dev 2005-09-11 07:37:10 UTC
Yes if there is not one reported already
Comment 21 Joe Acosta 2005-09-11 10:51:00 UTC
hmm correction, 2.6.13 does still have the shutdown issue, but the 2.6.13-r6
does not have this issue.

to many kernel here for me ;-)
Comment 22 Daniel Drake (RETIRED) gentoo-dev 2005-09-11 11:54:52 UTC
Strange. Is it the exact same kernel oops?
Comment 23 Joe Acosta 2005-09-11 21:45:20 UTC
The Oops is pretty close to the initial one, only the call trace does not show
the functions names backtrace ( I'm guessing that's what that is ).

Addresses are different.  
Comment 24 Daniel Drake (RETIRED) gentoo-dev 2005-09-13 06:41:27 UTC
You need to use CONFIG_KALLSYMS to see the function names. Please capture a new
image of the oops after you have compiled that option in. It would also be
useful if you could test 2.6.13-rc7 so we can figure out if this problem
(re)appeared between rc6 and rc7 or between rc7 and final
Comment 25 Joe Acosta 2005-09-16 21:10:52 UTC
Created attachment 68639 [details]
image of oops

This attachment is an image of the oops.  As the oops is not in the logs, as
the filesystem is mounted readonly.  

I'm not going to transcsibe this, as it looks to me like the other one.  

I don't have access to 2.6.13-r7 as it is not in my portage tree.  Do you have
someplace to download it from?
Comment 26 Daniel Drake (RETIRED) gentoo-dev 2005-09-17 10:26:47 UTC
Probably easiest to do it manually.

In /usr/src, make sure "linux-2.6.12" does not exist and unpack
http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.12.tar.bz2

Also download
http://www.kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.13-rc7.bz2

# cd linux-2.6.12
# bzcat /path/to/patch-2.6.13-rc7.bz2 | patch -p1

Now compile/install your kernel as usual. To prevent future confusion, you might
also rename /usr/src/linux-2.6.12 to linux-2.6.13-rc7 :)
Comment 27 Joe Acosta 2005-09-18 12:17:37 UTC
I think I am getting somewhere with this!   

In the case of 2.6.13-r7 I have been doing some real QA testing here to find out
what the possible cause is.  I ams also testing 2.6.12-gentoo-r10.  I don't know
enough about the kernel to say for sure, but I believe it may have something to
do with alsa, in particular the snd-opl3sa2 sound card module, or opl3 module. 
Not 100% sure which one, but when these modules are loaded it oopses on reboots,
shutdown, halt.

1) 2.6.13-rc7:

I've setup the system so that the alsa snd module is 

options snd device-mode=0666

When the device gets created it SHOULD BE with mode 666 so that me as a user can
use it without needing to be root.

2.6.13 does not recognize the device_mode option, so sound modules are NOT
loaded because during boot the snd module is not recoginizing the
device_mode=0666 which is okay in 2.6.10.  

The I reboot.  System reboots with no problem!

If I REMOVE the device_mode option in /etc/modules.d/alsa and rerun
modules-update, then run /etc/init.d/alsasound restart the sound modules now get
loaded.

I then type reboot, only this time it gives an oops.

It stops local, saves iptables state, firewall, klogd / syslogd, then alsa, then
lo, then eth0, unmounting filesystems, then it goes into remounting remaining
filesystems readonly...

then oops.. system is still half up / mostly down, and lsmod shows snd modules
still loaded.  

I tried this several times, to make sure that I was not just loosing my mind ;-).


2) 2.6.12-gentoo-r10: 

If I comment out the line below in the /etc/modules.d/alsa file:

options snd-opl3sa2 fm_port=0x388 modi_port=0x330 port=0x370 wss_port=0x530
isapnp=0 dma1=1 dma2=0 irq=5

then run boot 2.6.12 it does not load the sound modules and it DOES NOT oops.  

If I uncomment these lines and do a modules-update and then restart alsasound,
and try the reboot it then oopses.

It is definately sound related!  

Both 2.6.13-rc7 and 2.6.12-gentoo-r10 reboot, halt and shutdown if the
snd-opl3sa2 module is not loaded.

I'm going to retest 2.6.13 to se if this problem exists there too.  At this
poin, I think that 2.6.13-rc6 may also have had this problem, but I did not
notice because maybe I did not test it with sound (device_mode issue). 




    







Comment 28 Joe Acosta 2005-09-20 19:55:06 UTC
Yup it exists in 2.6.13 as well.
Comment 29 Daniel Drake (RETIRED) gentoo-dev 2005-09-29 01:13:08 UTC
Ok, thanks for investigating that. Can you please test the latest development
kernel (currently vanilla-sources-2.6.14_rc2), so that we can file an upstream
bug report.
Comment 30 Joe Acosta 2005-09-30 09:41:41 UTC
Hello, I downloaded the 2.6.14_r2 last night and it had finished compiling this
morning.

My initial test has been good, but I want to do some more testing tonight.  It
loaded the alsa drivers on the first boot and when I rebooted I did not get an
oops.  

It seems like it is working okay, except alsa sound still does not recgonize
device_mode anymore, which I have filed as bug -> 106400.  Maybe I can configure
this in udev?

I'm going to test more after I get home from work and make sure all is okay with
2.6.14_r2, thanks.
Comment 31 Joe Acosta 2005-09-30 18:28:35 UTC
Okay after further testing the oops is gone with 2.6.14_r2.  

I guess this means one bug is fixed, and 2 are created ;-).

device_mode option still does not work and now there is no sound.  The sound
modules do get loaded.  The same modules are getting loaded also.  
  
Comment 32 Daniel Drake (RETIRED) gentoo-dev 2005-10-28 10:00:28 UTC
gentoo-sources-2.6.14 now available in portage