Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 118533 - Spontaneous reboots with udev and 2.6.15
Summary: Spontaneous reboots with udev and 2.6.15
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Greg Kroah-Hartman (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-10 07:48 UTC by Tobias Klausmann (RETIRED)
Modified: 2006-01-21 03:48 UTC (History)
0 users

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


Attachments
Patch against /lib/rcscripts/addons/udev-start.sh (udev-start.sh.patch,356 bytes, patch)
2006-01-21 03:48 UTC, Tobias Klausmann (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Klausmann (RETIRED) gentoo-dev 2006-01-10 07:48:18 UTC
I recently updated my Laptop to 2.6.15. Everything seemed peachy until one day I realized that I have to boot twice every time. While this may sound more than silly, let me explain.

If the laptop has been shutdown normally, booting it will only get me up to "Letting udev process events" (from /lib/rcscripts/addons/udev-start.sh). Then it will wait a few seconds (much less than the 30s the script would wait) at which point I get "Restarting system" and a reboot. Seeing as this is not "decorated" in the rc-script way, it's probably from the Kernel. Thing is: I've been digging through probably all of the init and udev scripts but I haven't found a reason for this reboot. 

Anyway, if I let the notebook just reboot and boot the very same kernel (i.e. boot just as I did above), I get past this point. I get the next line ("Finializing" - nice typo, btw, cost me another 10 minutes to grep for the right (wrong) word). After that, the system boots normally.

I had the suspicion that this was some sort of update-once-action or maybe a glitch. But I can reproduce it every time: reboot the machine, one half boot, boot completes. Over and over again. If I go back to 2.6.14.2, it's gone (probably due to /sbinudevstart vs. trigger_events). 

Still, I am at a complete loss as to why this [expletive deleted] Kernel thinks a reboot would be a nice idea. Currently I'm masking out parts of /sys/classes in order to maybe find the guilty device, but I have little hope.

udev is version 079
$ emerge info
Portage 2.1_pre3-r1 (default-linux/x86/2005.0, gcc-3.4.5, glibc-2.3.6-r2, 2.6.15 i686)
=================================================================
System uname: 2.6.15 i686 Intel(R) Pentium(R) M processor 1.70GHz
Gentoo Base System version 1.12.0_pre13
dev-lang/python:     2.3.4-r1, 2.4.2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 "
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 "
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig digest distlocks sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="http://ftp.freenet.de/pub/ftp.snt.utwente.nl/pub/os/linux/gentoo http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/"
LC_ALL="en_US"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync5.de.gentoo.org/gentoo-portage"
USE="x86 X a52 aalib acpi alsa apm audiofile avi bash-completion berkdb bitmap-fonts bluetooth bmp bzip2 cdparanoia cdr crypt cups curl curlwrappers dga divx4linux dv dvd dvdr dvdread eds emboss encode ethereal exif expat fam ffmpeg fftw firefox flac font-server foomaticdb fortran ftp gd gdbm ggi gif glut gmp gphoto2 gpm gps gstreamer gtk gtk2 icq idn ieee1394 imagemagick imap imlib ipv6 jabber java jpeg kdeenablefinal lcms libcaca libg++ libwww lirc lm_sensors mad maildir matroska mikmod mmap mmx mng motif moznocompose moznoirc moznomail mozsvg mp3 mpeg mysql ncurses nls nptl ogg oggvorbis oss pam pcre pdflib perl png python qt quicktime readline recode scanner sdl sharedmem slang sndfile sox spell sse ssl sv svg tcpd tetex theora tiff truetype truetype-fonts type1-fonts udev unicode usb v4l vcd vorbis wifi win32codecs xine xml2 xmms xosd xpm xv xvid zlib elibc_glibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, LANG, LDFLAGS, LINGUAS
Comment 1 Greg Kroah-Hartman (RETIRED) gentoo-dev 2006-01-10 16:33:17 UTC
The box should not reboot :(

I have no idea why this is happening, if you switch to a static /dev, does
the machine boot on 2.6.15 just fine?
Comment 2 Tobias Klausmann (RETIRED) gentoo-dev 2006-01-11 02:58:42 UTC
I did some more testing last night (but couldn't update the bug since my Internet connection went belly-up).

I've narrowed it down to /sys/class/net/eth0/uevent. If I prevent the udev-start.sh script from send "add" into that file, everything is peachy. If it does, however, two things are different: 1) The loop waiting for udev to process events runs a whole lot longer (>5s) than if it isn't (1-2s). 2) The machine reboots in that loop. 

As for the hardware, it's a Thinkpad R51 with no frills besides extra RAM. That means eth0 is an EEPro 1000 and eth1 is an ipw2200 (which isn't active at that point). 

All the other adding-events work fine, as does /sbin/udevstart with 2.6.14. What I haven't tried (yet) is 2.6.15 with static /dev (I will do that today).


Comment 3 Tobias Klausmann (RETIRED) gentoo-dev 2006-01-11 04:42:28 UTC
I've now also tested using static /dev. It works according to what I suspected: no rpoblem at all. The reboot definitely is triggered by the echo to /sys.../eth0/uevent.

If I do that echo manually when the machine is booted, nothing happens. This is getting stranger an stranger. I'll try to dig through the Kernel source in search of the code path that provokes the reboot - but I'm less than confident that I find anything of value.
Comment 4 Tobias Klausmann (RETIRED) gentoo-dev 2006-01-11 10:10:38 UTC
Correction to the last comment: If I boot the machine by disallowing the udev script to write to the file in /sys, i.e. not triggering the one-and-a-half boot, I can reboot the machine by writing add to the /sys file. This isn't an ordinary reboot (like using reboot pr shutdown) nor is it a hard reset. It's like only executing the kernel part of a reboot; no daemons are stopped and no filesystems are un- or remounted. 
Comment 5 Tobias Klausmann (RETIRED) gentoo-dev 2006-01-21 03:47:33 UTC
Today I tried 2.6.16-rc1 - to no avail. The Changelog didn't hint at a bug/fix anyway, but I thought I'd take the chance. FOr now, I've patched the udev-start.sh script. I'll attach the patch so anyobody with the same problem can benefit from it.
Comment 6 Tobias Klausmann (RETIRED) gentoo-dev 2006-01-21 03:48:38 UTC
Created attachment 77693 [details, diff]
Patch against /lib/rcscripts/addons/udev-start.sh