Kernel panic - not syncing: Attempted to kill init!
史星星(研六 福州)
shixingxing at ruijie.com.cn
Wed Jul 13 00:16:14 EDT 2011
boot option:
root=/dev/mtdblock1 rootfstype=ext3 rw console=ttyS0,115200 mtdparts=phys_mapped_flash:1024k(bootloader)ro,256k(product_info),256k(system_para),128k(exception_info),128k(bootloader_env),-(reserve);gen_nand.0:128M(root),-(usr)
boot logs:
Using octmgmt0 device
TFTP from server 10.10.10.5; our IP address is 10.10.10.7
Filename 'vmlinux.64'.
Load address: 0x20000000
Loading: T #################################
done
Bytes transferred = 4720693 (480835 hex), 413 Kbytes/sec
argv[2]: root=/dev/mtdblock1
argv[3]: rootfstype=ext3
argv[4]: rw
argv[5]: console=ttyS0,115200
argv[6]: mtdparts=phys_mapped_flash:1024k(bootloader)ro,256k(product_info),256k(system_para),128k(exception_info),128k(bootloader_env),-(reserve);gen_nand.0:128M(root),-(usr)
ELF file is 64 bit
Allocating memory for ELF segment: addr: 0xffffffff81100000 (adjusted to: 0x1100000), size 0x3bdd80
Allocated memory for ELF segment: addr: 0xffffffff81100000, size 0x3bdd80
Processing PHDR 0
Loading 390a80 bytes at ffffffff81100000
Clearing 2d300 bytes at ffffffff81490a80
## Loading Linux kernel with entry point: 0xffffffff81105e90 ...
Bootloader: Done loading app on coremask: 0x1
Linux version 2.6.32.13-dirty (root at ubuntu) (gcc version 4.3.3 (Cavium Networks Version: 2_0_0 build 95) ) #5 SMP PREEMPT Tue Jul 12 08:57:24 CST 2011
CVMSEG size: 2 cache lines (256 bytes)
bootconsole [early0] enabled
CPU revision is: 000d0409 (Cavium Octeon)
Checking for the multiply/shift bug... no.
Checking for the daddiu bug... no.
Determined physical RAM map:
memory: 000000000002c000 @ 0000000001465000 (usable)
memory: 0000000006c00000 @ 0000000001500000 (usable)
memory: 0000000007c00000 @ 0000000008200000 (usable)
memory: 0000000011800000 @ 0000000020000000 (usable)
Wasting 292376 bytes for tracking 5221 unused pages
Zone PFN ranges:
Normal 0x00001465 -> 0x00031800
Movable zone start PFN for each node
early_node_map[4] active PFN ranges
0: 0x00001465 -> 0x00001491
0: 0x00001500 -> 0x00008100
0: 0x00008200 -> 0x0000fe00
0: 0x00020000 -> 0x00031800
PERCPU: Embedded 10 pages/cpu @a800000001f91000 s10880 r8192 d21888 u65536
pcpu-alloc: s10880 r8192 d21888 u65536 alloc=16*4096
pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 128415
Kernel command line: bootoctlinux 0x20000000 root=/dev/mtdblock1 rootfstype=ext3 rw console=ttyS0,115200 mtdparts=phys_mapped_flash:1024k(bootloader)ro,256k(product_info),256k(system_para),128k(exception_info),128k(bootloader_env),-(reserve);gen_nand.0:128M(root),-(usr)
PID hash table entries: 2048 (order: 2, 16384 bytes)
Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
Primary instruction cache 32kB, virtually tagged, 4 way, 64 sets, linesize 128 bytes.
Primary data cache 16kB, 64-way, 2 sets, linesize 128 bytes.
Memory: 512256k/524464k available (2615k kernel code, 11800k reserved, 856k data, 176k init, 0k highmem)
Hierarchical RCU implementation.
NR_IRQS:152
console [ttyS0] enabled, bootconsole disabled
console [ttyS0] enabled, bootconsole disabled
Calibrating delay using timer specific routine.. 1501.67 BogoMIPS (lpj=3003356)
Security Framework initialized
Mount-cache hash table entries: 256
Checking for the daddi bug... no.
Brought up 1 CPUs
NET: Registered protocol family 16
nand_init(): registering device resources
bio: create slab <bio-0> at 0
Switching to clocksource OCTEON_CVMCOUNT
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 3, 32768 bytes)
TCP established hash table entries: 16384 (order: 6, 262144 bytes)
TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
msgmni has been set to 1001
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1180000000800 (irq = 58) is a OCTEON
loop: module loaded
nand id: 0xaddc
NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V 8-bit)
Scanning device for bad blocks
2 cmdlinepart partitions found on MTD device gen_nand.0
nr_parts:2
Creating 2 MTD partitions on "gen_nand.0":
0x000000000000-0x000008000000 : "root"
0x000008000000-0x000020000000 : "usr"
TCP cubic registered
NET: Registered protocol family 17
Bootbus flash: Setting flash for 2MB flash at 0x1fa00000
phys_mapped_flash: Found 1 x16 devices at 0x0 in 8-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
6 cmdlinepart partitions found on MTD device phys_mapped_flash
Creating 6 MTD partitions on "phys_mapped_flash":
0x000000000000-0x000000100000 : "bootloader"
0x000000100000-0x000000140000 : "product_info"
0x000000140000-0x000000180000 : "system_para"
0x000000180000-0x0000001a0000 : "exception_info"
0x0000001a0000-0x0000001c0000 : "bootloader_env"
0x0000001c0000-0x000000200000 : "reserve"
EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
kjournald starting. Commit interval 5 seconds
EXT3 FS on mtdblock1, internal journal
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) on device 31:1.
Freeing unused kernel memory: 176k freed
> Hi,
>
> I got a problem when trying to boot linux 2.6.32.13 on my Octeon
> CN5650 board.
>
> Booting logs below:
>
> ...omit….
>
> EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
>
> kjournald starting. Commit interval 5 seconds
>
> EXT3 FS on mtdblock1, internal journal
>
> EXT3-fs: recovery complete.
>
> EXT3-fs: mounted filesystem with ordered data mode.
>
> VFS: Mounted root (ext3 filesystem) on device 31:1.
>
> Freeing unused kernel memory: 176k freed
>
> Kernel panic - not syncing: Attempted to kill init! ß kernel panic here
>
>
>
> What I do:
>
> 1、The busybox init is OK in another version kernel .I replace init with
> “Hello world” prog or dead loop prog, kernel panic still.
>
> 2、
>
> run_init_process(“/sbin/init”) à kernel_execve à sys_execve
>
> so I add some debug msgs in sys_execve.
>
>
>
> asmlinkage int sys_execve(nabi_no_regargs struct pt_regs regs)
>
> {
>
> int error;
>
> char * filename;
>
>
>
> printk("enter sys_execve\n");
>
> filename = getname((char __user *) (long)regs.regs[4]);
>
> error = PTR_ERR(filename);
>
> if (IS_ERR(filename))
>
> goto out;
>
> error = do_execve(filename, (char __user *__user *)
> (long)regs.regs[5],
>
> (char __user *__user *) (long)regs.regs[6],
> ®s);
>
> putname(filename);
>
> printk("out sys_execve\n");
>
> out:
>
> return error;
>
> }
>
>
>
> Boot logs:
>
> VFS: Mounted root (ext3 filesystem) on device 31:1.
>
> Freeing unused kernel memory: 176k freed
>
> enter sys_execve
>
> out sys_execve
>
> Kernel panic - not syncing: Attempted to kill init! ß kernel panic here
>
>
>
> My question:
>
> 1.the kernel panic happened when return to userspace prog?
>
> 2.how to solve this problem?
>
>
>
> Thank you!
>
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
Hi!
What about "init=" boot option?... and CONFIG_CMDLINE as well?
More information about the Kernelnewbies
mailing list