Crash when booting RPi2 / bcm2836 with ftrace=function

Matthias Reichl hias at horus.com
Mon Aug 21 09:38:21 PDT 2017


Hi Stefan!

On Mon, Aug 21, 2017 at 05:50:29PM +0200, Stefan Wahren wrote:
> Am 21.08.2017 um 17:34 schrieb Matthias Reichl:
> > When I enable the function tracer during boot on Raspberry Pi 2
> > /bcm2836) I get a kernel crash very early in the boot process:
> i recently made a patch series for the SMP part [1], which should go to
> 4.14.
> 
> Could you please test this prepared branch [2]?
> 
> Thanks
> Stefan
> 
> [1] -
> http://lists.infradead.org/pipermail/linux-rpi-kernel/2017-August/006790.html
> [2] - https://github.com/anholt/linux/commits/bcm2835-soc-smp-cleanup

Thanks a lot for your quick reply!

I tested the bcm2835-soc-smp-cleanup tree and now I get the crash
at a different location - see full log below.

so long,

Hias

[    0.000000] Booting Linux on physical CPU 0xf00
[    0.000000] Linux version 4.13.0-rc1-00004-g662312bdb6e3 (hias at camel2) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1 SMP Mon Aug 21 18:28:15 CEST 2017
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Raspberry Pi 2 Model B Rev 1.1
[    0.000000] earlycon: pl11 at MMIO32 0x3f201000 (options '')
[    0.000000] bootconsole [pl11] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 64 MiB at 0x2b000000
[    0.000000] percpu: Embedded 17 pages/cpu @ea9a8000 s39552 r8192 d21888 u69632
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 191008
[    0.000000] Kernel command line: earlyprintk console=ttyAMA0 bcm2708_fb.fbwidth=1280 bcm2708_fb.fbheight=1024 bcm2708_fb.fbswap=1 dma.dmachans=0x7f35 bcm2709.boardrev=0xa01041 bcm2709.serial=0x89ede62e bcm2709.uart_clock=48000000 bcm2709.disk_led_gpio=47 bcm2709.disk_led_active_low=0 smsc95xx.macaddr=B8:27:EB:ED:E6:2E vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  root=/dev/mmcblk0p2 rw rootwait earlycon=pl011,mmio32,0x3f201000 ftrace_filter=__request_module ftrace=function
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 675804K/770048K available (11264K kernel code, 1500K rwdata, 4264K rodata, 2048K init, 402K bss, 28708K reserved, 65536K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xef800000 - 0xff800000   ( 256 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xef000000   ( 752 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0208000 - 0xc0e00000   (12256 kB)
[    0.000000]       .init : 0xc1400000 - 0xc1600000   (2048 kB)
[    0.000000]       .data : 0xc1600000 - 0xc17770a8   (1501 kB)
[    0.000000]        .bss : 0xc1780cbc - 0xc17e567c   ( 403 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 44617 entries in 131 pages
[    0.000000] Starting tracer 'function'
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	RCU event tracing is enabled.
[    0.000000] 	RCU restricting CPUs from NR_CPUS=16 to nr_cpu_ids=4.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000028] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns
[    0.008529] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
[    0.018046] bcm2835: system timer (irq = 33)
[    0.024756] arch_timer: WARNING: Invalid trigger for IRQ16, assuming level low
[    0.032078] arch_timer: WARNING: Please fix your firmware
[    0.037558] arch_timer: WARNING: Invalid trigger for IRQ17, assuming level low
[    0.044879] arch_timer: WARNING: Please fix your firmware
[    0.050433] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[    0.056624] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.067577] Unable to handle kernel paging request at virtual address c11e0410
[    0.074898] pgd = c0204000
[    0.077639] [c11e0410] *pgd=0101940e(bad)
[    0.081719] Internal error: Oops: 80d [#1] SMP ARM
[    0.086577] Modules linked in:
[    0.089688] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.13.0-rc1-00004-g662312bdb6e3 #1
[    0.097801] Hardware name: BCM2835
[    0.101250] task: c1607f80 task.stack: c1600000
[    0.105864] PC is at arch_timer_common_init+0x1e8/0x218
[    0.111164] LR is at 0x18
[    0.113819] pc : [<c14b366c>]    lr : [<00000018>]    psr: 600000d3
[    0.120173] sp : c1601ef8  ip : c11e0400  fp : c1601f4c
[    0.125470] r10: c11c76ec  r9 : 00000000  r8 : 002d3579
[    0.130765] r7 : c10d2490  r6 : c17db010  r5 : c1760590  r4 : 34155555
[    0.137383] r3 : 00000000  r2 : 002d3579  r1 : c11e0400  r0 : c17db030
[    0.144007] Flags: nZCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment none
[    0.151418] Control: 10c5387d  Table: 0020406a  DAC: 00000051
[    0.157245] Process swapper/0 (pid: 0, stack limit = 0xc1600220)
[    0.163337] Stack: (0xc1601ef8 to 0xc1602000)
[    0.167755] 1ee0:                                                       00000013 00000014
[    0.176058] 1f00: c1167764 c10d2490 c10d2490 c0db1640 00000001 00000000 00000013 c150dfe4
[    0.184352] 1f20: c17db010 00000000 c17db010 00000011 c1760590 c17db010 c14dfa30 eafff940
[    0.192649] 1f40: c1601f7c c1601f50 c14b39f4 c14b3490 c0c15c8c 00000000 c0c24e4c ea9f81c8
[    0.200948] 1f60: 00000001 c1603c40 ffffffff c1780cc0 c1601f9c c1601f80 c14af0d4 c14b36a8
[    0.209247] 1f80: ffffffff c157cd6c 00000000 c1780cc0 c1601fac c1601fa0 c1404f08 c14af088
[    0.217549] 1fa0: c1601ff4 c1601fb0 c1400c6c c1404ed8 ffffffff ffffffff 00000000 c1400750
[    0.225853] 1fc0: 00000000 c14dfa30 00000000 c1781294 c1603c58 c14dfa2c c160939c 0020406a
[    0.234146] 1fe0: 410fc075 00000000 00000000 c1601ff8 0020807c c1400a18 00000000 00000000
[    0.242469] [<c14b366c>] (arch_timer_common_init) from [<c14b39f4>] (arch_timer_of_init+0x358/0x374)
[    0.251746] [<c14b39f4>] (arch_timer_of_init) from [<c14af0d4>] (timer_probe+0x58/0xb4)
[    0.259879] [<c14af0d4>] (timer_probe) from [<c1404f08>] (time_init+0x3c/0x40)
[    0.267220] [<c1404f08>] (time_init) from [<c1400c6c>] (start_kernel+0x260/0x3a8)
[    0.274820] [<c1400c6c>] (start_kernel) from [<0020807c>] (0x20807c)
[    0.281270] Code: e1a03009 e1a0100c e1a02008 e59f0028 (e58c4010) 
[    0.287483] random: get_random_bytes called from init_oops_id+0x48/0x50 with crng_init=0
[    0.295699] ---[ end trace 0000000000000000 ]---
[    0.300383] Kernel panic - not syncing: Attempted to kill the idle task!
[    0.307189] ---[ end Kernel panic - not syncing: Attempted to kill the idle task!
[    0.314859] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[    0.323065] pgd = c0204000
[    0.325808] [00000000] *pgd=00000000
[    0.329438] Internal error: Oops: 5 [#2] SMP ARM
[    0.334118] Modules linked in:
[    0.337221] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G      D         4.13.0-rc1-00004-g662312bdb6e3 #1
[    0.346565] Hardware name: BCM2835
[    0.350011] task: c1607f80 task.stack: c1600000
[    0.354610] PC is at perf_event_task_tick+0x68/0x2b4
[    0.359645] LR is at 0xc1601ad8
[    0.362828] pc : [<c041c0d8>]    lr : [<c1601ad8>]    psr: a00001d3
[    0.369178] sp : c1601ad8  ip : 00000000  fp : c1601b1c
[    0.374478] r10: ea9ae964  r9 : c1607f80  r8 : 29424000
[    0.379777] r7 : ffffffe4  r6 : 29424000  r5 : 29424000  r4 : c158a964
[    0.386397] r3 : 00000000  r2 : c158a948  r1 : 00000000  r0 : 00000001
[    0.393016] Flags: NzCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment none
[    0.400427] Control: 10c5387d  Table: 0020406a  DAC: 00000051
[    0.406253] Process swapper/0 (pid: 0, stack limit = 0xc1600220)
[    0.412342] Stack: (0xc1601ad8 to 0xc1602000)
[    0.416760] 1ac0:                                                       29424000 ea9b1000
[    0.425054] 1ae0: 00000000 c1604178 00000000 00000000 c1607f80 c158d000 ea9b1000 c1604178
[    0.433356] 1b00: 00000000 29424000 c1607f80 00000001 c1601b44 c1601b20 c0377160 c041c07c
[    0.441661] 1b20: c1607f80 00000000 00000000 00000000 00000011 c1600000 c1601b5c c1601b48
[    0.449961] 1b40: c03b86c0 c03770cc c1602d40 00000000 c1601b7c c1601b60 c03c7e48 c03b866c
[    0.458256] 1b60: c1600000 ea9b43c0 00989680 00000000 c1601bac c1601b80 c03c7ef8 c03c7e08
[    0.466552] 1b80: c039aa54 00000001 ea245900 00000000 ea250a00 c1672650 00000011 c1600000
[    0.474851] 1ba0: c1601bbc c1601bb0 c0c15a18 c03c7ecc c1601be4 c1601bc0 c03a16dc c0c159e4
[    0.483150] 1bc0: c158cb84 00000000 00000000 00000001 ea010100 c1600000 c1601bf4 c1601be8
[    0.491452] 1be0: c039c060 c03a1650 c1601c1c c1601bf8 c039c684 c039c038 c1601c40 c034b4a4
[    0.499754] 1c00: 00000000 c1601c40 c1601c74 00000000 c1601c3c c1601c20 c03015cc c039c624
[    0.508055] 1c20: c039a7b0 c034b4a4 60000153 ffffffff c1601ccc c1601c40 c030e4cc c0301528
[    0.516352] 1c40: 00000045 29424000 c16389d8 c16389d8 00000000 0000000b c1601ea8 00000000
[    0.524654] 1c60: 00000000 c1783048 00000001 c1601ccc c1601b70 c1601c90 c039a7b0 c034b4a4
[    0.532949] 1c80: 60000153 ffffffff 00000051 bf000000 c14b3670 00000001 c1601cbc c1601cd4
[    0.541247] 1ca0: c039aca8 c1607f80 0000000b c1601ea8 600001d3 0000000b c14b3670 00000001
[    0.549543] 1cc0: c1601d14 c1601ce0 c034ef40 c034b28c c10c0428 00000000 00000000 c1600000
[    0.557839] 1ce0: c17812c4 c160938c c1601ea8 c17812c4 c160938c c1601ea8 600001d3 0000000b
[    0.566136] 1d00: c14b3670 00000001 c1601da4 c1601d18 c030dc88 c034e6b0 c1600220 0000000b
[    0.574431] 1d20: c1600000 c10b0fa4 c10b0f9c 00000008 bf000000 c1600000 00000000 c160938c
[    0.582723] 1d40: 65601d5c 33306131 20393030 30613165 63303031 61316520 30303230 35652038
[    0.591020] 1d60: 30306639 28203832 63383565 30313034 c0002029 c039b8b0 c10b2b9c c11e0410
[    0.599318] 1d80: 0000080d c1601ea8 c16481e8 c1601ea8 c1600000 c11c76ec c1601dbc c1601da8
[    0.607621] 1da0: c0318788 c030d7f0 c1601ea8 c16481e8 c1601de4 c1601dc0 c0318634 c0318720
[    0.615920] 1dc0: 0000006b 0000006b c1609d44 0000080d c0318634 c11e0410 c1601df4 c1601de8
[    0.624215] 1de0: c031864c c03185a8 c1601ea4 c1601df8 c0301230 c0318640 00000000 00000000
[    0.632510] 1e00: c17a7c52 0000006b 600000d3 00000000 600000d3 00000000 0000002b a17104cf
[    0.640810] 1e20: 00000066 6d987e47 00000004 c17605a0 1a0aaaaa 0000000b c1601e5c c1601e48
[    0.649108] 1e40: c039aca8 c039a814 c10c6818 c1601e8c c1601e6c c1601e60 c039bf5c c039ac80
[    0.657409] 1e60: c1601e84 c1601e70 c039b8cc c039bf10 34155555 c1601e8c c1601edc c1601e98
[    0.665707] 1e80: c03bf86c c14b366c 600000d3 ffffffff c1601edc 002d3579 c1601f4c c1601ea8
[    0.674000] 1ea0: c030e438 c03011f4 c17db030 c11e0400 002d3579 00000000 34155555 c1760590
[    0.682294] 1ec0: c17db010 c10d2490 002d3579 00000000 c11c76ec c1601f4c c11e0400 c1601ef8
[    0.690590] 1ee0: 00000018 c14b366c 600000d3 ffffffff 00000051 00000000 00000013 00000014
[    0.698892] 1f00: c1167764 c10d2490 c10d2490 c0db1640 00000001 00000000 00000013 c150dfe4
[    0.707196] 1f20: c17db010 00000000 c17db010 00000011 c1760590 c17db010 c14dfa30 eafff940
[    0.715499] 1f40: c1601f7c c1601f50 c14b39f4 c14b3490 c0c15c8c 00000000 c0c24e4c ea9f81c8
[    0.723798] 1f60: 00000001 c1603c40 ffffffff c1780cc0 c1601f9c c1601f80 c14af0d4 c14b36a8
[    0.732095] 1f80: ffffffff c157cd6c 00000000 c1780cc0 c1601fac c1601fa0 c1404f08 c14af088
[    0.740390] 1fa0: c1601ff4 c1601fb0 c1400c6c c1404ed8 ffffffff ffffffff 00000000 c1400750
[    0.748686] 1fc0: 00000000 c14dfa30 00000000 c1781294 c1603c58 c14dfa2c c160939c 0020406a
[    0.756987] 1fe0: 410fc075 00000000 00000000 c1601ff8 0020807c c1400a18 00000000 00000000
[    0.765303] [<c041c0d8>] (perf_event_task_tick) from [<c0377160>] (scheduler_tick+0xa0/0xe8)
[    0.773878] [<c0377160>] (scheduler_tick) from [<c03b86c0>] (update_process_times+0x60/0x6c)
[    0.782458] [<c03b86c0>] (update_process_times) from [<c03c7e48>] (tick_periodic+0x4c/0xc4)
[    0.790936] [<c03c7e48>] (tick_periodic) from [<c03c7ef8>] (tick_handle_periodic+0x38/0xac)
[    0.799424] [<c03c7ef8>] (tick_handle_periodic) from [<c0c15a18>] (arch_timer_handler_phys+0x40/0x48)
[    0.808795] [<c0c15a18>] (arch_timer_handler_phys) from [<c03a16dc>] (handle_percpu_devid_irq+0x98/0x24c)
[    0.818513] [<c03a16dc>] (handle_percpu_devid_irq) from [<c039c060>] (generic_handle_irq+0x34/0x44)
[    0.827696] [<c039c060>] (generic_handle_irq) from [<c039c684>] (__handle_domain_irq+0x6c/0xc4)
[    0.836529] [<c039c684>] (__handle_domain_irq) from [<c03015cc>] (bcm2836_arm_irqchip_handle_irq+0xb0/0xb4)
[    0.846418] [<c03015cc>] (bcm2836_arm_irqchip_handle_irq) from [<c030e4cc>] (__irq_svc+0x6c/0x90)
[    0.855411] Exception stack(0xc1601c40 to 0xc1601c88)
[    0.860537] 1c40: 00000045 29424000 c16389d8 c16389d8 00000000 0000000b c1601ea8 00000000
[    0.868837] 1c60: 00000000 c1783048 00000001 c1601ccc c1601b70 c1601c90 c039a7b0 c034b4a4
[    0.877129] 1c80: 60000153 ffffffff
[    0.880673] [<c030e4cc>] (__irq_svc) from [<c034b4a4>] (panic+0x228/0x284)
[    0.887662] [<c034b4a4>] (panic) from [<c034ef40>] (do_exit+0x89c/0xae8)
[    0.894472] [<c034ef40>] (do_exit) from [<c030dc88>] (die+0x4a4/0x4bc)
[    0.901100] [<c030dc88>] (die) from [<c0318788>] (__do_kernel_fault.part.0+0x74/0x84)
[    0.909048] [<c0318788>] (__do_kernel_fault.part.0) from [<c0318634>] (do_sect_fault+0x0/0x20)
[    0.917790] [<c0318634>] (do_sect_fault) from [<c031864c>] (do_sect_fault+0x18/0x20)
[    0.925653] [<c031864c>] (do_sect_fault) from [<c0301230>] (do_DataAbort+0x48/0xc4)
[    0.933428] [<c0301230>] (do_DataAbort) from [<c030e438>] (__dabt_svc+0x58/0x80)
[    0.940930] Exception stack(0xc1601ea8 to 0xc1601ef0)
[    0.946055] 1ea0:                   c17db030 c11e0400 002d3579 00000000 34155555 c1760590
[    0.954348] 1ec0: c17db010 c10d2490 002d3579 00000000 c11c76ec c1601f4c c11e0400 c1601ef8
[    0.962638] 1ee0: 00000018 c14b366c 600000d3 ffffffff
[    0.967767] [<c030e438>] (__dabt_svc) from [<c14b366c>] (arch_timer_common_init+0x1e8/0x218)
[    0.976338] [<c14b366c>] (arch_timer_common_init) from [<c14b39f4>] (arch_timer_of_init+0x358/0x374)
[    0.985610] [<c14b39f4>] (arch_timer_of_init) from [<c14af0d4>] (timer_probe+0x58/0xb4)
[    0.993735] [<c14af0d4>] (timer_probe) from [<c1404f08>] (time_init+0x3c/0x40)
[    1.001066] [<c1404f08>] (time_init) from [<c1400c6c>] (start_kernel+0x260/0x3a8)
[    1.008659] [<c1400c6c>] (start_kernel) from [<0020807c>] (0x20807c)
[    1.015105] Code: e7953004 e50b1030 e15a0003 e243701c (e5935000) 
[    1.021292] ---[ end trace f68728a0d3053b52 ]---
[    1.025971] Kernel panic - not syncing: Fatal exception in interrupt
[    1.032428] ---[ end Kernel panic - not syncing: Fatal exception in interrupt





More information about the linux-rpi-kernel mailing list