资源描述:
《Kernel panic常见原因》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、kernelpanic错误表现kernelpanic 主要有以下几个出错提示:Kernelpanic-notsyncingfatalexceptionininterruptkernelpanic-notsyncing:Attemptedtokilltheidletask!kernelpanic-notsyncing:killinginterrupthandler!KernelPanic-notsyncing:Attemptedtokillinit!kernel错误分析查看了一下 linux的源码文件,找到相
2、关位置kernel/panic.cNORET_TYPEvoidpanic(constchar*fmt,...){staticcharbuf[1024];va_listargs;bust_spinlocks(1);va_start(args,fmt);vsnprintf(buf,sizeof(buf),fmt,args);va_end(args);printk(KERN_EMERG"Kernelpanic-notsyncing:%s/n",buf);bust_spinlocks(0);kernel/exit.
3、cif(unlikely(in_interrupt()))panic("Aiee,killinginterrupthandler!");#中断处理if(unlikely(!tsk->pid))panic("Attemptedtokilltheidletask!");#空任务if(unlikely(tsk->pid==1))panic("Attemptedtokillinit!");#初始化从其他源文件和相关文档看到应该有几种原因:1、硬件问题使用了 SCSI-device 并且使用了未知命令#WDIOS_T
4、EMPPANICKernelpanicontemperaturetrip# #TheSETOPTIONScallcanbeusedtoenableanddisablethecard#andtoaskthedrivertocallpanicifthesystemoverheats.# #IfoneusesaSCSI-deviceofunsupportedtype/commands,one#immediatelyrunsintoakernel-paniccausedbyCommandError.Tobetter
5、#understandwhichSCSI-commandcausedtheproblem,Iextendedthis#specificpanic-messageslightly.# #read/writecausesacommanderrorfrom#thesubsystemandthiscauseskernel-panic2、系统过热如果系统过热会调用panci,系统挂起#WDIOS_TEMPPANICKernelpanicontemperaturetrip# #TheSETOPTIONScallcanb
6、eusedtoenableanddisablethecard#andtoaskthedrivertocallpanicifthesystemoverheats.3、文件系统引起#Avarietyofpanicsandhangswith/tmponareiserfsfilesystem#Anyotherpanic,hang,orstrangebehavior##Itturnsoutthatthere'salimitofsixenvironmentvariablesonthe#kernelcommandline
7、.Whenthatlimitisreachedorexceeded,argument#processingstops,whichmeansthatthe'root='argumentthatUML#usuallyaddsisnotseen.So,thefilesystemhasnoideawhatthe#rootdeviceis,soitpanics.#Thefixistoputlessstuffonthecommandline.Glommingallyour#setupvariablesintooneis
8、probablythebestwaytogo.Linux内核命令行有6个环境变量。如果即将达到或者已经超过了的话 root= 参数会没有传进去启动时会引发panics错误。vigrub.conf#####################titleRedHatEnterpriseLinuxAS(2.6.9-67.0.15.ELsmp)root(hd0,0)kernel/boot/vmlinuz-2.6.9-67.0