How to debug kernel crash on /sbin/init during bootup?

0

I am trying to update the kernel

  • from 3.2 to 4.12. This is a custom kernel for a Power PC based architecture 32 bits.

Here are the problems I am facing. The kernel boot parameters are passed from Uboot. I see that the kernel crashes on SyS_selec() . I feel that this print is coming from the interrupt. The kernel log message doesn't tell me much it says something about FPU i.e. Floating point unit. I don't understand why it says FPU since I am not doing anything related to Floating point. Here are the logs. Could you please help me to understand the root cause and where I should look to fix this problem?

=> boot
## Booting kernel from Legacy Image at f8100000 ...
   Image Name:   Linux-4.12.28-disco-standard
   Created:      2019-07-15   4:32:40 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    3804492 Bytes = 3.6 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at f8000000
   Booting using the fdt blob at 0xf8000000
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 007fb000, end 007ff8e8 ... OK

Linux version 4.12.28-disco-standard (oe-user@oe-host) (gcc version 7.3.0 (GCC) ) #1 Mon Jul 15 04:01:31 UTC 2019
Using abcl machine description
bootconsole [udbg0] enabled
-----------------------------------------------------
Hash_size         = 0x0
phys_mem_size     = 0x20000000
dcache_bsize      = 0x20
icache_bsize      = 0x20
cpu_features      = 0x0000000000020460
  possible        = 0x0000000005a6fd77
  always          = 0x0000000000020000
cpu_user_features = 0x8c000000 0x00000000
mmu_features      = 0x00210000
-----------------------------------------------------
abcl_setup_arch()
Zone ranges:
  DMA      [mem 0x0000000000000000-0x000000001fffffff]
  Normal   empty
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x0000000000000000-0x000000001fffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
Kernel command line: ubi.mtd=1 rootfstype=ubifs root=ubi0:discofs rw console=ttyS1,115200 serno=91101316 sku=700064090C hwrev==00:90:5E:12:32:05 mac1=00:90:5E:12:32:06 mac2=00:90:5E:12:32:07 mac3=00:90:5E:12:32:08 mac4=00:90:5E:12:32:09
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 511900K/524288K available (6004K kernel code, 276K rwdata, 1196K rodata, 192K init, 133K bss, 12388K reserved, 0K cma-reserved)
Kernel virtual memory layout:
  * 0xfffdf000..0xfffff000  : fixmap
  * 0xfdffe000..0xfe000000  : early ioremap
  * 0xe1000000..0xfdffe000  : vmalloc & ioremap
NR_IRQS:512 nr_irqs:512 16
IPIC (128 IRQ sources) at e1000700
clocksource: timebase: mask: 0xffffffffffffffff max_cycles: 0x12049cd416, max_idle_ns: 440795202745 ns
clocksource: timebase mult[ccccccd] shift[24] registered
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
NET: Registered protocol family 16
PCI: Probing PCI hardware
Freescale Elo series DMA driver
vgaarb: loaded
SCSI subsystem initialized
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
clocksource: Switched to clocksource timebase
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

NET: Registered protocol family 1

RPC: Registered named UNIX socket transport module.

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

RPC: Registered tcp NFSv4.1 backchannel transport module.

fsl-elo-dma e00082a8.dma: #0 (fsl,elo-dma-channel), irq 71

fsl-elo-dma e00082a8.dma: #1 (fsl,elo-dma-channel), irq 71

fsl-elo-dma e00082a8.dma: #2 (fsl,elo-dma-channel), irq 71

fsl-elo-dma e00082a8.dma: #3 (fsl,elo-dma-channel), irq 71

workingset: timestamp_bits=30 max_order=17 bucket_order=0

NFS: Registering the id_resolver key type

Key type id_resolver registered

Key type id_legacy registered

jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.

SGI XFS with security attributes, no debug enabled

io scheduler noop registered

io scheduler deadline registered

io scheduler cfq registered (default)

Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled

serial8250.0: ttyS0 at MMIO 0xe0004500 (irq = 16, base_baud = 19531250) is a 16550A

serial8250.0: ttyS1 at MMIO 0xe0004600 (irq = 17, base_baud = 19531250) is a 16550A

console [ttyS1] enabled

console [ttyS1] enabled

bootconsole [udbg0] disabled

bootconsole [udbg0] disabled

brd: module loaded

loop: module loaded

f8000000.flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000089 Chip ID 0x008966

Intel/Sharp Extended Query Table at 0x010A

Intel/Sharp Extended Query Table at 0x010A

Intel/Sharp Extended Query Table at 0x010A

Intel/Sharp Extended Query Table at 0x010A

Intel/Sharp Extended Query Table at 0x010A

Using buffer write method

Using auto-unlock on power-up/resume

cfi_cmdset_0001: Erase suspend on write enabled

Searching for RedBoot partition table in f8000000.flash at offset 0x7fe0000

No RedBoot partition table detected in f8000000.flash

nand: device found, Manufacturer ID: 0x20, Chip ID: 0xd3

nand: ST Micro NAND08GW3B2CN6

nand: 1024 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64

Bad block table found at page 524224, version 0x01

Bad block table found at page 524160, version 0x01

nand_read_bbt: bad block at 0x0000023a0000

nand_read_bbt: bad block at 0x0000369c0000

Searching for RedBoot partition table in c0000000.flash at offset 0x3ff60000

No RedBoot partition table detected in c0000000.flash

1 ofpart partitions found on MTD device c0000000.flash

Creating 1 MTD partitions on "c0000000.flash":

0x000000000000-0x000040000000 : "NAND Filesystem"

eLBC NAND device at 0xc0000000, bank 4

abcl nand: no system info node found, assuming legacy device tree blob.

libphy: Fixed MDIO Bus: probed

libphy: Freescale PowerQUICC MII Bus: probed

libphy: Freescale PowerQUICC MII Bus: probed

fsl-gianfar e0025000.ethernet: enabled errata workarounds, flags: 0x4

fsl-gianfar e0025000.ethernet eth0: mac: 00:90:5e:12:32:05

fsl-gianfar e0025000.ethernet eth0: Running with NAPI enabled

fsl-gianfar e0025000.ethernet eth0: RX BD ring size for Q[0]: 256

fsl-gianfar e0025000.ethernet eth0: TX BD ring size for Q[0]: 256

fsl-gianfar e0024000.ethernet: enabled errata workarounds, flags: 0x4

fsl-gianfar e0024000.ethernet eth1: mac: 00:90:5e:12:32:06

fsl-gianfar e0024000.ethernet eth1: Running with NAPI enabled

fsl-gianfar e0024000.ethernet eth1: RX BD ring size for Q[0]: 256

fsl-gianfar e0024000.ethernet eth1: TX BD ring size for Q[0]: 256

i2c /dev entries driver

mpc-i2c e0003000.i2c: timeout 1000000 us

rtc-ds1307: probe of 0-0068 failed with error -5

mpc-i2c e0003100.i2c: timeout 1000000 us

NET: Registered protocol family 17

NET: Registered protocol family 15

8021q: 802.1Q VLAN Support v1.8

Key type dns_resolver registered

ubi0: attaching mtd1

random: fast init done

ubi0: scanning is finished

ubi0 warning: ubi_eba_init: cannot reserve enough PEBs for bad PEB handling, reserved 108, need 154

ubi0: attached mtd1 (name "NAND Filesystem", size 1024 MiB)

ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes

ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512

ubi0: VID header offset: 512 (aligned 512), data offset: 2048

ubi0: good PEBs: 8186, bad PEBs: 6, corrupted PEBs: 0

ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128

ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 2015956448

ubi0: available PEBs: 0, total reserved PEBs: 8186, PEBs reserved for bad PEB handling: 108

ubi0: background thread "ubi_bgt0d" started, PID 82

hctosys: unable to open rtc device (rtc0)

of_cfs_init

of_cfs_init: OK

md: Waiting for all devices to be available before autodetect

md: If you don't use raid, use raid=noautodetect

md: Autodetecting RAID arrays.

md: autorun ...

md: ... autorun DONE.

UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 87

UBIFS (ubi0:0): recovery needed

UBIFS (ubi0:0): recovery completed

UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "discofs"

UBIFS (ubi0:0): LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
UBIFS (ubi0:0): FS size: 198567936 bytes (189 MiB, 1539 LEBs), journal size 9033728 bytes (8 MiB, 71 LEBs)
UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
UBIFS (ubi0:0): media format: w4/r0 (latest is w5/r0), UUID C7F7CF25-F51C-4F98-878F-489AD5ECB0E4, small LPT model
VFS: Mounted root (ubifs filesystem) on device 0:13.
devtmpfs: mounted
Freeing unused kernel memory: 192K
This architecture does not have kernel memory protection.
Unable to handle kernel paging request for data at address 0x00005091
Faulting instruction address: 0xc0100eec
Oops: Kernel access of bad area, sig: 11 [#1]
abcl
Modules linked in:
CPU: 0 PID: 1 Comm: init Not tainted 4.12.28-disco-standard #1
task: df416a60 task.stack: df42a000
NIP: c0100eec LR: c01013a0 CTR: 00000000
REGS: df42be40 TRAP: 0300   Not tainted  (4.12.28-disco-standard)
MSR: 00009032 <EE,ME,IR,DR,RI>
  CR: 22002442  XER: 00000000
DAR: 00005091 DSISR: 20000000
GPR00: c0101350 df42bef0 df416a60 df42bef8 bfccbb94 00000000 00000000 00000000
GPR08: 00000000 00000000 00000000 00000000 00000000 10028254 00000000 00000000
GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000001
GPR24: bfcccf47 00000000 00000000 00000000 bfccbb08 0000000c bfccbb90 df42bef8
NIP [c0100eec] poll_select_set_timeout+0x0/0x174
LR [c01013a0] SyS_select+0x9c/0x114
Call Trace:
[df42bef0] [c0101350] SyS_select+0x4c/0x114 (unreliable)
[df42bf40] [c00103a8] ret_from_syscall+0x0/0x38
--- interrupt: c01 at 0xfef65b4
    LR = 0xfef657c
Instruction dump:
28f5c8c2 57ff803e 87d89261 f55d3806 7d37c1cf eac5d8a5 24dbd73d 532e2514
e4b43b1b e77c9e25 cefebc5b 76ac3b5f <adba5091> 1d7f7395 3cfdc277 8d7c18a0
---[ end trace 0bfbbaf2a7935445 ]---

Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

Rebooting in 180 seconds..
linux-kernel
embedded-linux
yocto
powerpc
asked on Stack Overflow Jul 11, 2019 by (unknown user) • edited Jul 15, 2019 by 0andriy

1 Answer

0

You haven't mentioned what kind of initramfs you use. Can you try adding "break=init" to your kernel commandline options to see if you get a shell?

answered on Stack Overflow Jul 11, 2019 by idlethread

User contributions licensed under CC BY-SA 3.0