AnsweredAssumed Answered

i.MX6Q BUG: scheduling while atomic (WARNING: at net/ipv4/tcp_input)

Question asked by Jose Ant Aranda on Dec 19, 2014

Hi

 

From time to time my wandboard was freezing. After some time of trial and error finally I can say with some confidence that the problem has to be related with Transmission. Last time I got the following exception two times:

 

Nov 25 01:45:57 wandboard kernel: ------------[ cut here ]------------
Nov 25 01:45:57 wandboard kernel: WARNING: at net/ipv4/tcp_input.c:2776 tcp_fastretrans_alert+0x168/0x9b4()
Nov 25 01:45:57 wandboard kernel: Modules linked in: binfmt_misc xt_LOG xt_tcpudp nf_conntrack_ipv4 nf_defrag_ipv4 xt_recent xt_conntrack nf_conntrack iptable_filter ip_tables x_tables dwc3 mxc_v4l2_capture ov5640_camera_mipi ipu_bg_overlay_sdc ipu_still ipu_prp_enc ipu_csi_enc ipu_fg_overlay_sdc dwc3_pci
Nov 25 01:45:57 wandboard kernel: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.17-4-ARCH #1
Nov 25 01:45:57 wandboard kernel: [<80013c4c>] (unwind_backtrace+0x0/0xe0) from [<80010d58>] (show_stack+0x10/0x14)
Nov 25 01:45:57 wandboard kernel: [<80010d58>] (show_stack+0x10/0x14) from [<800294c8>] (warn_slowpath_common+0x4c/0x6c)
Nov 25 01:45:57 wandboard kernel: [<800294c8>] (warn_slowpath_common+0x4c/0x6c) from [<80029578>] (warn_slowpath_null+0x18/0x20)
Nov 25 01:45:57 wandboard kernel: [<80029578>] (warn_slowpath_null+0x18/0x20) from [<805e9238>] (tcp_fastretrans_alert+0x168/0x9b4)
Nov 25 01:45:57 wandboard kernel: [<805e9238>] (tcp_fastretrans_alert+0x168/0x9b4) from [<805ea4b8>] (tcp_ack+0x9ac/0xbbc)
Nov 25 01:45:57 wandboard kernel: [<805ea4b8>] (tcp_ack+0x9ac/0xbbc) from [<805eac9c>] (tcp_rcv_established+0x288/0x5dc)
Nov 25 01:45:57 wandboard kernel: [<805eac9c>] (tcp_rcv_established+0x288/0x5dc) from [<805f2618>] (tcp_v4_do_rcv+0xbc/0x318)
Nov 25 01:45:57 wandboard kernel: [<805f2618>] (tcp_v4_do_rcv+0xbc/0x318) from [<805f4760>] (tcp_v4_rcv+0x3a8/0x7ac)
Nov 25 01:45:57 wandboard kernel: [<805f4760>] (tcp_v4_rcv+0x3a8/0x7ac) from [<805d4844>] (ip_local_deliver_finish+0x138/0x2c0)
Nov 25 01:45:57 wandboard kernel: [<805d4844>] (ip_local_deliver_finish+0x138/0x2c0) from [<805d4ce4>] (ip_rcv_finish+0x318/0x394)
Nov 25 01:45:58 wandboard kernel: [<805d4ce4>] (ip_rcv_finish+0x318/0x394) from [<805b06d8>] (__netif_receive_skb_core+0x528/0x5c4)
Nov 25 01:45:58 wandboard kernel: [<805b06d8>] (__netif_receive_skb_core+0x528/0x5c4) from [<805b0f78>] (netif_receive_skb+0x5c/0x9c)
Nov 25 01:45:58 wandboard kernel: [<805b0f78>] (netif_receive_skb+0x5c/0x9c) from [<805b160c>] (napi_gro_receive+0x48/0x98)
Nov 25 01:45:58 wandboard kernel: [<805b160c>] (napi_gro_receive+0x48/0x98) from [<8041eb04>] (fec_enet_rx_napi+0x370/0x720)
Nov 25 01:45:58 wandboard kernel: [<8041eb04>] (fec_enet_rx_napi+0x370/0x720) from [<805b1c64>] (net_rx_action+0xe4/0x1c8)
Nov 25 01:45:58 wandboard kernel: [<805b1c64>] (net_rx_action+0xe4/0x1c8) from [<8003018c>] (__do_softirq+0xec/0x1d0)
Nov 25 01:45:58 wandboard kernel: [<8003018c>] (__do_softirq+0xec/0x1d0) from [<80030308>] (do_softirq+0x48/0x54)
Nov 25 01:45:58 wandboard kernel: [<80030308>] (do_softirq+0x48/0x54) from [<80030550>] (irq_exit+0x74/0xc0)
Nov 25 01:45:58 wandboard kernel: [<80030550>] (irq_exit+0x74/0xc0) from [<8000e1f4>] (handle_IRQ+0x6c/0x90)
Nov 25 01:45:58 wandboard kernel: [<8000e1f4>] (handle_IRQ+0x6c/0x90) from [<8000854c>] (gic_handle_irq+0x3c/0x60)
Nov 25 01:45:58 wandboard kernel: [<8000854c>] (gic_handle_irq+0x3c/0x60) from [<8000d540>] (__irq_svc+0x40/0x50)
Nov 25 01:45:58 wandboard kernel: Exception stack(0x80d13f20 to 0x80d13f68)
Nov 25 01:45:58 wandboard kernel: BUG: scheduling while atomic: swapper/0/0/0x40000100
Nov 25 01:45:58 wandboard kernel: Modules linked in: binfmt_misc xt_LOG xt_tcpudp nf_conntrack_ipv4 nf_defrag_ipv4 xt_recent xt_conntrack nf_conntrack iptable_filter ip_tables x_tables dwc3 mxc_v4l2_capture ov5640_camera_mipi ipu_bg_overlay_sdc ipu_still ipu_prp_enc ipu_csi_enc ipu_fg_overlay_sdc dwc3_pci
Nov 25 01:45:58 wandboard kernel: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.17-4-ARCH #1
Nov 25 01:45:58 wandboard kernel: [<80013c4c>] (unwind_backtrace+0x0/0xe0) from [<80010d58>] (show_stack+0x10/0x14)
Nov 25 01:45:58 wandboard kernel: [<80010d58>] (show_stack+0x10/0x14) from [<806ad314>] (__schedule_bug+0x48/0x64)
Nov 25 01:45:58 wandboard kernel: [<806ad314>] (__schedule_bug+0x48/0x64) from [<806b3488>] (__schedule+0x64/0x71c)
Nov 25 01:45:58 wandboard kernel: [<806b3488>] (__schedule+0x64/0x71c) from [<8004f3a8>] (__cond_resched+0x24/0x34)
Nov 25 01:45:58 wandboard kernel: [<8004f3a8>] (__cond_resched+0x24/0x34) from [<806b3f04>] (_cond_resched+0x3c/0x44)
Nov 25 01:45:58 wandboard kernel: [<806b3f04>] (_cond_resched+0x3c/0x44) from [<80010c08>] (dump_mem+0xa0/0x118)
Nov 25 01:45:58 wandboard kernel: [<80010c08>] (dump_mem+0xa0/0x118) from [<80013d1c>] (unwind_backtrace+0xd0/0xe0)
Nov 25 01:45:58 wandboard kernel: [<80013d1c>] (unwind_backtrace+0xd0/0xe0) from [<80010d58>] (show_stack+0x10/0x14)
Nov 25 01:45:58 wandboard kernel: [<80010d58>] (show_stack+0x10/0x14) from [<800294c8>] (warn_slowpath_common+0x4c/0x6c)
Nov 25 01:45:58 wandboard kernel: [<800294c8>] (warn_slowpath_common+0x4c/0x6c) from [<80029578>] (warn_slowpath_null+0x18/0x20)
Nov 25 01:45:58 wandboard kernel: [<80029578>] (warn_slowpath_null+0x18/0x20) from [<805e9238>] (tcp_fastretrans_alert+0x168/0x9b4)
Nov 25 01:45:58 wandboard kernel: [<805e9238>] (tcp_fastretrans_alert+0x168/0x9b4) from [<805ea4b8>] (tcp_ack+0x9ac/0xbbc)
Nov 25 01:45:58 wandboard kernel: [<805ea4b8>] (tcp_ack+0x9ac/0xbbc) from [<805eac9c>] (tcp_rcv_established+0x288/0x5dc)
Nov 25 01:45:58 wandboard kernel: [<805eac9c>] (tcp_rcv_established+0x288/0x5dc) from [<805f2618>] (tcp_v4_do_rcv+0xbc/0x318)
Nov 25 01:45:58 wandboard kernel: [<805f2618>] (tcp_v4_do_rcv+0xbc/0x318) from [<805f4760>] (tcp_v4_rcv+0x3a8/0x7ac)
Nov 25 01:45:58 wandboard kernel: [<805f4760>] (tcp_v4_rcv+0x3a8/0x7ac) from [<805d4844>] (ip_local_deliver_finish+0x138/0x2c0)
Nov 25 01:45:58 wandboard kernel: [<805d4844>] (ip_local_deliver_finish+0x138/0x2c0) from [<805d4ce4>] (ip_rcv_finish+0x318/0x394)
Nov 25 01:45:58 wandboard kernel: [<805d4ce4>] (ip_rcv_finish+0x318/0x394) from [<805b06d8>] (__netif_receive_skb_core+0x528/0x5c4)
Nov 25 01:45:58 wandboard kernel: [<805b06d8>] (__netif_receive_skb_core+0x528/0x5c4) from [<805b0f78>] (netif_receive_skb+0x5c/0x9c)
Nov 25 01:45:58 wandboard kernel: [<805b0f78>] (netif_receive_skb+0x5c/0x9c) from [<805b160c>] (napi_gro_receive+0x48/0x98)
Nov 25 01:45:58 wandboard kernel: [<805b160c>] (napi_gro_receive+0x48/0x98) from [<8041eb04>] (fec_enet_rx_napi+0x370/0x720)
Nov 25 01:45:58 wandboard kernel: [<8041eb04>] (fec_enet_rx_napi+0x370/0x720) from [<805b1c64>] (net_rx_action+0xe4/0x1c8)
Nov 25 01:45:58 wandboard kernel: [<805b1c64>] (net_rx_action+0xe4/0x1c8) from [<8003018c>] (__do_softirq+0xec/0x1d0)
Nov 25 01:45:58 wandboard kernel: [<8003018c>] (__do_softirq+0xec/0x1d0) from [<80030308>] (do_softirq+0x48/0x54)
Nov 25 01:45:58 wandboard kernel: [<80030308>] (do_softirq+0x48/0x54) from [<80030550>] (irq_exit+0x74/0xc0)
Nov 25 01:45:58 wandboard kernel: [<80030550>] (irq_exit+0x74/0xc0) from [<8000e1f4>] (handle_IRQ+0x6c/0x90)
Nov 25 01:45:58 wandboard kernel: [<8000e1f4>] (handle_IRQ+0x6c/0x90) from [<8000854c>] (gic_handle_irq+0x3c/0x60)
Nov 25 01:45:58 wandboard kernel: [<8000854c>] (gic_handle_irq+0x3c/0x60) from [<8000d540>] (__irq_svc+0x40/0x50)
Nov 25 01:45:58 wandboard kernel: Exception stack(0x80d13f20 to 0x80d13f68)
Nov 25 01:45:58 wandboard kernel: 3f20: 80d13f68 00000564 521e459c 00000564 51d21cec 00000564 00000000 81c04138
Nov 25 01:45:58 wandboard kernel: 3f40: 80d20d28 80d20d28 80ddbaa4 00000000 00000009 80d13f68 80063738 804f60e8
Nov 25 01:45:58 wandboard kernel: 3f60: 600f0013 ffffffff
Nov 25 01:45:58 wandboard kernel: [<8000d540>] (__irq_svc+0x40/0x50) from [<804f60e8>] (cpuidle_enter_state+0x50/0xd8)
Nov 25 01:45:58 wandboard kernel: [<804f60e8>] (cpuidle_enter_state+0x50/0xd8) from [<804f6250>] (cpuidle_idle_call+0xe0/0x144)
Nov 25 01:45:58 wandboard kernel: [<804f6250>] (cpuidle_idle_call+0xe0/0x144) from [<8000e4d8>] (arch_cpu_idle+0x10/0x48)
Nov 25 01:45:58 wandboard kernel: [<8000e4d8>] (arch_cpu_idle+0x10/0x48) from [<80062f5c>] (cpu_startup_entry+0xb8/0x11c)
Nov 25 01:45:58 wandboard kernel: [<80062f5c>] (cpu_startup_entry+0xb8/0x11c) from [<80cc0a48>] (start_kernel+0x2e8/0x348)
Nov 25 01:45:58 wandboard kernel: 3f20: 80d13f68 00000564 521e459c 00000564 51d21cec 00000564 00000000 81c04138
Nov 25 01:45:58 wandboard kernel: 3f40: 80d20d28 80d20d28 80ddbaa4 00000000 00000009 80d13f68 80063738 804f60e8
Nov 25 01:45:58 wandboard kernel: 3f60: 600f0013 ffffffff
Nov 25 01:45:58 wandboard kernel: [<8000d540>] (__irq_svc+0x40/0x50) from [<804f60e8>] (cpuidle_enter_state+0x50/0xd8)
Nov 25 01:45:58 wandboard kernel: [<804f60e8>] (cpuidle_enter_state+0x50/0xd8) from [<804f6250>] (cpuidle_idle_call+0xe0/0x144)
Nov 25 01:45:58 wandboard kernel: [<804f6250>] (cpuidle_idle_call+0xe0/0x144) from [<8000e4d8>] (arch_cpu_idle+0x10/0x48)
Nov 25 01:45:58 wandboard kernel: [<8000e4d8>] (arch_cpu_idle+0x10/0x48) from [<80062f5c>] (cpu_startup_entry+0xb8/0x11c)
Nov 25 01:45:58 wandboard kernel: [<80062f5c>] (cpu_startup_entry+0xb8/0x11c) from [<80cc0a48>] (start_kernel+0x2e8/0x348)
Nov 25 01:45:58 wandboard kernel: ---[ end trace 106bbc97172dea2f ]---

 

I have to say that this exception is not the last journalctl message before system hangs, but it happens when I have Transmission running. I have tried changing TX_RING_SIZE as suggested on http://thread.gmane.org/gmane.linux.ports.arm.kernel/271108 without luck.

 

 

I have tried also powering the Wandboard with a 2A/5V power supply and the hdd with a 3A/5V power supply to discard power supply problems. System hanging was still happening. Did anyone have a similar problem?

 

 

Kernel version: (Archlinux) 3.10.17-4-ARCH #1 SMP Wed Oct 15 20:41:37 MDT 2014 armv7l GNU/Linux

Outcomes