Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755633Ab2FFJzJ (ORCPT ); Wed, 6 Jun 2012 05:55:09 -0400 Received: from hosting.visp.net.lb ([194.146.153.11]:53235 "EHLO hosting.visp.net.lb" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755433Ab2FFJzG (ORCPT ); Wed, 6 Jun 2012 05:55:06 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 06 Jun 2012 12:54:56 +0300 From: Denys Fedoryshchenko To: , , Subject: Deadlock, L2TP over IP are not working, 3.4.1 Message-ID: <7ed49f446365ac625437702d92946add@visp.net.lb> User-Agent: VISP Webmail/0.7.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 20382 Lines: 409 It seems l2tp are not working, at least for me, due some bug Script i uses, to reproduce: SERVER=192.168.11.2 LOCALIP=`curl http://${SERVER}:8080/myip` ID=`curl http://${SERVER}:8080/tunid` # It will generate some number, let's say 2 echo ID: ${ID} modprobe l2tp_ip modprobe l2tp_eth ip l2tp add tunnel remote ${SERVER} local ${LOCALIP} tunnel_id ${ID} peer_tunnel_id ${ID} encap ip ip l2tp add session name tun100 tunnel_id ${ID} session_id 1 peer_session_id 1 ip link set dev tun100 up ip addr add dev tun100 10.0.6.${ID}/24 Here is report for latest stable kernel. I can reproduce it on multiple pc's. It is new setup, so i am not sure it was working on old kernels or not (regression or not). [ 8683.927442] ====================================================== [ 8683.927555] [ INFO: possible circular locking dependency detected ] [ 8683.927672] 3.4.1-build-0061 #14 Not tainted [ 8683.927782] ------------------------------------------------------- [ 8683.927895] swapper/0/0 is trying to acquire lock: [ 8683.928007] (slock-AF_INET){+.-...}, at: [] l2tp_xmit_skb+0x173/0x47e [l2tp_core] [ 8683.928121] [ 8683.928121] but task is already holding lock: [ 8683.928121] (_xmit_ETHER#2){+.-...}, at: [] sch_direct_xmit+0x36/0x119 [ 8683.928121] [ 8683.928121] which lock already depends on the new lock. [ 8683.928121] [ 8683.928121] [ 8683.928121] the existing dependency chain (in reverse order) is: [ 8683.928121] [ 8683.928121] -> #1 (_xmit_ETHER#2){+.-...}: [ 8683.928121] [] lock_acquire+0x71/0x85 [ 8683.928121] [] _raw_spin_lock+0x33/0x40 [ 8683.928121] [] ip_send_reply+0xf2/0x1ce [ 8683.928121] [] tcp_v4_send_reset+0x153/0x16f [ 8683.928121] [] tcp_v4_do_rcv+0x172/0x194 [ 8683.928121] [] tcp_v4_rcv+0x387/0x5a0 [ 8683.928121] [] ip_local_deliver_finish+0x13a/0x1e9 [ 8683.928121] [] NF_HOOK.clone.11+0x46/0x4d [ 8683.928121] [] ip_local_deliver+0x41/0x45 [ 8683.928121] [] ip_rcv_finish+0x31a/0x33c [ 8683.928121] [] NF_HOOK.clone.11+0x46/0x4d [ 8683.928121] [] ip_rcv+0x201/0x23d [ 8683.928121] [] __netif_receive_skb+0x329/0x378 [ 8683.928121] [] netif_receive_skb+0x4e/0x7d [ 8683.928121] [] rtl8139_poll+0x243/0x33d [8139too] [ 8683.928121] [] net_rx_action+0x90/0x15d [ 8683.928121] [] __do_softirq+0x7b/0x118 [ 8683.928121] [ 8683.928121] -> #0 (slock-AF_INET){+.-...}: [ 8683.928121] [] __lock_acquire+0x9a3/0xc27 [ 8683.928121] [] lock_acquire+0x71/0x85 [ 8683.928121] [] _raw_spin_lock+0x33/0x40 [ 8683.928121] [] l2tp_xmit_skb+0x173/0x47e [l2tp_core] [ 8683.928121] [] l2tp_eth_dev_xmit+0x1a/0x2f [l2tp_eth] [ 8683.928121] [] dev_hard_start_xmit+0x333/0x3f2 [ 8683.928121] [] sch_direct_xmit+0x55/0x119 [ 8683.928121] [] dev_queue_xmit+0x282/0x418 [ 8683.928121] [] NF_HOOK.clone.19+0x45/0x4c [ 8683.928121] [] arp_xmit+0x22/0x24 [ 8683.928121] [] arp_send+0x41/0x48 [ 8683.928121] [] arp_process+0x289/0x491 [ 8683.928121] [] NF_HOOK.clone.19+0x45/0x4c [ 8683.928121] [] arp_rcv+0xb1/0xc3 [ 8683.928121] [] __netif_receive_skb+0x329/0x378 [ 8683.928121] [] process_backlog+0x69/0x130 [ 8683.928121] [] net_rx_action+0x90/0x15d [ 8683.928121] [] __do_softirq+0x7b/0x118 [ 8683.928121] [ 8683.928121] other info that might help us debug this: [ 8683.928121] [ 8683.928121] Possible unsafe locking scenario: [ 8683.928121] [ 8683.928121] CPU0 CPU1 [ 8683.928121] ---- ---- [ 8683.928121] lock(_xmit_ETHER#2); [ 8683.928121] lock(slock-AF_INET); [ 8683.928121] lock(_xmit_ETHER#2); [ 8683.928121] lock(slock-AF_INET); [ 8683.928121] [ 8683.928121] *** DEADLOCK *** [ 8683.928121] [ 8683.928121] 3 locks held by swapper/0/0: [ 8683.928121] #0: (rcu_read_lock){.+.+..}, at: [] rcu_lock_acquire+0x0/0x30 [ 8683.928121] #1: (rcu_read_lock_bh){.+....}, at: [] rcu_lock_acquire+0x0/0x30 [ 8683.928121] #2: (_xmit_ETHER#2){+.-...}, at: [] sch_direct_xmit+0x36/0x119 [ 8683.928121] [ 8683.928121] stack backtrace: [ 8683.928121] Pid: 0, comm: swapper/0 Not tainted 3.4.1-build-0061 #14 [ 8683.928121] Call Trace: [ 8683.928121] [] ? printk+0x18/0x1a [ 8683.928121] [] print_circular_bug+0x1ac/0x1b6 [ 8683.928121] [] __lock_acquire+0x9a3/0xc27 [ 8683.928121] [] lock_acquire+0x71/0x85 [ 8683.928121] [] ? l2tp_xmit_skb+0x173/0x47e [l2tp_core] [ 8683.928121] [] _raw_spin_lock+0x33/0x40 [ 8683.928121] [] ? l2tp_xmit_skb+0x173/0x47e [l2tp_core] [ 8683.928121] [] l2tp_xmit_skb+0x173/0x47e [l2tp_core] [ 8683.928121] [] l2tp_eth_dev_xmit+0x1a/0x2f [l2tp_eth] [ 8683.928121] [] dev_hard_start_xmit+0x333/0x3f2 [ 8683.928121] [] sch_direct_xmit+0x55/0x119 [ 8683.928121] [] dev_queue_xmit+0x282/0x418 [ 8683.928121] [] ? dev_hard_start_xmit+0x3f2/0x3f2 [ 8683.928121] [] NF_HOOK.clone.19+0x45/0x4c [ 8683.928121] [] arp_xmit+0x22/0x24 [ 8683.928121] [] ? dev_hard_start_xmit+0x3f2/0x3f2 [ 8683.928121] [] arp_send+0x41/0x48 [ 8683.928121] [] arp_process+0x289/0x491 [ 8683.928121] [] ? __neigh_lookup.clone.20+0x42/0x42 [ 8683.928121] [] NF_HOOK.clone.19+0x45/0x4c [ 8683.928121] [] arp_rcv+0xb1/0xc3 [ 8683.928121] [] ? __neigh_lookup.clone.20+0x42/0x42 [ 8683.928121] [] __netif_receive_skb+0x329/0x378 [ 8683.928121] [] process_backlog+0x69/0x130 [ 8683.928121] [] net_rx_action+0x90/0x15d [ 8683.928121] [] __do_softirq+0x7b/0x118 [ 8683.928121] [] ? local_bh_enable+0xd/0xd [ 8683.928121] [] ? irq_exit+0x41/0x91 [ 8683.928121] [] ? do_IRQ+0x79/0x8d [ 8683.928121] [] ? trace_hardirqs_off_caller+0x2e/0x86 [ 8683.928121] [] ? common_interrupt+0x2e/0x34 [ 8683.928121] [] ? default_idle+0x23/0x38 [ 8683.928121] [] ? cpu_idle+0x55/0x6f [ 8683.928121] [] ? rest_init+0xa1/0xa7 [ 8683.928121] [] ? __read_lock_failed+0x14/0x14 [ 8683.928121] [] ? start_kernel+0x303/0x30a [ 8683.928121] [] ? repair_env_string+0x51/0x51 [ 8683.928121] [] ? i386_start_kernel+0xa8/0xaf [158595.436934] [158595.437018] ====================================================== [158595.437111] [ INFO: possible circular locking dependency detected ] [158595.437198] 3.4.0-build-0061 #12 Tainted: G W [158595.437281] ------------------------------------------------------- [158595.437365] swapper/0/0 is trying to acquire lock: [158595.437447] (slock-AF_INET){+.-...}, at: [] l2tp_xmit_skb+0x173/0x47e [l2tp_core] [158595.437613] [158595.437613] but task is already holding lock: [158595.437763] (_xmit_ETHER#2){+.-...}, at: [] sch_direct_xmit+0x36/0x119 [158595.437837] [158595.437837] which lock already depends on the new lock. [158595.437837] [158595.437837] [158595.437837] the existing dependency chain (in reverse order) is: [158595.437837] [158595.437837] -> #1 (_xmit_ETHER#2){+.-...}: [158595.437837] [] lock_acquire+0x71/0x85 [158595.437837] [] _raw_spin_lock_irqsave+0x40/0x50 [158595.437837] [] get_page_from_freelist+0x227/0x398 [158595.437837] [] __alloc_pages_nodemask+0xef/0x5f9 [158595.437837] [] alloc_slab_page+0x1d/0x21 [158595.437837] [] new_slab+0x4c/0x164 [158595.437837] [] __slab_alloc.clone.59.clone.64+0x247/0x2de [158595.437837] [] __kmalloc_track_caller+0x55/0xa4 [158595.437837] [] __alloc_skb+0x51/0x100 [158595.437837] [] sock_alloc_send_pskb+0x9e/0x263 [158595.437837] [] sock_alloc_send_skb+0x18/0x1d [158595.437837] [] __ip_append_data.clone.52+0x302/0x6dc [158595.437837] [] ip_append_data+0x80/0x88 [158595.437837] [] icmp_push_reply+0x5c/0x101 [158595.437837] [] icmp_send+0x31d/0x342 [158595.437837] [] send_unreach+0x19/0x1b [ipt_REJECT] [158595.437837] [] reject_tg+0x53/0x2de [ipt_REJECT] [158595.437837] [] ipt_do_table+0x3ad/0x410 [158595.437837] [] iptable_filter_hook+0x56/0x5e [iptable_filter] [158595.437837] [] nf_iterate+0x36/0x5c [158595.437837] [] nf_hook_slow+0x58/0xf1 [158595.437837] [] ip_forward+0x295/0x2a2 [158595.437837] [] ip_rcv_finish+0x31a/0x33c [158595.437837] [] NF_HOOK.clone.11+0x46/0x4d [158595.437837] [] ip_rcv+0x201/0x23d [158595.437837] [] __netif_receive_skb+0x329/0x378 [158595.437837] [] netif_receive_skb+0x4e/0x7d [158595.437837] [] napi_skb_finish+0x1e/0x34 [158595.437837] [] napi_gro_receive+0x20/0x24 [158595.437837] [] rtl8169_poll+0x2e6/0x52c [r8169] [158595.437837] [] net_rx_action+0x90/0x15d [158595.437837] [] __do_softirq+0x7b/0x118 [158595.437837] [158595.437837] -> #0 (slock-AF_INET){+.-...}: [158595.437837] [] __lock_acquire+0x9a3/0xc27 [158595.437837] [] lock_acquire+0x71/0x85 [158595.437837] [] _raw_spin_lock+0x33/0x40 [158595.437837] [] l2tp_xmit_skb+0x173/0x47e [l2tp_core] [158595.437837] [] l2tp_eth_dev_xmit+0x1a/0x2f [l2tp_eth] [158595.437837] [] dev_hard_start_xmit+0x333/0x3f2 [158595.437837] [] sch_direct_xmit+0x55/0x119 [158595.437837] [] dev_queue_xmit+0x282/0x418 [158595.437837] [] NF_HOOK.clone.19+0x45/0x4c [158595.437837] [] arp_xmit+0x22/0x24 [158595.437837] [] arp_send+0x41/0x48 [158595.437837] [] arp_process+0x289/0x491 [158595.437837] [] NF_HOOK.clone.19+0x45/0x4c [158595.437837] [] arp_rcv+0xb1/0xc3 [158595.437837] [] __netif_receive_skb+0x329/0x378 [158595.437837] [] process_backlog+0x69/0x130 [158595.437837] [] net_rx_action+0x90/0x15d [158595.437837] [] __do_softirq+0x7b/0x118 [158595.437837] [158595.437837] other info that might help us debug this: [158595.437837] [158595.437837] Possible unsafe locking scenario: [158595.437837] [158595.437837] CPU0 CPU1 [158595.437837] ---- ---- [158595.437837] lock(_xmit_ETHER#2); [158595.437837] lock(slock-AF_INET); [158595.437837] lock(_xmit_ETHER#2); [158595.437837] lock(slock-AF_INET); [158595.437837] [158595.437837] *** DEADLOCK *** [158595.437837] [158595.437837] 3 locks held by swapper/0/0: [158595.437837] #0: (rcu_read_lock){.+.+..}, at: [] rcu_lock_acquire+0x0/0x30 [158595.437837] #1: (rcu_read_lock_bh){.+....}, at: [] rcu_lock_acquire+0x0/0x30 [158595.437837] #2: (_xmit_ETHER#2){+.-...}, at: [] sch_direct_xmit+0x36/0x119 [158595.437837] [158595.437837] stack backtrace: [158595.437837] Pid: 0, comm: swapper/0 Tainted: G W 3.4.0-build-0061 #12 [158595.437837] Call Trace: [158595.437837] [] ? printk+0x18/0x1a [158595.437837] [] print_circular_bug+0x1ac/0x1b6 [158595.437837] [] __lock_acquire+0x9a3/0xc27 [158595.437837] [] lock_acquire+0x71/0x85 [158595.437837] [] ? l2tp_xmit_skb+0x173/0x47e [l2tp_core] [158595.437837] [] _raw_spin_lock+0x33/0x40 [158595.437837] [] ? l2tp_xmit_skb+0x173/0x47e [l2tp_core] [158595.437837] [] l2tp_xmit_skb+0x173/0x47e [l2tp_core] [158595.437837] [] l2tp_eth_dev_xmit+0x1a/0x2f [l2tp_eth] [158595.437837] [] dev_hard_start_xmit+0x333/0x3f2 [158595.437837] [] sch_direct_xmit+0x55/0x119 [158595.437837] [] dev_queue_xmit+0x282/0x418 [158595.437837] [] ? dev_hard_start_xmit+0x3f2/0x3f2 [158595.437837] [] NF_HOOK.clone.19+0x45/0x4c [158595.437837] [] arp_xmit+0x22/0x24 [158595.437837] [] ? dev_hard_start_xmit+0x3f2/0x3f2 [158595.437837] [] arp_send+0x41/0x48 [158595.437837] [] arp_process+0x289/0x491 [158595.437837] [] ? __neigh_lookup.clone.20+0x42/0x42 [158595.437837] [] NF_HOOK.clone.19+0x45/0x4c [158595.437837] [] arp_rcv+0xb1/0xc3 [158595.437837] [] ? __neigh_lookup.clone.20+0x42/0x42 [158595.437837] [] __netif_receive_skb+0x329/0x378 [158595.437837] [] process_backlog+0x69/0x130 [158595.437837] [] net_rx_action+0x90/0x15d [158595.437837] [] __do_softirq+0x7b/0x118 [158595.437837] [] ? do_send_specific+0xb/0x8f [158595.437837] [] ? local_bh_enable+0xd/0xd [158595.437837] [] ? irq_exit+0x41/0x91 [158595.437837] [] ? do_IRQ+0x79/0x8d [158595.437837] [] ? trace_hardirqs_off_caller+0x2e/0x86 [158595.437837] [] ? common_interrupt+0x2e/0x34 [158595.437837] [] ? ktime_get_ts+0x8f/0x9b [158595.437837] [] ? mwait_idle+0x50/0x5a [158595.437837] [] ? cpu_idle+0x55/0x6f [158595.437837] [] ? rest_init+0xa1/0xa7 [158595.437837] [] ? __read_lock_failed+0x14/0x14 [158595.437837] [] ? start_kernel+0x30d/0x314 [158595.437837] [] ? repair_env_string+0x51/0x51 [158595.437837] [] ? i386_start_kernel+0xa8/0xaf [63546.808787] [63546.809025] ====================================================== [63546.809259] [ INFO: possible circular locking dependency detected ] [63546.809494] 3.4.1-build-0061 #14 Not tainted [63546.809685] ------------------------------------------------------- [63546.809685] swapper/0/0 is trying to acquire lock: [63546.809685] (slock-AF_INET){+.-...}, at: [] l2tp_xmit_skb+0x173/0x47e [l2tp_core] [63546.809685] [63546.809685] but task is already holding lock: [63546.809685] (_xmit_ETHER#2){+.-...}, at: [] sch_direct_xmit+0x36/0x119 [63546.809685] [63546.809685] which lock already depends on the new lock. [63546.809685] [63546.809685] [63546.809685] the existing dependency chain (in reverse order) is: [63546.809685] [63546.809685] -> #1 (_xmit_ETHER#2){+.-...}: [63546.809685] [] lock_acquire+0x71/0x85 [63546.809685] [] _raw_spin_lock_bh+0x38/0x45 [63546.809685] [] ppp_push+0x59/0x4b3 [63546.809685] [] ppp_xmit_process+0x41b/0x4be [63546.809685] [] ppp_write+0x90/0xa1 [63546.809685] [] vfs_write+0x7e/0xab [63546.809685] [] sys_write+0x3d/0x5e [63546.809685] [] syscall_call+0x7/0xb [63546.809685] [63546.809685] -> #0 (slock-AF_INET){+.-...}: [63546.809685] [] __lock_acquire+0x9a3/0xc27 [63546.809685] [] lock_acquire+0x71/0x85 [63546.809685] [] _raw_spin_lock+0x33/0x40 [63546.809685] [] l2tp_xmit_skb+0x173/0x47e [l2tp_core] [63546.809685] [] l2tp_eth_dev_xmit+0x1a/0x2f [l2tp_eth] [63546.809685] [] dev_hard_start_xmit+0x333/0x3f2 [63546.809685] [] sch_direct_xmit+0x55/0x119 [63546.809685] [] dev_queue_xmit+0x282/0x418 [63546.809685] [] NF_HOOK.clone.19+0x45/0x4c [63546.809685] [] arp_xmit+0x22/0x24 [63546.809685] [] arp_send+0x41/0x48 [63546.809685] [] arp_process+0x289/0x491 [63546.809685] [] NF_HOOK.clone.19+0x45/0x4c [63546.809685] [] arp_rcv+0xb1/0xc3 [63546.809685] [] __netif_receive_skb+0x329/0x378 [63546.809685] [] process_backlog+0x69/0x130 [63546.809685] [] net_rx_action+0x90/0x15d [63546.809685] [] __do_softirq+0x7b/0x118 [63546.809685] [63546.809685] other info that might help us debug this: [63546.809685] [63546.809685] Possible unsafe locking scenario: [63546.809685] [63546.809685] CPU0 CPU1 [63546.809685] ---- ---- [63546.809685] lock(_xmit_ETHER#2); [63546.809685] lock(slock-AF_INET); [63546.809685] lock(_xmit_ETHER#2); [63546.809685] lock(slock-AF_INET); [63546.809685] [63546.809685] *** DEADLOCK *** [63546.809685] [63546.809685] 3 locks held by swapper/0/0: [63546.809685] #0: (rcu_read_lock){.+.+..}, at: [] rcu_lock_acquire+0x0/0x30 [63546.809685] #1: (rcu_read_lock_bh){.+....}, at: [] rcu_lock_acquire+0x0/0x30 [63546.809685] #2: (_xmit_ETHER#2){+.-...}, at: [] sch_direct_xmit+0x36/0x119 [63546.809685] [63546.809685] stack backtrace: [63546.809685] Pid: 0, comm: swapper/0 Not tainted 3.4.1-build-0061 #14 [63546.809685] Call Trace: [63546.809685] [] ? printk+0x18/0x1a [63546.809685] [] print_circular_bug+0x1ac/0x1b6 [63546.809685] [] __lock_acquire+0x9a3/0xc27 [63546.809685] [] lock_acquire+0x71/0x85 [63546.809685] [] ? l2tp_xmit_skb+0x173/0x47e [l2tp_core] [63546.809685] [] _raw_spin_lock+0x33/0x40 [63546.809685] [] ? l2tp_xmit_skb+0x173/0x47e [l2tp_core] [63546.809685] [] l2tp_xmit_skb+0x173/0x47e [l2tp_core] [63546.809685] [] l2tp_eth_dev_xmit+0x1a/0x2f [l2tp_eth] [63546.809685] [] dev_hard_start_xmit+0x333/0x3f2 [63546.809685] [] sch_direct_xmit+0x55/0x119 [63546.809685] [] dev_queue_xmit+0x282/0x418 [63546.809685] [] ? dev_hard_start_xmit+0x3f2/0x3f2 [63546.809685] [] NF_HOOK.clone.19+0x45/0x4c [63546.809685] [] arp_xmit+0x22/0x24 [63546.809685] [] ? dev_hard_start_xmit+0x3f2/0x3f2 [63546.809685] [] arp_send+0x41/0x48 [63546.809685] [] arp_process+0x289/0x491 [63546.809685] [] ? __neigh_lookup.clone.20+0x42/0x42 [63546.809685] [] NF_HOOK.clone.19+0x45/0x4c [63546.809685] [] arp_rcv+0xb1/0xc3 [63546.809685] [] ? __neigh_lookup.clone.20+0x42/0x42 [63546.809685] [] __netif_receive_skb+0x329/0x378 [63546.809685] [] process_backlog+0x69/0x130 [63546.809685] [] net_rx_action+0x90/0x15d [63546.809685] [] __do_softirq+0x7b/0x118 [63546.809685] [] ? local_bh_enable+0xd/0xd [63546.809685] [] ? local_bh_enable+0xd/0xd [63546.809685] [] ? irq_exit+0x41/0x91 [63546.809685] [] ? do_IRQ+0x79/0x8d [63546.809685] [] ? trace_hardirqs_off_caller+0x2e/0x86 [63546.809685] [] ? common_interrupt+0x2e/0x34 [63546.809685] [] ? do_gettimeofday+0x20/0x29 [63546.809685] [] ? mwait_idle+0x50/0x5a [63546.809685] [] ? cpu_idle+0x55/0x6f [63546.809685] [] ? rest_init+0xa1/0xa7 [63546.809685] [] ? __read_lock_failed+0x14/0x14 [63546.809685] [] ? start_kernel+0x303/0x30a [63546.809685] [] ? repair_env_string+0x51/0x51 [63546.809685] [] ? i386_start_kernel+0xa8/0xaf --- Denys Fedoryshchenko, Network Engineer, Virtual ISP S.A.L. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/