per route mtu settings are broken in linux kernel 3.2

Bug #1177507 reported by Yura Pakhuchiy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Hello,

Looks like setting per route mtu (as described in [1]) is broken in linux kernel 3.2 (default kernel from ubuntu 12.04).
I made script to illustrate this:

root@germany7:~# cat route-mtu
#!/bin/bash

uname -a
ip tuntap add dev test mode tun
ifconfig test 10.1.1.1/16 mtu 1500
echo =============================================================
echo No per route mtu entry
ping -c1 -Mdo -s2000 10.1.1.2
echo =============================================================
echo Per route MTU is set to 800
ip route add 10.1.1.2 dev test proto static src 10.1.1.1 mtu lock 800
ip route flush cache
ping -c1 -Mdo -s2000 10.1.1.2
ip route del 10.1.1.2 dev test proto static src 10.1.1.1 mtu lock 800
echo =============================================================
echo Per route MTU is set to 600
ip route add 10.1.1.2 dev test proto static src 10.1.1.1 mtu lock 600
ip route flush cache
ping -c1 -Mdo -s2000 10.1.1.2
ip route del 10.1.1.2 dev test proto static src 10.1.1.1 mtu lock 600
echo =============================================================
echo No per route mtu entry
ip route flush cache
ping -c1 -Mdo -s2000 10.1.1.2
ip tuntap del dev test mode tun

With kernel 3.2 I get following output:
Linux germany7 3.2.0-41-generic-pae #66-Ubuntu SMP Thu Apr 25 03:50:20 UTC 2013 i686 i686 i386 GNU/Linux
=============================================================
No per route mtu entry
PING 10.1.1.2 (10.1.1.2) 2000(2028) bytes of data.
From 10.1.1.1 icmp_seq=1 Frag needed and DF set (mtu = 1500)

--- 10.1.1.2 ping statistics ---
0 packets transmitted, 0 received, +1 errors

=============================================================
Per route MTU is set to 800
PING 10.1.1.2 (10.1.1.2) 2000(2028) bytes of data.
From 10.1.1.1 icmp_seq=1 Frag needed and DF set (mtu = 800)

--- 10.1.1.2 ping statistics ---
0 packets transmitted, 0 received, +1 errors

=============================================================
Per route MTU is set to 600
PING 10.1.1.2 (10.1.1.2) 2000(2028) bytes of data.
From 10.1.1.1 icmp_seq=1 Frag needed and DF set (mtu = 800)

--- 10.1.1.2 ping statistics ---
0 packets transmitted, 0 received, +1 errors

=============================================================
No per route mtu entry
PING 10.1.1.2 (10.1.1.2) 2000(2028) bytes of data.
From 10.1.1.1 icmp_seq=1 Frag needed and DF set (mtu = 800)

--- 10.1.1.2 ping statistics ---
0 packets transmitted, 0 received, +1 errors

After once set to 800, MTU is always 800, even if you add different route and clean routing cache.

It looks like that problem is fixed in ubuntu kernel 3.5. With it, everything works like expected:
root@germany7:~# ./route-mtu
Linux germany7 3.5.0-28-generic #48~precise1-Ubuntu SMP Wed Apr 24 21:43:05 UTC 2013 i686 i686 i386 GNU/Linux
=============================================================
No per route mtu entry
PING 10.1.1.2 (10.1.1.2) 2000(2028) bytes of data.
From 10.1.1.1 icmp_seq=1 Frag needed and DF set (mtu = 1500)

--- 10.1.1.2 ping statistics ---
0 packets transmitted, 0 received, +1 errors

=============================================================
Per route MTU is set to 800
PING 10.1.1.2 (10.1.1.2) 2000(2028) bytes of data.
From 10.1.1.1 icmp_seq=1 Frag needed and DF set (mtu = 800)

--- 10.1.1.2 ping statistics ---
0 packets transmitted, 0 received, +1 errors

=============================================================
Per route MTU is set to 600
PING 10.1.1.2 (10.1.1.2) 2000(2028) bytes of data.
From 10.1.1.1 icmp_seq=1 Frag needed and DF set (mtu = 600)

--- 10.1.1.2 ping statistics ---
0 packets transmitted, 0 received, +1 errors

=============================================================
No per route mtu entry
PING 10.1.1.2 (10.1.1.2) 2000(2028) bytes of data.
From 10.1.1.1 icmp_seq=1 Frag needed and DF set (mtu = 1500)

--- 10.1.1.2 ping statistics ---
0 packets transmitted, 0 received, +1 errors

I also tested with kernels 2.6.35 (in lucid) and 3.8 (in precise), results are same to 3.5.

Is there any chance to get fixes from 3.5/3.8 backported to the default precise kernel 3.2?

1. http://lartc.org/howto/lartc.cookbook.mtu-discovery.html
---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 2.0.1-0ubuntu17.2
Architecture: i386
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC268 Analog [ALC268 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: yura 2759 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xf4800000 irq 45'
   Mixer name : 'Intel Cantiga HDMI'
   Components : 'HDA:10ec0268,1025013c,00100101 HDA:14f12c06,10250093,00100000 HDA:80862802,80860101,00100000'
   Controls : 23
   Simple ctrls : 10
CheckboxSubmission: 02f685f3381c5341bcbab31fdf0318b9
CheckboxSystem: 8278c9e6a57f68452a782d8924c0633a
DistroRelease: Ubuntu 12.04
HibernationDevice: RESUME=UUID=2d28cf13-ba1f-4394-9958-51ed5ccb4dd3
MachineType: Acer Extensa 5630
MarkForUpload: True
Package: linux (not installed)
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: root=UUID=8f05626d-62de-43a5-87f9-1e51af186021 ro quiet splash resume=UUID=70081498-3f3e-4d20-8ccb-c31aebd900d6
ProcVersionSignature: Ubuntu 3.2.0-41.66-generic 3.2.42
RelatedPackageVersions:
 linux-restricted-modules-3.2.0-41-generic N/A
 linux-backports-modules-3.2.0-41-generic N/A
 linux-firmware 1.79.4
Tags: precise
Uname: Linux 3.2.0-41-generic i686
UpgradeStatus: Upgraded to precise on 2013-05-09 (0 days ago)
UserGroups: adm admin disk fuse pulse-access src sudo users wireshark
WpaSupplicantLog:

dmi.bios.date: 08/05/2008
dmi.bios.vendor: Phoenix Technologies LTD
dmi.bios.version: V1.19
dmi.board.name: Homa
dmi.board.vendor: Acer
dmi.board.version: Rev
dmi.chassis.type: 10
dmi.chassis.vendor: Acer
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnPhoenixTechnologiesLTD:bvrV1.19:bd08/05/2008:svnAcer:pnExtensa5630:pvr0100:rvnAcer:rnHoma:rvrRev:cvnAcer:ct10:cvrN/A:
dmi.product.name: Extensa 5630
dmi.product.version: 0100
dmi.sys.vendor: Acer

Yura Pakhuchiy (yura-p)
description: updated
Brad Figg (brad-figg)
affects: linux-meta (Ubuntu) → linux (Ubuntu)
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

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

apport-collect 1177507

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
tags: added: precise
Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Incomplete → Triaged
tags: added: kernel-da-key kernel-fixed-upstream
Revision history for this message
Yura Pakhuchiy (yura-p) wrote : AcpiTables.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Yura Pakhuchiy (yura-p) wrote : AlsaDevices.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : AplayDevices.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : BootDmesg.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : CRDA.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : Card0.Amixer.values.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : Card0.Codecs.codec.0.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : Card0.Codecs.codec.1.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : Card0.Codecs.codec.3.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : IwConfig.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : Lspci.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : Lsusb.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : PciMultimedia.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : ProcEnviron.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : ProcModules.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : PulseList.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : RfKill.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : UdevDb.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : UdevLog.txt

apport information

Revision history for this message
Yura Pakhuchiy (yura-p) wrote : WifiSyslog.txt

apport information

Yura Pakhuchiy (yura-p)
Changed in linux (Ubuntu):
status: Triaged → Confirmed
Revision history for this message
penalvch (penalvch) wrote :

Yura Pakhuchiy, as per http://us.acer.com/ac/en/US/content/drivers an update is available for your BIOS (1.36). If you update to this, does it change anything?

If not, could you please both specify what happened, and provide the output of the following terminal command:
sudo dmidecode -s bios-version && sudo dmidecode -s bios-release-date

Thank you for your understanding.

tags: added: bios-outdated-v1.36
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Yura Pakhuchiy (yura-p) wrote :

I'm pretty sure this problem is not depends on hardware. I tried not only on mine laptop, but on several servers with different hardware configurations. You can run attached script and will see that it happens on your system too (if you are running ubuntu kernel 3.2).

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Yura Pakhuchiy (yura-p) wrote :

Also Joseph Salisbury (jsalisbury) already marked this change as Triaged. I reverted this to Verified by accident before.

Revision history for this message
Yura Pakhuchiy (yura-p) wrote :

I meant: this bug

penalvch (penalvch)
tags: added: refused-troubleshooting
Revision history for this message
Yura Pakhuchiy (yura-p) wrote :

Oh, really? I think appreciate tag would be developer-emulating-work. Anyone can check that problem with ubuntu kernel 3.2 on every system, independently of hw configuration and bios version. More over, problem is fixed upstream.

Revision history for this message
Richard Laager (rlaager) wrote :
Download full text (3.9 KiB)

First, let me say I'm not an Ubuntu developer.

Second, is this still a problem for you?

On a system running Precise, this seems to work for me:
Linux yak 3.2.0-107-generic #148-Ubuntu SMP Mon Jul 18 20:22:08 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
=============================================================
No per route mtu entry
PING 10.1.1.2 (10.1.1.2) 2000(2028) bytes of data.
From 10.1.1.1 icmp_seq=1 Frag needed and DF set (mtu = 1500)

--- 10.1.1.2 ping statistics ---
0 packets transmitted, 0 received, +1 errors

=============================================================
Per route MTU is set to 800
PING 10.1.1.2 (10.1.1.2) 2000(2028) bytes of data.
From 10.1.1.1 icmp_seq=1 Frag needed and DF set (mtu = 800)

--- 10.1.1.2 ping statistics ---
0 packets transmitted, 0 received, +1 errors

=============================================================
Per route MTU is set to 600
PING 10.1.1.2 (10.1.1.2) 2000(2028) bytes of data.
From 10.1.1.1 icmp_seq=1 Frag needed and DF set (mtu = 600)

--- 10.1.1.2 ping statistics ---
0 packets transmitted, 0 received, +1 errors

=============================================================
No per route mtu entry
PING 10.1.1.2 (10.1.1.2) 2000(2028) bytes of data.
From 10.1.1.1 icmp_seq=1 Frag needed and DF set (mtu = 1500)

--- 10.1.1.2 ping statistics ---
0 packets transmitted, 0 received, +1 errors

On a system running Trusty, it also seems to work:
Linux tuna 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
=============================================================
No per route mtu entry
PING 10.1.1.2 (10.1.1.2) 2000(2028) bytes of data.
ping: local error: Message too long, mtu=1500

--- 10.1.1.2 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

=============================================================
Per route MTU is set to 800
PING 10.1.1.2 (10.1.1.2) 2000(2028) bytes of data.
ping: local error: Message too long, mtu=800

--- 10.1.1.2 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

=============================================================
Per route MTU is set to 600
PING 10.1.1.2 (10.1.1.2) 2000(2028) bytes of data.
ping: local error: Message too long, mtu=600

--- 10.1.1.2 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

=============================================================
No per route mtu entry
PING 10.1.1.2 (10.1.1.2) 2000(2028) bytes of data.
ping: local error: Message too long, mtu=1500

--- 10.1.1.2 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

On Xenial, it also seems to work:
Linux grape 4.4.0-34-generic #53-Ubuntu SMP Wed Jul 27 16:06:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
=============================================================
No per route mtu entry
PING 10.1.1.2 (10.1.1.2) 2000(2028) bytes of data.
ping: local error: Message too long, mtu=1500

--- 10.1.1.2 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

=============================================================
Per route MTU is s...

Read more...

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Yura Pakhuchiy (yura-p) wrote :

Hi Richard,

I do not use Precise anymore, so I do not know whether this bug still present. But this problem was present only in 3.2 kernel. MTU always worked fine with 3.5 kernel, Pricese and Trusty. Your logs indicate that it was probably fixed in 3.2 kernel as well.

Revision history for this message
Yura Pakhuchiy (yura-p) wrote :

I meant: MTU always worked fine with 3.5 kernel, Trusty and Xenial.

Revision history for this message
penalvch (penalvch) wrote :

Yura Pakhuchiy, this bug report is being closed due to your last comment https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1177507/comments/32 regarding this being fixed with an update. For future reference you can manage the status of your own bugs by clicking on the current status in the yellow line and then choosing a new status in the revealed drop down box. You can learn more about bug statuses at https://wiki.ubuntu.com/Bugs/Status. Thank you again for taking the time to report this bug and helping to make Ubuntu better. Please submit any future bugs you may find.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.