From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 301E23BA8E for ; Sat, 5 Jan 2019 05:59:22 -0500 (EST) Received: by mail-wm1-x344.google.com with SMTP id n190so3178929wmd.0 for ; Sat, 05 Jan 2019 02:59:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heistp.net; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=fxBbsRbW/lklLl+BeM8zPMESLGo2PW7bbEx8xHYBTKw=; b=YZp18LnU/0ceK4rE9w7d3Iq6skcm2+7N+xwVhAgB2W5023nQoaQLKcvV4QO3O5T1Yi P0EdwPhQ9pYDxyoMCAFzhpJiARrFpdr+5Id3V6MpQkgPUxaSqnW6qhO6OPQZMUexbMo2 HJKDLCcVur6niUW0BZHpAs4GBBgScsv3auuqOCquXzqb5T/ECFbsNANESLviFYlgSPdK q74ZM+0yNHxDMjomVp+k/nfRt1cqFA7zG+ITSPvJnV56ISITf9EVv7SS+sNWFrKdsHGA 5LH7QETKCUAdYaPG4/ReFarPjrnTuPanMJvmzhevroUGs91ZiCdpO0tSXsnOJsqoL/AJ 6gJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=fxBbsRbW/lklLl+BeM8zPMESLGo2PW7bbEx8xHYBTKw=; b=ChBDSABqYUM245fNQkTD8Z/Elh7DYGEhB/cQnzWpGajGitPAb6laLwN0twG4KSsc2o unbYCnOhYax02nUL4JeplrS3Y3bTv/bRoz/yAcZ/T4+emfEMnZgy01GqiFaKQYgAyDV/ sA3AVw4zgk/a1YUjb5Yjx6ZGQ/TIOay2SEw+b7TifNOy+W9hadA+c9RTQlTMn+7tyTqc EeV5hWGddykUOoMFiR1gTWQlCFAOgj+XVmvQLIvWCbjKlwsklzjR/edA8ojYIOU+2ubU eXVZX/QKoN0AtuUiBjgR0JD/R9+ncQPt8hdXBgEjDH2sBr2vU2KlZ5Lf4k/Ph6HGx4DA JiGw== X-Gm-Message-State: AJcUukcW4ElVhSNVNiYyyYmgGeU9sl002D5ArOYArWhwEJB86d90zzto mGmEOTd3xfAC7HzO3WcQpbfgdg== X-Google-Smtp-Source: ALg8bN7z8bwY+xJMPtjY0+Lf7V/C3dfeR5cr36GHqWqG9GTHkZtWiUsZeF0fWb8b7PRNms9S+9ACPA== X-Received: by 2002:a1c:5dd1:: with SMTP id r200mr3984870wmb.93.1546685961138; Sat, 05 Jan 2019 02:59:21 -0800 (PST) Received: from tron.luk.heistp.net (h-1169.lbcfree.net. [185.193.85.130]) by smtp.gmail.com with ESMTPSA id j8sm7748408wmd.0.2019.01.05.02.59.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jan 2019 02:59:20 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) From: Pete Heist In-Reply-To: <87wonjxvss.fsf@toke.dk> Date: Sat, 5 Jan 2019 11:59:18 +0100 Cc: Cake List Content-Transfer-Encoding: quoted-printable Message-Id: <0077CC34-490F-4D76-82D3-BE37B27F2E1C@heistp.net> References: <5482A3CA-9C36-4DDE-A858-24D8467F70C7@heistp.net> <8736q8yumt.fsf@toke.dk> <4C422792-7E51-4DBA-A229-FA7D3F987FB6@heistp.net> <87zhsgxdao.fsf@toke.dk> <87wonjxvss.fsf@toke.dk> To: =?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?= X-Mailer: Apple Mail (2.3445.9.1) Subject: Re: [Cake] cake infinite loop(?) with hfsc on one-armed router X-BeenThere: cake@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Cake - FQ_codel the next generation List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2019 10:59:22 -0000 > On Jan 5, 2019, at 11:06 AM, Toke H=C3=B8iland-J=C3=B8rgensen = wrote: >=20 > Hmm, try this version for 3.16 - probably doesn't work on later = kernels. > I'll look into a proper backport once you've confirmed that it works = :) Thanks! Quick reminder, I=E2=80=99ve only seen this happen with hfsc, = not when cake is a leaf below htb, for whatever reason, but that = aside... After the patch I was able to do an iperf3 upload through the one-armed = router (receive on default VLAN and send on tagged VLAN), but when I ran = iperf3 in reverse mode (receive on tagged VLAN and send on default = VLAN), this happened right away (also see compile warnings below): root@apu1a:~# [ 341.268556] BUG: unable to handle kernel NULL pointer = dereference at 00000008 [ 341.275801] IP: [] adjust_parent_qlen+0x37/0xf1a [sch_cake] [ 341.282290] *pde =3D 00000000=20 [ 341.285203] Oops: 0000 [#1] SMP=20 [ 341.288496] Modules linked in: em_meta cls_basic sch_hfsc sch_cake(O) = xt_ACCOUNT(O) ipt_REJECT xt_recent iptable_mangle iptable_nat nfi [ 341.339568] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G O = 3.16.7-ckt9-voyage #1 [ 341.347576] Hardware name: PC Engines APU/APU, BIOS 4.0 09/08/2014 [ 341.353765] task: f5c811d0 ti: f5c86000 task.ti: f5c86000 [ 341.359173] EIP: 0060:[] EFLAGS: 00210206 CPU: 1 [ 341.364669] EIP is at adjust_parent_qlen+0x37/0xf1a [sch_cake] [ 341.370508] EAX: f5d65000 EBX: ffffffe8 ECX: 00000000 EDX: 00000003 [ 341.376774] ESI: 00010000 EDI: f2900000 EBP: f5c99cf0 ESP: f5c99ce8 [ 341.383041] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 [ 341.388447] CR0: 8005003b CR2: 00000008 CR3: 35cde000 CR4: 00000790 [ 341.394713] Stack: [ 341.396734] 000001e1 f56f0000 f5c99d84 fa0e913c e0b706f9 0209090a = f2907840 000017a8 [ 341.404678] 00000000 00000004 000001e0 000001e1 f56f0100 f2a90000 = 000017a8 c131996d [ 341.412626] ca4edbd8 0000004d f54fca00 f54fca00 f5c99dbc f5c99d54 = 0209090a 0209480a [ 341.420573] Call Trace: [ 341.423037] [] adjust_parent_qlen+0x93f/0xf1a [sch_cake] [ 341.429322] [] ? _raw_spin_unlock_bh+0x13/0x15 [ 341.434734] [] ? tc_classify_compat+0x2f/0x5f [ 341.440054] [] ? tc_classify+0x1a/0x8b [ 341.444767] [] 0xfa0f4a8e [ 341.448361] [] __dev_queue_xmit+0x210/0x35f [ 341.453504] [] ? ip_fragment+0x79f/0x79f [ 341.458392] [] dev_queue_xmit+0xa/0xc [ 341.463023] [] neigh_resolve_output+0x12f/0x145 [ 341.468517] [] ip_finish_output+0x352/0x73d [ 341.473664] [] ip_output+0x73/0xaf [ 341.478033] [] ip_forward_finish+0x66/0x6b [ 341.483091] [] ip_forward+0x2b0/0x36d [ 341.487720] [] ip_rcv_finish+0x267/0x29a [ 341.492607] [] ip_rcv+0x2b4/0x338 [ 341.496894] [] __netif_receive_skb_core+0x467/0x4b6 [ 341.502741] [] __netif_receive_skb+0x48/0x59 [ 341.507975] [] netif_receive_skb_internal+0x59/0x85 [ 341.513818] [] napi_gro_complete+0x87/0x8c [ 341.518878] [] napi_gro_flush+0x3e/0x53 [ 341.523680] [] napi_complete+0x17/0x27 [ 341.528394] [] 0xf80361a2 [ 341.531985] [] net_rx_action+0x56/0x10e [ 341.536785] [] __do_softirq+0x91/0x175 [ 341.541501] [] ? __hrtimer_tasklet_trampoline+0x1a/0x1a [ 341.547685] [] do_softirq_own_stack+0x1d/0x23 [ 341.553002] =20 [ 341.554933] [] irq_exit+0x34/0x75 [ 341.559445] [] do_IRQ+0x92/0xa6 [ 341.563554] [] common_interrupt+0x2c/0x40 [ 341.568531] [] ? cpuidle_enter_state+0x37/0x96 [ 341.573936] [] cpuidle_enter+0xf/0x12 [ 341.578567] [] cpu_startup_entry+0x135/0x1e1 [ 341.583802] [] start_secondary+0x1a6/0x1ab [ 341.588856] Code: 70 24 85 f6 74 5e 66 31 f6 81 fe 00 00 ff ff 74 53 = 8b 40 34 8b 00 f6 40 08 01 75 05 39 70 20 74 16 8b 58 18 83 eb 18e [ 341.609292] EIP: [] adjust_parent_qlen+0x37/0xf1a = [sch_cake] SS:ESP 0068:f5c99ce8 [ 341.617689] CR2: 0000000000000008 [ 341.621012] ---[ end trace db8ecd998020cc49 ]--- [ 341.625639] Kernel panic - not syncing: Fatal exception in interrupt [ 341.632073] Kernel Offset: 0x0 from 0xc1000000 (relocation range: = 0xc0000000-0xf7ffdfff) [ 341.640215] Rebooting in 30 seconds.. Probably less critically, some compile warnings: root@apu1a:~/src/sch_cake# make clean make[1]: Entering directory '/usr/src/linux-headers-3.16.7-ckt9-voyage' CLEAN /root/src/sch_cake/.tmp_versions CLEAN /root/src/sch_cake/Module.symvers make[1]: Leaving directory '/usr/src/linux-headers-3.16.7-ckt9-voyage' root@apu1a:~/src/sch_cake# make make[1]: Entering directory '/usr/src/linux-headers-3.16.7-ckt9-voyage' CC [M] /root/src/sch_cake/sch_cake.o /root/src/sch_cake/sch_cake.c: In function =E2=80=98adjust_parent_qlen=E2=80= =99: /root/src/sch_cake/sch_cake.c:1753:31: warning: passing argument 1 of = =E2=80=98qdisc_match_from_root=E2=80=99 from incompatible pointer type sch =3D qdisc_match_from_root(qdisc_dev(sch), TC_H_MAJ(parentid)); ^ /root/src/sch_cake/sch_cake.c:1727:22: note: expected =E2=80=98struct = Qdisc *=E2=80=99 but argument is of type =E2=80=98struct net_device *=E2=80= =99 static struct Qdisc *qdisc_match_from_root(struct Qdisc *root, u32 = handle) ^ Building modules, stage 2. MODPOST 1 modules CC /root/src/sch_cake/sch_cake.mod.o LD [M] /root/src/sch_cake/sch_cake.ko make[1]: Leaving directory '/usr/src/linux-headers-3.16.7-ckt9-voyage'