存档

文章标签 ‘kernel’

how to resove — kernel: mptbase: ioc0: LogInfo

2008年10月31日 评论已被关闭

cat /var/log/messages
 i meet such logs:
 kernel: mptbase: ioc0: LogInfo(0x31120401): Originator={PL}, Code={Abort}, SubCode(0x0401)
 
#modinfo mptbase
filename:       /lib/modules/2.6.18-53.1.13.el5/kernel/drivers/message/fusion/mptbase.ko
version:        3.04.04
license:        GPL
description:    Fusion MPT base driver
author:         LSI Logic Corporation
srcversion:     DEE575D01207DC868D4D69B
depends:       
vermagic:       2.6.18-53.1.13.el5 SMP mod_unload gcc-4.1
parm:           mpt_msi_enable: MSI Support Enable (default=0) (int)
parm:           mpt_channel_mapping: Mapping id’s to channels (default=0) (int)

#lsmod
Module                  Size  Used by
ipv6                  411425  16
dm_mirror              60105  0
dm_mod                 96017  1 dm_mirror
video                  51273  0
sbs                    49921  0
backlight              39873  0
i2c_ec                 38593  1 sbs
button                 40545  0
battery                43849  0
asus_acpi              50917  0
acpi_memhotplug        40133  0
ac                     38729  0
parport_pc             62313  0
lp                     47121  0
parport                73165  2 parport_pc,lp
sg                     69865  0
shpchp                 70765  0
ata_piix               49861  0
i2c_i801               41429  0
tg3                   141381  0
i2c_core               56129  2 i2c_ec,i2c_i801
libata                160977  1 ata_piix
pcspkr                 36289  0
mptsas                 62545  6
mptscsih               56513  1 mptsas
mptbase                92640  2 mptsas,mptscsih
scsi_transport_sas     66753  1 mptsas
sd_mod                 56257  7
scsi_mod              186361  6 sg,libata,mptsas,mptscsih,scsi_transport_sas,sd_mod
ext3                  166993  5
jbd                    93873  1 ext3
ehci_hcd               65229  0
ohci_hcd               54493  0
uhci_hcd               57433  0

cat /proc/mdstat
Personalities :
unused devices: <none>

google and google, no answer!
~ who can help me ? ~ 

分类: OpenSource 标签:

kernel panic – not syncing: 的思考

2008年7月5日 2 条评论

kernel panic 出错会在屏幕上显示,看了下message文件、并没有相关记录。

kernel panic 主要有以下几个出错提示:

kernel panic – not syncing: Attempted to kill the idle task!
kernel panic – not syncing: killing interrupt handler!
Kernel Panic – not syncing:Attempted to kill init !

查看了一下 linux的源码文件,找到相关位置

kernel/panic.c

NORET_TYPE void panic(const char * fmt, …)
{
    static char buf[1024];
    va_list args;

    bust_spinlocks(1);
    va_start(args, fmt);
    vsnprintf(buf, sizeof(buf), fmt, args);
    va_end(args);
    printk(KERN_EMERG “Kernel panic – not syncing: %s\n”,buf);
    bust_spinlocks(0);
    
   
kernel/exit.c

    if (unlikely(in_interrupt()))
        panic(“Aiee, killing interrupt handler!”);     #中断处理
    if (unlikely(!tsk->pid))
        panic(“Attempted to kill the idle task!”);     #空任务
    if (unlikely(tsk->pid == 1))
        panic(“Attempted to kill init!”);              #初始化
       

       
从其他源文件和相关文档看到应该有几种原因:

1、硬件问题

使用了 SCSI-device 并且使用了未知命令

#WDIOS_TEMPPANIC        Kernel panic on temperature trip
#   
#        The SETOPTIONS call can be used to enable and disable the card
#    and to ask the driver to call panic if the system overheats.
#   
#    If one uses a SCSI-device of unsupported type/commands, one
#      immediately runs into a kernel-panic caused by Command Error. To better
#      understand which SCSI-command caused the problem, I extended this
#      specific panic-message slightly.
#     
#read/write causes a command error from
#      the subsystem and this causes kernel-panic

2、系统过热
如果系统过热会调用panci,系统挂起

#WDIOS_TEMPPANIC        Kernel panic on temperature trip
#   
#        The SETOPTIONS call can be used to enable and disable the card
#      and to ask the driver to call panic if the system overheats.

3、文件系统引起

#A variety of panics and hangs with /tmp on a reiserfs  filesystem
#Any other panic, hang, or strange behavior
#
#  It turns out that there’s a limit of six environment variables on the
#  kernel command line.  When that limit is reached or exceeded, argument
#  processing stops, which means that the ‘root=’ argument that UML
#  usually adds is not seen.  So, the filesystem has no idea what the
#  root device is, so it panics.
#  The fix is to put less stuff on the command line.  Glomming all your
#  setup variables into one is probably the best way to go.

Linux内核命令行有6个环境变量。如果即将达到或者已经超过了的话 root= 参数会没有传进去
启动时会引发panics错误。

vi grub.conf
#####################
title Red Hat Enterprise Linux AS (2.6.9-67.0.15.ELsmp)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.9-67.0.15.ELsmp ro root=LABEL=/
        initrd /boot/initrd-2.6.9-67.0.15.ELsmp.img
title Red Hat Enterprise Linux AS-up (2.6.9-67.EL)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.9-67.EL ro root=LABEL=/
        initrd /boot/initrd-2.6.9-67.EL.img

应该是 其中的 root=LABEL=/   没有起作用。

4、内核更新
网上相关文档多半是因为升级内核引起的,建议使用官方标准版、稳定版

另外还有使用磁盘的lvm 逻辑卷,添加CPU和内存。可在BIOS中禁掉声卡驱动等不必要的设备。

也有报是ext3文件系统的问题。
解决: 手工编译内核,把 ext3相关的模块都编译进去,
 

5、处理panic后的系统自动重启

panic.c源文件有个方法,当panic挂起后,指定超时时间,可以重新启动机器

if (panic_timeout > 0)
    {
        int i;
        /*
          * Delay timeout seconds before rebooting the machine.
         * We can’t use the “normal” timers since we just panicked..
          */
        printk(KERN_EMERG “Rebooting in %d seconds..”,panic_timeout);
        for (i = 0; i < panic_timeout; i++) {
            touch_nmi_watchdog();
            mdelay(1000);
        }
       
修改方法:
/etc/sysctl.conf文件中加入
kernel.panic = 30    #panic错误中自动重启,等待时间为30秒
kernel.sysrq=1       #激活Magic SysRq!  否则,键盘鼠标没有响应  

分类: OpenSource 标签: ,