The route metrics added "ip route" are not being inherited by route cache entries

Bug #1205741 reported by Tim Hartrick on 2013-07-28
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Unassigned

Bug Description

There is a bug in the the management of inet peers which prevents route metrics like initcwnd from being inherited by route
cache entries. An example:

$ ip route show
default via 172.16.231.2 dev eth0 metric 100
172.16.231.0/24 dev eth0 proto kernel scope link src 172.16.231.26

$ ip route show cache
local 172.16.231.26 from 172.16.231.1 dev lo src 172.16.231.26
    cache <local,src-direct> iif eth0
172.16.231.1 from 172.16.231.26 dev eth0
    cache ipid 0xa13f

$ ip route change 172.16.231.0/24 dev eth0 proto kernel scope link src 172.16.231.26 initcwnd lock 100

$ ip route show
default via 172.16.231.2 dev eth0 metric 100
172.16.231.0/24 dev eth0 proto kernel scope link src 172.16.231.26 initcwnd
lock 100

$ ip route show cache
172.16.231.1 from 172.16.231.26 dev eth0
    cache ipid 0xa13f rtt 4ms rttvar 4ms cwnd 40
local 172.16.231.26 from 172.16.231.1 dev lo src 172.16.231.26
    cache <local,src-direct> iif eth0

Note that the initcwnd metric is not being inherited by the cache entry for 172.16.231.1. The problem is that the
inetpeer cache is not flushed when the "ip route change" occurs. Without this the metrics in the inetpeer are used
to build the metrics of the route cache entry even though they are stale.

A fix for this bug is in the 3.5.0 kernel from quantal. It is a simple fix and could be easily applied to the 3.2.0 line of kernels.
---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
AplayDevices: Error: [Errno 2] No such file or directory
ApportVersion: 2.0.1-0ubuntu17.3
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/by-path', '/dev/snd/controlC0', '/dev/snd/pcmC0D0c', '/dev/snd/pcmC0D0p', '/dev/snd/pcmC0D1p', '/dev/snd/midiC0D0', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info: Error: [Errno 2] No such file or directory
Card0.Amixer.values: Error: [Errno 2] No such file or directory
DistroRelease: Ubuntu 12.04
HibernationDevice: RESUME=UUID=7b08c24a-933d-44c9-a398-a8cdfc722538
InstallationMedia: Ubuntu-Server 12.04 LTS "Precise Pangolin" - Release amd64 (20120424.1)
IwConfig: Error: [Errno 2] No such file or directory
Lsusb:
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
 Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
MachineType: VMware, Inc. VMware Virtual Platform
MarkForUpload: True
Package: linux (not installed)
ProcEnviron:
 LANGUAGE=en_US:en
 TERM=vt102
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/ksh
ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-49-generic root=UUID=a386ea91-d67b-492f-983e-8e19bdcef30e ro find_preseed=/preseed.cfg noprompt rootdelay=30 console=ttyS1,115200n8 kgdboc=kbd,ttyS1,115200n8
ProcVersionSignature: Ubuntu 3.2.0-49.75-generic 3.2.46
RelatedPackageVersions:
 linux-restricted-modules-3.2.0-49-generic N/A
 linux-backports-modules-3.2.0-49-generic N/A
 linux-firmware 1.79.4
RfKill: Error: [Errno 2] No such file or directory
Tags: precise
Uname: Linux 3.2.0-49-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
dmi.bios.date: 07/02/2012
dmi.bios.vendor: Phoenix Technologies LTD
dmi.bios.version: 6.00
dmi.board.name: 440BX Desktop Reference Platform
dmi.board.vendor: Intel Corporation
dmi.board.version: None
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 1
dmi.chassis.vendor: No Enclosure
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnPhoenixTechnologiesLTD:bvr6.00:bd07/02/2012:svnVMware,Inc.:pnVMwareVirtualPlatform:pvrNone:rvnIntelCorporation:rn440BXDesktopReferencePlatform:rvrNone:cvnNoEnclosure:ct1:cvrN/A:
dmi.product.name: VMware Virtual Platform
dmi.product.version: None
dmi.sys.vendor: VMware, Inc.

affects: ubuntu → linux (Ubuntu)

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1205741

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete

apport information

tags: added: apport-collected precise
description: updated

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Joseph Salisbury (jsalisbury) wrote :

Do you happen to know the upstream SHA1 that fixes this bug in 3.5?

Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: kernel-da-key

Joe,

These three seem to be relevant.

https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?h=linux-3.5.y&id=5faa5df1fa2024bd750089ff21dcc4191798263d

https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?h=linux-3.5.y&id=e304dfdb030bab29888151021843bd9e1743a535

https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?h=linux-3.5.y&id=55432d2b543a4b6dfae54f5c432a566877a85d90

In particular, the first one adds the mechanism to invalidate the
inetpeer tree when the route cache is invalidated because of a fib
metric change.

The second is a grand netdev merge.

The third seems to be an essential bug fix that prevents reference to
freed inetpeer entries.

tim

On Thu, 2013-08-08 at 17:38 +0000, Joseph Salisbury wrote:
> Do you happen to know the upstream SHA1 that fixes this bug in 3.5?
>
> ** Changed in: linux (Ubuntu)
> Importance: Undecided => Medium
>
> ** Tags added: kernel-da-key
>

Joseph Salisbury (jsalisbury) wrote :

I built a Precise test kernel with commits 5faa5df and 55432d2 applied. The test kernel can be downloaded from:

http://kernel.ubuntu.com/~jsalisbury/lp1205741/

Can you test this kernel and see if it resolves this bug?

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Tim Hartrick (ww3ib-tim-8aw3u) wrote :

Joe,

Sorry for the late response, I was on vacation. I will load it up and
give it a ride.

Tim Hartrick

On Fri, 2013-08-16 at 18:04 +0000, Joseph Salisbury wrote:
> I built a Precise test kernel with commits 5faa5df and 55432d2 applied.
> The test kernel can be downloaded from:
>
> http://kernel.ubuntu.com/~jsalisbury/lp1205741/
>
> Can you test this kernel and see if it resolves this bug?
>
>
> ** Changed in: linux (Ubuntu)
> Status: Confirmed => Incomplete
>

Tim Hartrick (ww3ib-tim-8aw3u) wrote :

Joe,

This kernel fixes the problem.

Thanks

Tim Hartrick

On Mon, 2013-08-19 at 17:29 -0600, Tim Hartrick wrote:
> Joe,
>
> Sorry for the late response, I was on vacation. I will load it up and
> give it a ride.
>
>
> Tim Hartrick
>
> On Fri, 2013-08-16 at 18:04 +0000, Joseph Salisbury wrote:
> > I built a Precise test kernel with commits 5faa5df and 55432d2 applied.
> > The test kernel can be downloaded from:
> >
> > http://kernel.ubuntu.com/~jsalisbury/lp1205741/
> >
> > Can you test this kernel and see if it resolves this bug?
> >
> >
> > ** Changed in: linux (Ubuntu)
> > Status: Confirmed => Incomplete
> >
>
>

Tim Hartrick (ww3ib-tim-8aw3u) wrote :

So what is the status of this bug. The 3.2.0-53 update arrived today and the fix wasn't in it.
Is this bug going to be fixed or not?

Joseph Salisbury (jsalisbury) wrote :

This is still being discussed upstream. Awaiting some feedback from the upstream maintainer:
https://lkml.org/lkml/2013/8/31/195

Andy Whitcroft (apw) on 2013-09-11
Changed in linux (Ubuntu):
status: Incomplete → Fix Committed
Tim Hartrick (ww3ib-tim-8aw3u) wrote :

Does the move from Incomplete to Fix Committed mean that the fix for this bug will be in -54 or we miss the window for that?

Brad Figg (brad-figg) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-precise' to 'verification-done-precise'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-precise
Tim Hartrick (ww3ib-tim-8aw3u) wrote :

I just downloaded linux-image-3.2.0-55-generic from -proposed and the bug is still in this version. I inspected the source for linux-image-3.2.0-55-generic and I see no evidence that the patches cited above have been applied. There is no implementation or invocation of inetpeer_invalidate_tree or any of the supporting code for it. I also looked at the latest upstream 3.2 (3.2.51) and the fix isn't in that code either.

tags: added: verification-failed
Tim Hartrick (ww3ib-tim-8aw3u) wrote :

Unfortunately in my haste to verify this, I bungled my test of -55 and managed to pull down the wrong source for -55 as well. Now that I have corrected both those mistakes, I can verify that the code for the fix is in -55 and the code for the fix functions properly. Sorry about that.....

tags: added: verification-done
removed: verification-failed
tags: added: verification-done-precise
removed: verification-done verification-needed-precise
Launchpad Janitor (janitor) wrote :
Download full text (9.4 KiB)

This bug was fixed in the package linux - 3.2.0-55.85

---------------
linux (3.2.0-55.85) precise; urgency=low

  [Steve Conklin]

  * Release Tracking Bug
    - LP: #1233349

  [ Upstream Kernel Changes ]

  * kernel-doc: bugfix - multi-line macros
    - LP: #1223920
  * Revert "ARM: 7810/1: perf: Fix array out of bounds access in
    armpmu_map_hw_event()"
  * Revert "PM / Domains: Fix handling of wakeup devices during system
    resume"
    - LP: #1233387
  * inetpeer: Invalidate the inetpeer tree along with the routing cache
    - LP: #1205741
  * inetpeer: fix a race in inetpeer_gc_worker()
    - LP: #1205741
  * mm/memory-hotplug: fix lowmem count overflow when offline pages
    - LP: #1233387
  * libata: make it clear that sata_inic162x is experimental
    - LP: #1233387
  * sched: Fix the broken sched_rr_get_interval()
    - LP: #1233387
  * drm/i915: quirk no PCH_PWM_ENABLE for Dell XPS13 backlight
    - LP: #1162026, #1163720, #1233387
  * perf: Fix event group context move
    - LP: #1233387
  * perf tools: Add anonymous huge page recognition
    - LP: #1233387
  * arcnet: cleanup sizeof parameter
    - LP: #1233387
  * sysctl net: Keep tcp_syn_retries inside the boundary
    - LP: #1233387
  * sctp: fully initialize sctp_outq in sctp_outq_init
    - LP: #1233387
  * ipv6: take rtnl_lock and mark mrt6 table as freed on namespace cleanup
    - LP: #1233387
  * usbnet: do not pretend to support SG/TSO
    - LP: #1233387
  * net_sched: Fix stack info leak in cbq_dump_wrr().
    - LP: #1233387
  * af_key: more info leaks in pfkey messages
    - LP: #1233387
  * net_sched: info leak in atm_tc_dump_class()
    - LP: #1233387
  * drm/i915/lvds: ditch ->prepare special case
    - LP: #1233387
  * af_key: initialize satype in key_notify_policy_flush()
    - LP: #1233387
  * ALSA: usb-audio: skip UAC2 EFFECT_UNIT
    - LP: #1233387
  * ALSA: usb: Parse UAC2 extension unit like for UAC1
    - LP: #1233387
  * ALSA: ak4xx-adda: info leak in ak4xxx_capture_source_info()
    - LP: #1233387
  * slab: introduce kmalloc_array()
    - LP: #1233387
  * NFSv4.1: integer overflow in decode_cb_sequence_args()
    - LP: #1233387
  * jfs: fix readdir cookie incompatibility with NFSv4
    - LP: #1233387
  * vm: add no-mmu vm_iomap_memory() stub
    - LP: #1233387
  * nl80211: fix mgmt tx status and testmode reporting for netns
    - LP: #1233387
  * mac80211: fix duplicate retransmission detection
    - LP: #1233387
  * iwlwifi: dvm: don't send BT_CONFIG on devices w/o Bluetooth
    - LP: #1233387
  * iwlwifi: add DELL SKU for 5150 HMC
    - LP: #1233387
  * ath9k_htc: do some initial hardware configuration
    - LP: #1233387
  * Bluetooth: Add support for Foxconn/Hon Hai [0489:e04d]
    - LP: #1233387
  * Bluetooth: Add support for Mediatek Bluetooth device [0e8d:763f]
    - LP: #1233387
  * Bluetooth: ath3k: Add support for Fujitsu Lifebook UH5x2 [04c5:1330]
    - LP: #1233387
  * Bluetooth: ath3k: Add support for ID 0x13d3/0x3402
    - LP: #1233387
  * Bluetooth: Add support for Atheros [0cf3:3121]
    - LP: #1233387
  * Bluetooth: Add support for Atheros [0cf3:e003]
    - LP: #1233387
  * ARM: 7791/1: a.out: remove partial a.out support
    - LP: #123...

Read more...

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers