1

I compiled an Android Linux kernel for raspberry pi. The board seems to boot with that kernel but I get the following error when it tries to run /init process.

Kernel panic - not syncing: Attempted to kill init!

I put debug statements in the code and could find out that a sys_exit_group system call is called with exit code = 4

[Current Situation]: I have copied the contents of out/target/product/generic/root into the RPI SD card (/dev/mmcblk0p6) and also copied systems folder to it. 

When I tried earlier with the previous arch linux root filesystem on the SD card, this error did not seem to come.

Attached below is the log with some of my debug statements too (starting with [Shadman])

[Shadman] [fs/exec.c:]do_execve_common[1485]:: unshared_files
[Shadman] [fs/exec.c:]do_execve_common[1491]:: kzalloc
[Shadman] [fs/exec.c:]do_execve_common[1496]:: prepare_bprm_creds
[Shadman] [fs/exec.c:]do_execve_common[1501]:: check_unsafe_exec
[Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[96]: Failed to execute - Filename = /sbin/hotplug 
[Shadman] [kernel/exit.c:]do_exit[906]:: In fucntion.
[Shadman] [kernel/exit.c:]exit_notify[814]:: In Function. [Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[89]: In function - Filename = /sbin/hotplug 
[Shadman] [fs/exec.c:]do_execve_common[1476]:: 
[Shadman] [kernel/exit.c:]forget_original_parent[770]:: In function
[Shadman] [kernel/exit.c:]find_new_reaper[707]:: In function.
[Shadman] [kernel/exit.c:]forget_original_parent[782]:: Got reaper father
if ((current->flags & PF_NPROC_EXCEEDED) 
[Shadman] [fs/exec.c:]do_execve_common[1485]:: unshared_files
[Shadman] [fs/exec.c:]do_execve_common[1491]:: kzalloc
[Shadman] [fs/exec.c:]do_execve_common[1496]:: prepare_bprm_creds
[Shadman] [fs/exec.c:]do_execve_common[1501]:: check_unsafe_exec
[Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[96]: Failed to execute - Filename = /sbin/hotplug 
[Shadman] [kernel/exit.c:]do_exit[906]:: In fucntion.
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
[Shadman] [kernel/exit.c:]exit_notify[814]:: In Function. 
[Shadman] [kernel/exit.c:]forget_original_parent[770]:: [Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[89]: In function - Filename = /sbin/hotplug 
[Shadman] [fs/exec.c:]do_execve_common[1476]:: 
usb 1-1: device descriptor read/64, error -32
In function
[Shadman] [kernel/exit.c:]find_new_reaper[707]:: In function.
[Shadman] [kernel/exit.c:]forget_original_parent[782]:: Got reaper father
if ((current->flags & PF_NPROC_EXCEEDED) 
[Shadman] [fs/exec.c:]do_execve_common[1485]:: unshared_files
[Shadman] [fs/exec.c:]do_execve_common[1491]:: kzalloc
[Shadman] [fs/exec.c:]do_execve_common[1496]:: prepare_bprm_creds
[Shadman] [fs/exec.c:]do_execve_common[1501]:: check_unsafe_exec
[Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[96]: Failed to execute - Filename = /sbin/hotplug 
[Shadman] [kernel/exit.c:]do_exit[906]:: In fucntion.
[Shadman] [kernel/exit.c:]exit_notify[814]:: In Function. [Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[89]: In function - Filename = /sbin/hotplug 
[Shadman] [fs/exec.c:]do_execve_common[1476]:: 
[Shadman] [kernel/exit.c:]forget_original_parent[770]:: In function
[Shadman] [kernel/exit.c:]find_new_reaper[707]:: In function.
[Shadman] [kernel/exit.c:]forget_original_parent[782]:: Got reaper father
if ((current->flags & PF_NPROC_EXCEEDED) 
[Shadman] [fs/exec.c:]do_execve_common[1485]:: unshared_files
[Shadman] [fs/exec.c:]do_execve_common[1491]:: kzalloc
[Shadman] [fs/exec.c:]do_execve_common[1496]:: prepare_bprm_creds
[Shadman] [fs/exec.c:]do_execve_common[1501]:: check_unsafe_exec
[Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[96]: Failed to execute - Filename = /sbin/hotplug 
[Shadman] [kernel/exit.c:]do_exit[906]:: In fucntion.
logger: created 256K log 'log_main'
[Shadman] [kernel/exit.c:]exit_notify[814]:: [Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[89]: In function - Filename = /sbin/hotplug 
[Shadman] [fs/exec.c:]do_execve_common[1476]:: In Function. 
[Shadman] [kernel/exit.c:]forget_original_parent[770]:: In function
[Shadman] [kernel/exit.c:]find_new_reaper[707]:: In function.
[Shadman] [kernel/exit.c:]forget_original_parent[782]:: Got reaper father
if ((current->flags & PF_NPROC_EXCEEDED) 
[Shadman] [fs/exec.c:]do_execve_common[1485]:: unshared_files
[Shadman] [fs/exec.c:]do_execve_common[1491]:: kzalloc
[Shadman] [fs/exec.c:]do_execve_common[1496]:: prepare_bprm_creds
[Shadman] [fs/exec.c:]do_execve_common[1501]:: check_unsafe_exec
[Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[96]: Failed to execute - Filename = /sbin/hotplug 
[Shadman] [kernel/exit.c:]do_exit[906]:: In fucntion.
logger: created 256K log 'log_events'
[Shadman] [kernel/exit.c:]exit_notify[814]:: [Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[89]: In function - Filename = /sbin/hotplug 
[Shadman] [fs/exec.c:]do_execve_common[1476]:: In Function. 
[Shadman] [kernel/exit.c:]forget_original_parent[770]:: In function
[Shadman] [kernel/exit.c:]find_new_reaper[707]:: In function.
[Shadman] [kernel/exit.c:]forget_original_parent[782]:: Got reaper father
if ((current->flags & PF_NPROC_EXCEEDED) 
[Shadman] [fs/exec.c:]do_execve_common[1485]:: unshared_files
[Shadman] [fs/exec.c:]do_execve_common[1491]:: kzalloc
[Shadman] [fs/exec.c:]do_execve_common[1496]:: prepare_bprm_creds
[Shadman] [fs/exec.c:]do_execve_common[1501]:: check_unsafe_exec
[Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[96]: Failed to execute - Filename = /sbin/hotplug 
[Shadman] [kernel/exit.c:]do_exit[906]:: In fucntion.
logger: created 256K log 'log_radio'
[Shadman] [kernel/exit.c:]exit_notify[814]:: [Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[89]: In function - Filename = /sbin/hotplug 
[Shadman] [fs/exec.c:]do_execve_common[1476]:: In Function. 
[Shadman] [kernel/exit.c:]forget_original_parent[770]:: In function
[Shadman] [kernel/exit.c:]find_new_reaper[707]:: In function.
[Shadman] [kernel/exit.c:]forget_original_parent[782]:: Got reaper father
if ((current->flags & PF_NPROC_EXCEEDED) 
[Shadman] [fs/exec.c:]do_execve_common[1485]:: unshared_files
[Shadman] [fs/exec.c:]do_execve_common[1491]:: kzalloc
[Shadman] [fs/exec.c:]do_execve_common[1496]:: prepare_bprm_creds
[Shadman] [fs/exec.c:]do_execve_common[1501]:: check_unsafe_exec
[Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[96]: Failed to execute - Filename = /sbin/hotplug 
[Shadman] [kernel/exit.c:]do_exit[906]:: In fucntion.
logger: created 256K log 'log_system'
[Shadman] [kernel/exit.c:]exit_notify[814]:: [Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[89]: In function - Filename = /sbin/hotplug 
[Shadman] [fs/exec.c:]do_execve_common[1476]:: 
usb 1-1: new high speed USB device number 4 using dwc_otg
In Function. 
[Shadman] [kernel/exit.c:]forget_original_parent[770]:: In function
[Shadman] [kernel/exit.c:]find_new_reaper[707]:: In function.
[Shadman] [kernel/exit.c:]forget_original_parent[782]:: Got reaper father
if ((current->flags & PF_NPROC_EXCEEDED) 
[Shadman] [fs/exec.c:]do_execve_common[1485]:: unshared_files
[Shadman] [fs/exec.c:]do_execve_common[1491]:: kzalloc
[Shadman] [fs/exec.c:]do_execve_common[1496]:: prepare_bprm_creds
[Shadman] [fs/exec.c:]do_execve_common[1501]:: check_unsafe_exec
[Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[96]: Failed to execute - Filename = /sbin/hotplug 
[Shadman] [kernel/exit.c:]do_exit[906]:: In fucntion.
[Shadman] [kernel/exit.c:]exit_notify[814]:: In Function. [Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[89]: In function - Filename = /sbin/hotplug 
[Shadman] [fs/exec.c:]do_execve_common[1476]:: 
[Shadman] [kernel/exit.c:]forget_original_parent[770]:: In function
[Shadman] [kernel/exit.c:]find_new_reaper[707]:: In function.
[Shadman] [kernel/exit.c:]forget_original_parent[782]:: Got reaper father
if ((current->flags & PF_NPROC_EXCEEDED) 
[Shadman] [fs/exec.c:]do_execve_common[1485]:: unshared_files
[Shadman] [fs/exec.c:]do_execve_common[1491]:: kzalloc
[Shadman] [fs/exec.c:]do_execve_common[1496]:: prepare_bprm_creds
[Shadman] [fs/exec.c:]do_execve_common[1501]:: check_unsafe_exec
[Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[96]: Failed to execute - Filename = /sbin/hotplug 
[Shadman] [kernel/exit.c:]do_exit[906]:: In fucntion.
TCP cubic registered
Initializing XFRM netlink socket
[Shadman] [kernel/exit.c:]exit_notify[814]:: In Function. 
[Shadman] [kernel/exit.c:]forget_original_parent[770]:: 
NET: Registered protocol family 17
Registering the dns_resolver key type
VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
In function
[Shadman] [kernel/exit.c:]find_new_reaper[707]:: In function.
[Shadman] [kernel/exit.c:]forget_original_parent[782]:: Got reaper father
[Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[89]: In function - Filename = /sbin/hotplug 
[Shadman] [fs/exec.c:]do_execve_common[1476]:: if ((current->flags & PF_NPROC_EXCEEDED) 
[Shadman] [fs/exec.c:]do_execve_common[1485]:: unshared_files
[Shadman] [fs/exec.c:]do_execve_common[1491]:: kzalloc
[Shadman] [fs/exec.c:]do_execve_common[1496]:: prepare_bprm_creds
[Shadman] [fs/exec.c:]do_execve_common[1501]:: check_unsafe_exec
[Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[96]: Failed to execute - Filename = /sbin/hotplug 
[Shadman] [kernel/exit.c:]do_exit[906]:: In fucntion.
[Shadman] [kernel/exit.c:]exit_notify[814]:: In Function. [Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[89]: In function - Filename = /sbin/hotplug 
[Shadman] [fs/exec.c:]do_execve_common[1476]:: 
[Shadman] [kernel/exit.c:]forget_original_parent[770]:: In function
[Shadman] [kernel/exit.c:]find_new_reaper[707]:: In function.
[Shadman] [kernel/exit.c:]forget_original_parent[782]:: Got reaper father
if ((current->flags & PF_NPROC_EXCEEDED) 
[Shadman] [fs/exec.c:]do_execve_common[1485]:: unshared_files
[Shadman] [fs/exec.c:]do_execve_common[1491]:: kzalloc
[Shadman] [fs/exec.c:]do_execve_common[1496]:: prepare_bprm_creds
[Shadman] [fs/exec.c:]do_execve_common[1501]:: check_unsafe_exec
[Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[96]: Failed to execute - Filename = /sbin/hotplug 
[Shadman] [kernel/exit.c:]do_exit[906]:: In fucntion.
[Shadman] [kernel/exit.c:]exit_notify[814]:: In Function. [Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[89]: In function - Filename = /sbin/hotplug 
[Shadman] [fs/exec.c:]do_execve_common[1476]:: 
[Shadman] [kernel/exit.c:]forget_original_parent[770]:: In function
[Shadman] [kernel/exit.c:]find_new_reaper[707]:: In function.
[Shadman] [kernel/exit.c:]forget_original_parent[782]:: Got reaper father
if ((current->flags & PF_NPROC_EXCEEDED) 
[Shadman] [fs/exec.c:]do_execve_common[1485]:: unshared_files
[Shadman] [fs/exec.c:]do_execve_common[1491]:: kzalloc
[Shadman] [fs/exec.c:]do_execve_common[1496]:: prepare_bprm_creds
[Shadman] [fs/exec.c:]do_execve_common[1501]:: check_unsafe_exec
[Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[96]: Failed to execute - Filename = /sbin/hotplug 
[Shadman] [kernel/exit.c:]do_exit[906]:: In fucntion.
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[Shadman] [kernel/exit.c:]exit_notify[814]:: In Function. 
[Shadman] [kernel/exit.c:]forget_original_parent[770]:: [Shadman] [init/main.c:]kernel_init[859]:: Preparing namespace =====================
[Shadman] [init/main.c:]kernel_init[861]:: In function
[Shadman] [kernel/exit.c:]find_new_reaper[707]:: In function.
[Shadman] [kernel/exit.c:]forget_original_parent[782]:: Got reaper father
sys_access((const char __user *) ramdisk_execute_command, 0) != 0 returned true
[Shadman] [init/do_mounts.c:]prepare_namespace[443]:: In function ==========
[Shadman] [init/do_mounts.c:]prepare_namespace[464]:: saved_root_name[0], /dev/mmcblk0p6
[Shadman] [init/do_mounts.c:]prepare_namespace[477]:: Here ==============
[Shadman] [init/do_mounts.c:]mount_block_root[307]:: In function: /dev/root, 32768 =========
[Shadman] [init/do_mounts.c:]mount_block_root[320]:: In for (p = fs_names; *p; p += strlen(p)+1)
[Shadman] [init/do_mounts.c:]do_mount_root[290]:: In function: /dev/root, ext4, 32768
EXT4-fs (mmcblk0p6): recovery complete
EXT4-fs (mmcblk0p6): mounted filesystem with ordered data mode. Opts: (null)
usb 1-1: device not accepting address 4, error -32
VFS: Mounted root (ext4 filesystem) on device 179:6.
[Shadman] [init/do_mounts.c:]mount_block_root[322]:: do_mount_root() err = 0
[Shadman] [init/main.c:]kernel_init[866]:: Preparing namespace done ====================
[Shadman] [init/main.c:]init_post[769]:: In Function
[Shadman] [init/main.c:]init_post[772]:: Finished: async_synchronize_full()
Freeing init memory: 120K
[Shadman] [init/main.c:]init_post[774]:: Finished: free_initmem()
[Shadman] [init/main.c:]init_post[776]:: Finished: mark_rodata_ro()
[Shadman] [init/main.c:]init_post[780]:: Finished all async init code.
[Shadman] [init/main.c:]init_post[791]:: if (ramdisk_execute_command) is not satisfied
[Shadman] [init/main.c:]init_post[800]:: doing execute_command: /init
[Shadman] [init/main.c:]run_init_process[758]:: process name = /init
[Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[89]: In function - Filename = /init 
[Shadman] [fs/exec.c:]do_execve_common[1476]:: if ((current->flags & PF_NPROC_EXCEEDED) 
[Shadman] [fs/exec.c:]do_execve_common[1485]:: unshared_files
[Shadman] [fs/exec.c:]do_execve_common[1491]:: kzalloc
[Shadman] [fs/exec.c:]do_execve_common[1496]:: prepare_bprm_creds
[Shadman] [fs/exec.c:]do_execve_common[1501]:: check_unsafe_exec
[Shadman] [fs/exec.c:]do_execve_common[1510]:: PTR_ERR(file)
[Shadman] [fs/exec.c:]do_execve_common[1513]:: Schedular exec
[Shadman] [fs/exec.c:]do_execve_common[1522]:: bprm_mm_init
[Shadman] [fs/exec.c:]do_execve_common[1527]:: count
[Shadman] [fs/exec.c:]do_execve_common[1532]:: ENV count
[Shadman] [fs/exec.c:]do_execve_common[1537]:: prepare_binprm
[Shadman] [fs/exec.c:]do_execve_common[1542]:: copy_strings_kernel
[Shadman] [fs/exec.c:]do_execve_common[1548]:: copy_strings
[Shadman] [fs/exec.c:]do_execve_common[1553]:: copy_strings
[Shadman] [fs/exec.c:]do_execve_common[1558]:: search_binary_handler
[Shadman] [arch/arm/kernel/sys_arm.c:]kernel_execve[100]: Exec successful. Restoring registers = /init 
[Shadman] [kernel/exit.c:]do_group_exit[1090]:: Group exit with code = 4
[Shadman] [kernel/exit.c:]do_exit[906]:: 
usb 1-1: new high speed USB device number 5 using dwc_otg
In fucntion.
[Shadman] [kernel/exit.c:]exit_notify[814]:: In Function. 
[Shadman] [kernel/exit.c:]forget_original_parent[770]:: In function
[Shadman] [kernel/exit.c:]find_new_reaper[707]:: In function.
Kernel panic - not syncing: Attempted to kill init!

migrated from stackoverflow.com Dec 8 '13 at 17:51

This question came from our site for professional and enthusiast programmers.

  • 1
    The 5-10 lines before that message should have information about the actual problem. That line by itself doesn't really say much except that there's a problem. – Mat Dec 8 '13 at 13:50
  • @Mat As far as I could understand, there isn't much 5-10 lines before this line. The kernel mounts the rootfs and goes to init_post(), calls a few more functions with out error and calls run_init_process("/init") to start /init. – Shadman Anwer Dec 8 '13 at 13:56
  • Messages in the log, not code lines. – CL. Dec 8 '13 at 14:01
  • Your init process died, or couldn't be started. So your problem is in your configuration, not the code. – Michael Hampton Dec 8 '13 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy