Kernel panic - not syncing: Attempted to kill init!

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Kernel panic - not syncing: Attempted to kill init!

Jump to solution
3,404 Views
liuxing
Contributor II

Hi all,

  I meet a weird issue when porting linux 4.14.78. When the kernel try to start the init process,the kernel will enter a panic state. 

The CPU is imx28,and the cross compiler version is Linaro GCC 7.3-2018.05.

The root file system is busybox-1.29.3.

[ 3.661032] This architecture does not have kernel memory protection.
[ 3.721936] init (1): undefined instruction: pc=0007169e
[ 3.727687] CPU: 0 PID: 1 Comm: init Not tainted 4.14.78-05578-g66620c3-dirty #7
[ 3.735402] Hardware name: Freescale MXS (Device Tree)
[ 3.740717] task: c7480000 task.stack: c7488000
[ 3.745528] PC is at 0x7169e
[ 3.748488] LR is at 0x225b7
[ 3.751434] pc : [<0007169e>] lr : [<000225b7>] psr: 40000030
[ 3.758039] sp : bea4ef0c ip : 00000000 fp : 00000000
[ 3.763629] r10: 00000000 r9 : 00000000 r8 : 00000000
[ 3.769023] r7 : 00000000 r6 : 00000000 r5 : 00000000 r4 : 00000000
[ 3.775886] r3 : 00000000 r2 : bea4ef14 r1 : 00000001 r0 : 00000000
[ 3.782581] Flags: nZcv IRQs on FIQs on Mode USER_32 ISA Thumb Segment user
[ 3.790256] Control: 0005317f Table: 46cdc000 DAC: 00000055
[ 3.796352] Code: 7803 4606 b913 2001 (e8bd) 83f8
[ 3.807013] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
[ 3.807013]
[ 3.816246] CPU: 0 PID: 1 Comm: init Not tainted 4.14.78-05578-g66620c3-dirty #7
[ 3.823695] Hardware name: Freescale MXS (Device Tree)
[ 3.828955] [<c00102d4>] (unwind_backtrace) from [<c000e0e4>] (show_stack+0x10/0x14)
[ 3.836806] [<c000e0e4>] (show_stack) from [<c0019b68>] (panic+0xbc/0x23c)
[ 3.843768] [<c0019b68>] (panic) from [<c001c490>] (do_exit+0xa1c/0xa68)
[ 3.850546] [<c001c490>] (do_exit) from [<c001d6c4>] (do_group_exit+0x38/0xbc)
[ 3.857866] [<c001d6c4>] (do_group_exit) from [<c0028690>] (get_signal+0x20c/0x818)
[ 3.865610] [<c0028690>] (get_signal) from [<c000d3a4>] (do_signal+0xc4/0x448)
[ 3.872913] [<c000d3a4>] (do_signal) from [<c000d900>] (do_work_pending+0xc8/0xe8)
[ 3.880564] [<c000d900>] (do_work_pending) from [<c000a7b4>] (slow_work_pending+0xc/0x20)
[ 3.888852] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004

the busybox binary objdump:

7195c: 23004a94 movwcs r4, #2708 ; 0xa94
71960: 41f0e92d mvnsmi lr, sp, lsr #18
71964: 9308b08c movwls fp, #32908 ; 0x808c
71968: e9cd460e stmib sp, {r1, r2, r3, r9, sl, lr}^
7196c: 930b2309 movwls r2, #45833 ; 0xb309
71970: fcdcf003 ldc2l 0, cr15, [ip], {3}
71974: 46042307 strmi r2, [r4], -r7, lsl #6
71978: f7a06003 ; <UNDEFINED> instruction: 0xf7a06003
7197c: b118fd11 tstlt r8, r1, lsl sp ; <UNPREDICTABLE>
71980: f0436823 ; <UNDEFINED> instruction: 0xf0436823

Is there anyone can give some advices for it?

Thanks very much!

Labels (1)
0 Kudos
1 Solution
2,484 Views
igorpadykov
NXP Employee
NXP Employee

Hi xing

ususally kernel panic is caused by memory errors so one can recheck it

with memory test

Board Bring-up and DDR Initialization Tools 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
2,485 Views
igorpadykov
NXP Employee
NXP Employee

Hi xing

ususally kernel panic is caused by memory errors so one can recheck it

with memory test

Board Bring-up and DDR Initialization Tools 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
2,484 Views
liuxing
Contributor II

sorry,the busybox binary objdump

71688: 43f8e92d mvnsmi lr, #737280 ; 0xb4000
7168c: 460c4607 strmi r4, [ip], -r7, lsl #12
71690: f0034615 ; <UNDEFINED> instruction: 0xf0034615
71694: 7803ffd1 stmdavc r3, {r0, r4, r6, r7, r8, r9, sl, fp, ip, sp, lr, pc}
71698: b9134606 ldmdblt r3, {r1, r2, r9, sl, lr}
7169c: e8bd2001 pop {r0, sp}
716a0: 692383f8 stmdbvs r3!, {r3, r4, r5, r6, r7, r8, r9, pc}
716a4: 4370f403 cmnmi r0, #50331648 ; 0x3000000 ; <UNPREDICTABLE>
716a8: 4f40f5b3 svcmi 0x0040f5b3
716ac: 4857d104 ldmdami r7, {r2, r8, ip, lr, pc}^
716b0: f09f4639 ; <UNDEFINED> instruction: 0xf09f4639
716b4: e7f1f930 ; <UNDEFINED> instruction: 0xe7f1f930
716b8: 4f80f5b3 svcmi 0x0080f5b3
716bc: 0200f04f andeq pc, r0, #79 ; 0x4f
716c0: d01c612a andsle r6, ip, sl, lsr #2
716c4: 2b016963 blcs 0xcbc58

0 Kudos