LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-27-2011, 03:12 PM   #1
cooljake
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Rep: Reputation: 0
init hangs on bootup with newer kernel


I went from kernel 2.6.23.5 to 2.6.37 and init hangs before switching to run level 3. It executes all initial system scripts via "rc sysinit" at sysinit runlevel but never switches to run level 3 which is my initdefault. This was first seen with sysvinit-2.86 so I upgraded to sysvinit-2.88dsf and still I have the same issue.

I then enabled debug and added my own debug statements and found that it's hanging on select() inside check_init_fifo(). See code snippet here.

Why would select() hang when it has a five second timeout set?

Kernels 2.6.23.17 and 2.6.25.20 work fine. Kernels 2.6.35.10, 2.6.37, 2.6.38-rc1 all have the init hang issue.

I am compiling init on a 2.6.23.5 system so I don't know if that is an issue or not. The system has gcc 4.0.1 and glibc-2.3.5.

Is there a requirement to have glibc compiled against newer kernel headers?

Any help or insight would be much appreciated.

Last edited by cooljake; 01-27-2011 at 03:14 PM. Reason: Make questions clearer, added link to pastebin
 
Old 01-27-2011, 03:33 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
It is better to use the default gcc and glibc with distribution.
 
Old 01-27-2011, 09:17 PM   #3
cooljake
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Original Poster
Rep: Reputation: 0
I've narrowed this down to init working properly in kernel 2.6.26.8 but not in 2.6.27 (two adjacent releases), at least not with their default configs (make defconfig). So then I copied the .config from 2.6.26.8 to 2.6.27, ran make, answered all questions with defaults, and booted the 2.6.27 kernel and now init is working properly (i.e., it's switching to runlevel 3 like it should).

So the next step is to figure out what kernel option is causing the problem. You can see the diff between the default non-working .config and the working .config here. If anyone has ideas what it might be, please share. In the meantime, I'll be going through and enabling/disabling different options to narrow it down.
 
Old 01-27-2011, 11:06 PM   #4
cooljake
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Original Poster
Rep: Reputation: 0
I think I have it figured out. If this kernel option is NOT enabled, init hangs:

CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y

Therefore, I believe the real problem is udev. I'm using an old version of udev that likely depends on deprecated features of sysfs. Updating udev should fix it. I don't think it's a coincidence that udev runs during sysinit runlevel before init switches to runlevel 3.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
2.4.36.3: busybox's Init hangs at "Freeing unused kernel memory: " tilman1 Linux - Kernel 6 06-16-2008 02:01 AM
Bootup hangs at INIT:Version 2.84 booting MJSH Linux - General 3 05-11-2007 09:05 PM
Kernel Boots but then hangs. Init Doesn't Start jhorton Mandriva 4 10-14-2004 10:31 AM
Redhat linux9.0:System hangs,if gives init 3 or init 4 Sailaja Reddy Linux - Newbie 4 09-16-2004 03:19 AM
Kernel bootup hangs on ACPI on Toshiba TE2300 Alf829 Linux - Laptop and Netbook 0 03-28-2004 02:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 07:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration