LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Explained: "kernel panic - not syncing - attempted to kill init" (https://www.linuxquestions.org/questions/linux-software-2/explained-kernel-panic-not-syncing-attempted-to-kill-init-353920/)

sundialsvcs 08-16-2005 02:27 PM

Explained: "kernel panic - not syncing - attempted to kill init"
 
When the kernel gets into a situation where it does not know how to proceed (most often during booting, but at other times), it issues a kernel panic by calling the panic(msg) routine defined in kernel/panic.c. (Good name, huh?) This is a call from which No One Ever Returns.

The panic() routine adds text to the front of the message, telling you more about what the system was actually doing when the panic occurred ... basically how big and bad the trail of debris in the filesystem is likely to be. This is where the "not syncing" part comes from, and when you see that, it's good. (panic() does try to issue a sinc() system-call to push all buffered data out to the hard-disks before it goes down.)

The second part of the message is what was provided by the original call to panic(). For example, we find panic("Tried to kill init!") in kernel/exit.c.

So, what does this actually mean? Well, in this case it really doesn't mean that someone tried to kill the magical init process (process #1...), but simply that it tried to die. This process is not allowed to die or to be killed.

When you see this message, it's almost always at boot-time, and the real messages ... the cause of the actual failure ... will be found in the startup messages immediately preceding this one. This is often the case with kernel-panics. init encountered something "really bad," and it didn't know what to do, so it died, so the kernel died too.

BTW, the kernel-panic code is rather cute. It can blink lights and beep the system-speaker in Morse code. It can reboot the system automagically. Obviously the people who wrote this stuff encountered it a lot... :)

In diagnosing, or at least understanding, kernel-panics, I find it extremely helpful to have on-hand a copy of the Linux source-code, which is usually stored someplace like /usr/src/linux-2.x. You can use the grep utility to locate the actual code which caused the panic to occur.

tuxdev 08-16-2005 02:36 PM

what about when init dies normally("halt")?

John Sharp 11-30-2006 11:16 AM

Kernel panic message
 
I have this very message on my red hat Fedora system while trying to boot after installing a new cpu fan and necessarily disconnecting and reconnecting the several components to the board, which had to come out due to mounting screws UNDER the board. I have reset the date and time and I suspect some other item(s) need to be set correctly so boot can continue, but I don't knkow which ones. Can anyone instruct me? Here is the last page of messages seen while booting, and I don't know how to retrieve any that scrolled by before these came:

…………..other stuff I can’t see off the screen)

Buffer I/O error on device hdb, logical block 2
Buffer I/O error on device hdb, logical block 3
Buffer I/O error on device hdb, logical block 4
Buffer I/O error on device hdb, logical block 5
Buffer I/O error on device hdb, logical block 6
Buffer I/O error on device hdb, logical block 7
Buffer I/O error on device hdb, logical block 8
Buffer I/O error on device hdb, logical block 9
/dev/hdb: read failed after 0 of 2048 at 0: Input/output error
/dev/hdb: read failed after 0 of 2048 at 528023552: Input/output error
/dev/hdb: read failed after 0 of 2048 at 0: Input/output error
No volume groups found
/dev/hdb: read failed after 0 of 2048 at 0: Input/output error
/dev/hdb: read failed after 0 of 2048 at 0: Input/output error
/dev/hdb: read failed after 0 of 2048 at 528023552: Input/output error
/dev/hdb: read failed after 0 of 2048 at 0: Input/output error
Unable to find volume group “VolGroup00”
Unable to access resume device (/dev/VolGroup00/LogVol01)
Mount: error No such device or address mounting /dev/root on /sysroot as ext3
Setuproot: moving /dev failed: No such file or directory
Setuproot: error mounting /proc: No such file or directory
Setuproot: error mounting /sys: No such file or directory
Switchroot: mount failed: No such file or directory
Kernel panic – not syncing: Attempted to kill init!

(and that’s all she wrote -- it freezes at that point)











Quote:

Originally Posted by sundialsvcs
When the kernel gets into a situation where it does not know how to proceed (most often during booting, but at other times), it issues a kernel panic by calling the panic(msg) routine defined in kernel/panic.c. (Good name, huh?) This is a call from which No One Ever Returns.

The panic() routine adds text to the front of the message, telling you more about what the system was actually doing when the panic occurred ... basically how big and bad the trail of debris in the filesystem is likely to be. This is where the "not syncing" part comes from, and when you see that, it's good. (panic() does try to issue a sinc() system-call to push all buffered data out to the hard-disks before it goes down.)

The second part of the message is what was provided by the original call to panic(). For example, we find panic("Tried to kill init!") in kernel/exit.c.

So, what does this actually mean? Well, in this case it really doesn't mean that someone tried to kill the magical init process (process #1...), but simply that it tried to die. This process is not allowed to die or to be killed.

When you see this message, it's almost always at boot-time, and the real messages ... the cause of the actual failure ... will be found in the startup messages immediately preceding this one. This is often the case with kernel-panics. init encountered something "really bad," and it didn't know what to do, so it died, so the kernel died too.

BTW, the kernel-panic code is rather cute. It can blink lights and beep the system-speaker in Morse code. It can reboot the system automagically. Obviously the people who wrote this stuff encountered it a lot... :)

In diagnosing, or at least understanding, kernel-panics, I find it extremely helpful to have on-hand a copy of the Linux source-code, which is usually stored someplace like /usr/src/linux-2.x. You can use the grep utility to locate the actual code which caused the panic to occur.


matthewg42 11-30-2006 11:52 AM

This is a fairly un-educated guess on my part, but for what it's worth... looks like your IDE controller is freaking out, or the drive is corrupted. Could be that screw under the board shorted something out.

exvor 11-30-2006 01:05 PM

Yea probably shortted out the io controller.

Yull29m 01-07-2007 10:36 PM

I am having the same problem as sundialsvcs and John Sharp. If in fact it did short something, how would I figure that out or remedy it? At the lowest cost possible pls? I am not very well to do money wise. I make under 17,000 a year, and have a family to support as well as tons of bills. Free stuff rox, I love linux :p

rocketman8541 03-26-2007 08:10 PM

Cheers for that explanation sundial

mr805newbie 04-22-2007 02:02 AM

Quote:

Originally Posted by matthewg42
This is a fairly un-educated guess on my part, but for what it's worth... looks like your IDE controller is freaking out, or the drive is corrupted. Could be that screw under the board shorted something out.


What if my machine boots fine in Windows XP? The Mandriva 2007 partition is the only boot that gives this problem....:rolleyes:

lordofthechia 05-09-2007 11:23 AM

Quote:

Originally Posted by mr805newbie
What if my machine boots fine in Windows XP? The Mandriva 2007 partition is the only boot that gives this problem....:rolleyes:

I just experienced this same issue w/ a machine I was working on. The problem stemmed from the HDD being reconnected to the motherboard on a different IDE channel than it was originally set up on. So the bootloader was indicating that root should be at hda1 but in fact it was at hdc1.

Moving the HDD to the correct IDE channel (channel 1) fixed it.

mr805newbie 05-12-2007 02:57 AM

I have a motherboard that only has 1 IDE connector. I thought it was strange but I have the HDD and the CDROm both on the same IDE. I play around with the jumpers on the hard drive and see what happens.

doronb2 06-13-2007 07:52 AM

i get the kernel panic: attempted to kiil init" messege when i boot from cd (i want to install kubuntu.. i haven't linux yet).

What can I do?? :confused:

kashifkamyana 07-31-2007 01:06 AM

on Redhat Linux AS 4 this message appear

hdd: no disk in drive
/bin/sh: no such file or direcotry

kernel panic not syncing attempting to kill init

Please guide

mr805newbie 08-04-2007 12:45 AM

Quote:

Originally Posted by lordofthechia
I just experienced this same issue w/ a machine I was working on. The problem stemmed from the HDD being reconnected to the motherboard on a different IDE channel than it was originally set up on. So the bootloader was indicating that root should be at hda1 but in fact it was at hdc1.

Moving the HDD to the correct IDE channel (channel 1) fixed it.


My motherboard only has 1 IDE channel. I added a PCI /IDE card and I'm still freezing at the Kernel Panic! prompt. How can I edit where Mandriva looks for boot files?

mr805newbie 08-04-2007 12:49 AM

Quote:

Originally Posted by exvor
Yea probably shortted out the io controller.

If the I/O controller was shorted then Windows XP would not boot neither. This seems to be isolated to Mandriva. Some system boot file is looking in the wrong places for the appropriate environment variables and paths.

exvor 08-06-2007 04:22 PM

Yeah I realized that later in this conversation. This error occurs for several diffrent reasons tho so its hard to pin down what exactly is causing it.


As for your error you should look at what messages you get before you get this one and see if you can figure out what is going on. From a guess I would say that the driver to load your pci controller is not being loaded before the system attempts to read the harddrive.

but thats only a guess.

mr805newbie 08-11-2007 03:14 AM

Well, I give up. I'm removing LILO and keeping Windows XP
 
I'm just going to keep Windows XP on there. I'm taking LILO out of there.

FYI: The motherboard I purchased is:

ECS ELITEGROUP
HT2000 GeForce 6100
GeFORCE6100SM-M
Frys Item# 5132906.

Works great with Windows, sucks with Mandriva.:scratch: :scratch: :scratch:

Thanks for everyone's feedback!

Ungdomspastorn 10-05-2007 06:11 PM

I have the same problem. Had winXP installed, and it died. Not able to reinstall, I thougt i might try Isolinux 3.11 Ubuntu (Debian dated march 03 2007, H. Peter Anvin) and when I try to boot from the CD I get the
Kernel panic - not syncing: Attemted to kill init!
message

not able to make screenshot, but i wrote down what the screen said..

82.484224 Call Trace:
82.484290 <c0188207> d_alloc+0x107/0x190
82.484364 <c017ee8d> __lookup_hach+0xbd/0x100
82.484450 <c017f399> lookup_one_len_nd+0x89/0x90
82.484534 <c01b8106> create_dir+0x46/0x1e0
82.484616 <c01b89dc> sysfs_create_dir+0x2c/0x70
82.484698 <c01ed94a> kobject_add+0x8a/0x1a0
... <c01edb7f> subsystem_register+0xf/0x30
... <c03ea621> param_sysfs_init+0x11/0x1e0
... <c01b7924> sysfs_add_file+0x
mca_init
c0100511 init+0x111/0x300
ret_from_fork
c0100400 init+0x0/0x330 (this line appears twice)
c01044c7 kernel_thread_helper+0x7/0x10
========================
code: 83 ed 04 8b 45 04 0f 18 00 90 8d 45 04 39 d8 0f 84 bc 00 00
00 f6 45 18 2c 74 e2 89 e8 e8 4b ea ff ff 89 c6 8b 44 24 10 8b 78 24 <ac> ae 75
00 84 c0 75 f8 31 c0 eb 04 19 c0 0c 01 85 c0 75 be 8b
EIP: <c01b83de> sysfs_lookup+0x5e/0x200 SS:ESP 0068:df905e94
<0>Kernel Panic - not syncing: Attempted to kill init!

I believe this may be caused by a logical or physical disk error.. or a problem with the motherboard or BIOS..
The computer shuts down after aprox 1 minute, so it took me about 10 restarts to write the above.. That's allso why some lines are a bit short... besides the 82.nnnnnn numbers changed, propably because I tried to use different languages to see if it helped. The rest of the lines remained the same, so I guess that part of the lines ar not of interrest..

mr805newbie 10-09-2007 01:28 PM

Quote:

The computer shuts down after aprox 1 minute, so it took me about 10 restarts to write the above
LOL, It's great dealing with dedicated computer users.


So I guess the final note is "some boards don't work with Linux"....that sucks.

Vegetaman 10-09-2007 01:34 PM

I have a similar problem to Ungdomspastorn with my XP installation dying and being unable to install anything else and not get a kernel panic... Perhaps I need to swap the location on the IDE cable or change some of my boot settings? I tried Ubuntu 7.04, and that's where my Kernel Panic hit.

mr805newbie 10-09-2007 02:07 PM

Quote:

Originally Posted by Vegetaman (Post 2918655)
I have a similar problem to Ungdomspastorn with my XP installation dying and being unable to install anything else and not get a kernel panic... Perhaps I need to swap the location on the IDE cable or change some of my boot settings? I tried Ubuntu 7.04, and that's where my Kernel Panic hit.

These boards only have 1 IDE slot on the motherboard. It was not an option.

exvor 10-09-2007 05:43 PM

Its possible that they just did not compile the proper drivers for the IDE controller into the live disk. Tho I was sure there was a generic one maybe it doesn't work for this particular controller or something. This is just a guess tho.

Vegetaman 10-09-2007 06:51 PM

I have an ASUS A7N8X motherboard, an AMD Athlon XP 3000+ processor, an nVidia GeForce FX 5500 Graphics Card, 2x512 dual channel Corsair RAM, and a Western Digital Caviar SE 7200 160GB. From what I can tell, it SHOULD work with Linux.

saikee 10-09-2007 07:19 PM

I don't think twice installing a Linux to any computer.

I would say for a desktop, where most hardware are standardised, about 2 to 3 distros in a 100 may panic when being booted. This is based on self assembled PC. Proprietary systems are like laptops with many components cut back.

On laptops where a lot of hardware are non-standard, as a way to reduce cost, there are more kernel panics.

nadarockyraccoon 04-15-2008 03:22 PM

Check your memory
 
any time I have run into kernel panic or just glitchy behavior in past it has been my memory. I just purchased a mother board with one ide cable and spent a good bit of time trying unsuccessfully many times to load linux, receiving kernel panics and man other errors as well. It all came down to the memory, after pulling a bad stick of memory off the mother board everything is functioning smoothly.

On a previous computer with two ide ports I received kernel panics, inability to install linux, as well as many other interesting errors, and once again, pulling a bad stick of memory brought perfect functionality.

Kernel panic likely means bad memory.
check your memory.

mr805newbie 04-22-2008 12:48 AM

Quote:

Originally Posted by nadarockyraccoon (Post 3122258)
any time I have run into kernel panic or just glitchy behavior in past it has been my memory. I just purchased a mother board with one ide cable and spent a good bit of time trying unsuccessfully many times to load linux, receiving kernel panics and man other errors as well. It all came down to the memory, after pulling a bad stick of memory off the mother board everything is functioning smoothly.

On a previous computer with two ide ports I received kernel panics, inability to install linux, as well as many other interesting errors, and once again, pulling a bad stick of memory brought perfect functionality.

Kernel panic likely means bad memory.
check your memory.

If this is the case then "why does Windows XP boot flawlessly"?????

matthewg42 04-22-2008 02:45 AM

Quote:

Originally Posted by mr805newbie (Post 3128719)
If this is the case then "why does Windows XP boot flawlessly"?????

Bold. Italic. Large font. Five question marks. I sense exasperation.

Well, XP might simply not use the bad bit of memory during boot, or when it does, the results might be scrambled but not needed to complete the boot sequence. Simple as that.

Linux aggressively allocates ram for IO buffers, and will typically "use" memory faster (although it can be quickly re-used for proper processes if necessary). This might be one explanation for more of your memory being used under Linux, and thus the system being more susceptible to memory faults.

The good thing is that you don't have to guess. Most Linux distros come with a memory checker for saving your sanity in cases such as this.

When you boot to Linux, you will probably see a boot menu, and one of the options will probably be to run a memory checker (usually called memcheck86 or something like that). Select this at the boot screen and let it run for a while. Let it go several passes through the full memory space.

If you don't find a memory fault this way, then at least you can more or less rule it out as the cause.

stefanolima 08-23-2008 10:41 AM

Quote:

Originally Posted by John Sharp (Post 2524693)
I have this very message on my red hat Fedora system while trying to boot after installing a new cpu fan and necessarily disconnecting and reconnecting the several components to the board, which had to come out due to mounting screws UNDER the board. I have reset the date and time and I suspect some other item(s) need to be set correctly so boot can continue, but I don't knkow which ones. Can anyone instruct me? Here is the last page of messages seen while booting, and I don't know how to retrieve any that scrolled by before these came:

…………..other stuff I can’t see off the screen)

Buffer I/O error on device hdb, logical block 2
Buffer I/O error on device hdb, logical block 3
Buffer I/O error on device hdb, logical block 4
Buffer I/O error on device hdb, logical block 5
Buffer I/O error on device hdb, logical block 6
Buffer I/O error on device hdb, logical block 7
Buffer I/O error on device hdb, logical block 8
Buffer I/O error on device hdb, logical block 9
/dev/hdb: read failed after 0 of 2048 at 0: Input/output error
/dev/hdb: read failed after 0 of 2048 at 528023552: Input/output error
/dev/hdb: read failed after 0 of 2048 at 0: Input/output error
No volume groups found
/dev/hdb: read failed after 0 of 2048 at 0: Input/output error
/dev/hdb: read failed after 0 of 2048 at 0: Input/output error
/dev/hdb: read failed after 0 of 2048 at 528023552: Input/output error
/dev/hdb: read failed after 0 of 2048 at 0: Input/output error
Unable to find volume group “VolGroup00”
Unable to access resume device (/dev/VolGroup00/LogVol01)
Mount: error No such device or address mounting /dev/root on /sysroot as ext3
Setuproot: moving /dev failed: No such file or directory
Setuproot: error mounting /proc: No such file or directory
Setuproot: error mounting /sys: No such file or directory
Switchroot: mount failed: No such file or directory
Kernel panic – not syncing: Attempted to kill init!

(and that’s all she wrote -- it freezes at that point)

I have the same problem, the difference is only that the missing directory/file is /sbin/init and the logical blocks concerned where of different order xxxxx....

I'm getting this error after cloning a hard drive locally (source:hda, destination:hdc), now when I move my hdc drive to another machine (exactly same model, the only difference is that the original one has 2 network cards and the other has 1 network card). I've gone through this thread and found many inputs, and I tried some, e.g. changing the IDE channel from hda to hdc and vice versa, but the error message keeps on tracking the channel (I/O error on hdc or hda).

Any input is appreciated.

P.S.
Tried experimenting with that ghosting software (g4l) on other machines by cloning via ftp server, and I didn't encounter such a problem (send image file of hda to ftp server, then restore that image file to other hda on other machine)
-when two machines were identical-everything OK
-when two machines were not identical (from dell to hp, IDE to SATA, MS Windows), I only had to repair my installation [actually, I want to do the same thing on my linux with this problem, but don't know the procedure to follow]
-Don't ask me why I also didn't send the image file of this machine to ftp server. Just help me to sort out that local 'click'n clone':-)

yago_potato 11-17-2008 10:11 PM

ubuntu UE 2.0
 
i kept getting a error " 15.855775 Kernel panic - not symcing: Attempted to kill init! " after i put a different video card "geforce mx 4000" into a pci slot and changing the "biso" onboard "intel gmx 850 or something like that"
to read the pci video! but if i take the card out it go back and runs just fine! and the card is good i have tryed it on xp and it still works!

Darth Cupcake 12-16-2008 10:07 PM

I recently tried to upgrade my kernel on Debian from 2.6.18 to 2.6.24. I used the linux-source package from the stable repository. After I tried to boot into the new kernel, I got the "Kernel panic - not syncing: attempted to kill init!" message. The line just before it says "/sbin/init: 432: cannot open /dev/console: No such file." I figure this is what's causing the kernel panic. Does anybody have any idea?

Thanks,

Brandon

hkronald 03-25-2009 01:55 PM

HI, this is what I encountered when booting the Kernel built by Openembedded for AT91SAM9G20EK using the ulf branch......

VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 128K
INIT: version 2.86 booting
Starting udevKernel panic - not syncing: Attempted to kill init!

Anyone, have some thoughts on this?

nadarockyraccoon 03-26-2009 03:20 AM

Kernel Panic!
 
run a memory check, this is available on most every Linux distribution, whether it be from the install cd or the boot menu. If this shows errors check each stick of memory you have to find the faulty one and replace it or pull it. This should fix things up for you. The only other thing it really could be is the hard drive. Usually a mother board or processor going bad leads much bigger problems. Aside from that all I can say is try a different distro, not windows though. Running windows will very rarely tell you what is wrong with your computer and often mis lead you to thinking nothing is wrong, so it must be linux. This is wrong, it is not linux, it is your computer.

itsmelife 12-24-2009 02:12 AM

Kernel Panic
 
Quote:

Originally Posted by mr805newbie (Post 2847532)
If the I/O controller was shorted then Windows XP would not boot neither. This seems to be isolated to Mandriva. Some system boot file is looking in the wrong places for the appropriate environment variables and paths.

I have exactly the same issue.
My Win XP PC would not boot and I need to retrieve data from it, so one of my friends suggested to use Ubuntu (9.04) to boot the Xp machine (e-machine t4010) with one slot of 512 RAM and access the data. But I am running into the "Kernel Panic" issue.

I also ran a memory test (20 min) and got
Pass =1
Errors = > 800000
ECC Errrs =0

What does this tell me? Is the issue in the RAM
How do pinpoint the issue (RAM, HD or Mother Board)?

Pl help.

exvor 12-24-2009 06:05 AM

This thread is old like 2 years old now going on 3. Rezzing the dead can result in many unforseen problems such as brain eating, the need to bite ohters, parts of your body parts falling off, and the need for others on the forum to ignore this post.

Anyway in regards to this issue it normally happens when the kernel is unable to load the root file system. This can be caused many different things such as no drivers built into the kernel for the local storage drive.

itsmelife 12-24-2009 01:06 PM

Quote:

Originally Posted by exvor (Post 3803428)
Anyway in regards to this issue it normally happens when the kernel is unable to load the root file system. This can be caused many different things such as no drivers built into the kernel for the local storage drive.

Thx. But how do I go about fixing this?

intermentals 01-21-2010 04:10 PM

I got
"udevadm settle - timeout of 180 seconds reached, the event queue contains: /sys/devices/pci0000:00/0000:000f.1/host0/target0:0:0/0:0:0:0/block/sr0 (933 [ 181,434278] Kernel panic - not syncing: Attempted to kill init!" any ideas what's wrong please?

rcastanet 04-24-2010 08:53 AM

A great explanation...
 
...so what's the fix?

pixellany 04-24-2010 08:58 AM

rcastanet;

Please start a new thread with a complete question. This thread is very old, and I doubt if your specific issue is going to really fit in.


All times are GMT -5. The time now is 05:28 AM.