Chinaunix首页 | 论坛 | 博客
  • 博客访问: 796700
  • 博文数量: 81
  • 博客积分: 612
  • 博客等级: 中士
  • 技术积分: 1216
  • 用 户 组: 普通用户
  • 注册时间: 2012-01-03 14:38
个人简介

蝴蝶翅膀的力量,也许能够改变这个世界。

文章分类

全部博文(81)

文章存档

2020年(2)

2019年(2)

2018年(6)

2017年(2)

2016年(5)

2015年(7)

2014年(20)

2013年(12)

2012年(25)

分类: 嵌入式

2015-01-30 21:22:22

如果串口持续打印下面的信息,说明代码中出现了异常,程序一致占据了cpu不释放。cpu在调度中检测到了这种异常,在串口中打印出内核异常位置的调用栈。

这种检查内核缺省是打开的,CONFIG_RCU_CPU_STALL_TIMEOUT 参数是时间,如果cpu占据时间超过该参数,则会打印。在我调试的单板上缺省为60秒。

这种问题一般出现在内核程序出现了死循环的现象。因此通过调用栈信息很快能够找到程序的异常点。

详细的说明在 https://www.kernel.org/doc/Documentation/RCU/stallwarn.txt

/ # INFO: rcu_sched self-detected stall on CPU { 0}  (t=6000 jiffies g=982
c=981 q=24066)
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.20-rt14-Cavium-Octeon+ #129 Stack : 0000000000000001 ffffffff80890000 0000000000000001 ffffffff8015ed84
          0000000000006478 ffffffffffffffff 000000000000004a
0000000000000001
          000000000000000f 0000000000000000 0000000000000006
0000000000000000
          0000000000000000 000000000000004a 0000000000000000
ffffffff8015f480
          0000000000000000 ffffffff80890000 ffffffff80690a68
ffffffff80749277
          ffffffff80897380 ffffffff80749678 0000000000000000
0000000000000000
          ffffffff80740000 0000000000000001 ffffffff8073f438
ffffffff8055f004
          ffffffff80722f68 ffffffff80722e60 ffffffff80786a80
ffffffff801ae9b8
          ffffffff80749360 ffffffff80690a68 0000000000000000
0000000000000000
          0000000000000000 ffffffff80143364 0000000000000000
0000000000000000
          ...
Call Trace:
[] show_stack+0x48/0x70 
[] rcu_check_callbacks+0x1c4/0x688 
[] update_process_times+0x48/0x7c 
[] tick_sched_timer+0x130/0x168 
[] __run_hrtimer.isra.20+0x74/0xf4
[] hrtimer_interrupt+0x124/0x29c 
[] c0_compare_interrupt+0x6c/0x80 
[] handle_irq_event_percpu+0x74/0x204
[] handle_percpu_irq+0x8c/0xbc 
[] generic_handle_irq+0x28/0x44
[] do_IRQ+0x18/0x28 
[] plat_irq_dispatch+0x84/0xa4 
[] ret_from_irq+0x0/0x4 
[] strlen+0x14/0x24
[] ipt_aptl_file_hook+0x18c/0x4f8 
[] ipt_aptl_filter_hook+0x208/0x3c4 
[] mw_forward_hook+0xb4/0x18c
[] nf_iterate+0x98/0x108 
[] nf_hook_slow+0x90/0x190
[] ip_forward+0x358/0x388 
[] ip_rcv+0x8f0/0x9f4 
[] __netif_receive_skb_core+0x678/0x6fc
[] netif_receive_skb+0x60/0xb4
[] cvm_oct_napi_poll_38+0x97c/0xaf0
[] net_rx_action+0xf0/0x21c
[] __do_softirq+0x110/0x208
[] do_softirq+0x4c/0x68
[] irq_exit+0x58/0x74
[] plat_irq_dispatch+0x68/0xa4
[] ret_from_irq+0x0/0x4 
[] __r4k_wait+0x20/0x40
[] cpu_startup_entry+0xc8/0x124 
[] start_kernel+0x47c/0x49c


/ # INFO: rcu_sched self-detected stall on CPU { 0}  (t=6000 jiffies g=1622
c=1621 q=23708)
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.20-rt14-Cavium-Octeon+ #153 Stack : 0000000000000001 ffffffff80890000 0000000000000001 ffffffff8015ed84
          00000000000063f8 ffffffffffffffff 000000000000004a
0000000000000001
          000000000000000f 0000000000000000 0000000000000006
0000000000000000
          0000000000000000 000000000000004a 0000000000000000
ffffffff8015f480
          0000000000000000 ffffffff80890000 ffffffff80690a68
ffffffff80749277
          ffffffff80897380 ffffffff80749678 0000000000000000
0000000000000000
          ffffffff80740000 0000000000000001 ffffffff8073f438
ffffffff8055f134
          ffffffff80722f68 ffffffff80722e60 ffffffff80786a80
ffffffff801ae9b8
          ffffffff80749360 ffffffff80690a68 0000000000000000
0000000000000000
          0000000000000000 ffffffff80143364 0000000000000000
0000000000000000
          ...
Call Trace:
[] show_stack+0x48/0x70 
[] rcu_check_callbacks+0x1c4/0x688 
[] update_process_times+0x48/0x7c 
[] tick_sched_timer+0x130/0x168 
[] __run_hrtimer.isra.20+0x74/0xf4 
[] hrtimer_interrupt+0x124/0x29c 
[] c0_compare_interrupt+0x6c/0x80 
[] handle_irq_event_percpu+0x74/0x204
[] handle_percpu_irq+0x8c/0xbc 
[] generic_handle_irq+0x28/0x44 
[] do_IRQ+0x18/0x28 
[] plat_irq_dispatch+0x84/0xa4 
[] ret_from_irq+0x0/0x4 
[] strlen+0x8/0x24 
[] ipt_aptl_file_hook+0x1a0/0x57c 
[] ipt_aptl_filter_hook+0x208/0x3c4 
[] mw_forward_hook+0xb4/0x18c 
[] nf_iterate+0x98/0x108 
[] nf_hook_slow+0x90/0x190
[] ip_forward+0x358/0x388 
[] ip_rcv+0x8f0/0x9f4 
[] __netif_receive_skb_core+0x678/0x6fc
[] netif_receive_skb+0x60/0xb4 
[] cvm_oct_napi_poll_38+0x97c/0xaf0 
[] net_rx_action+0xf0/0x21c 
[] __do_softirq+0x110/0x208 
[] do_softirq+0x4c/0x68 
[] irq_exit+0x58/0x74 
[] plat_irq_dispatch+0x68/0xa4 
[] ret_from_irq+0x0/0x4 
[] __r4k_wait+0x20/0x40 
[] cpu_startup_entry+0xc8/0x124 
[] start_kernel+0x47c/0x49c
阅读(7569) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~