Commit bd480e66 authored by Kirill Smelkov's avatar Kirill Smelkov

X problem reproducer in shell

I got on mini:

root@mini:/home/kirr/src/tools/net/iproute2/t# time ./rtcache-torture
ping: socket: Отказано в доступе, attempting raw socket...
PING 2222:3333:4444:5555::1(2222:3333:4444:5555::1) 56 data bytes
E.E.E..E.E..E....E....E.E..E.E..E.E..E....E....E....E....E....E.E....E....E....E....E....E....E....E......E....E....E....E....E....E.E..E....E....E.E....E....E....E....E....E..E....E....E....E......E....E....E....E....E....E.....E....E....E....E....E....E....E....E....E....E......E....E....E....E....E....E....E.E..E....E....E....E....E.E..E....E....E....E.E....E.E..E.E..E.E....E....E....E....E.E..E.E..E.E....E....E....E....E..E....E......E....E....E....E.E....E.E....E.E..E....E.E....E....E....E....E....E....E....E....E.E....E....E....E....E....E....E....E.E....E.E.E....E....E....E....E....E....E....E.E....E....E....E....E....E....E....E.E....E....E....E....E....E....E....E....E......E....E....E....E......E....E....E....E.E....E....E....E....E....E....E....E....E......E....E....E....E....E....E....E......E....E....E....E....E....E....E....E....E.E....E....E....E....E....E....E....E......E....E....E....E....E....E.E..E.E....E....E.E....E....E....E....E....E....E....E....E....E.E....E.E..E.E..E.E....E....E....E.E....E..E.E....E....E.E..E....E......E.E.E..E.E....E.E..E.E....E.E..E.E....E....E......E....E.E....E....E.E....E....E.E......E.E..E.E....E.E..E.E....E....E.E..E.E....E.E....E....E.E....E.E....E....E.E....E.E....E....E.E..E.E....E....E.E..E.E....E.E..E.E....E....E.E....E.E..E.E....E.E..E.E.E....E....E.E....E....E.E....E....E.E....E.....E....E.E....E.E..E.E....E.E..E.E....E.E....E....E.E....E.E..E.E....E....E....E......E.E..E.E..E.E....E.E..E.E....E.E......E....E....E.E....E.E..E.E....E.E..E.E....E.E....E.E..E.E....E....E....E....E......E....E.E....E....E.E....E.E....E....E.E....E.E....E....E.E....E.E..E.E....E.E....E.E....E....E.E....E....E....E.E..E.E....E......E....E....E.E....E....E.E....E.E..E.E.E....E....E.E....E....E.E....E....E.E....E.E....E.E....E....E.E....E....E.E....E.E....E.E....E....E.E....E....E.E....E....E.E......E....E....E....E.E....E....E.E......E.E..E.E....E....E.E..E.E....E.EE

BUG: Got unexpected unreachable route for 2222:3333:4444:5555::1:
unreachable 2222:3333:4444:5555::1 from :: dev lo  src ::1  metric 0 \    cache  error -101

route table for root 2222:3333:4444::/48
---- 8< ----
unicast 2222:3333:4444:5555::/64 dev dum0  proto boot  scope global  metric 1024
unreachable 2222:3333:4444::/48 dev lo  proto boot  scope global  metric 1024  error -101
---- 8< ----

route for 2222:3333:4444:5555::1 (once again)
unreachable 2222:3333:4444:5555::1 from :: dev lo  src ::1  metric 0 \    cache  error -101 users 1 used 4

real    0m23.371s
user    0m2.504s
sys     0m6.820s
parent 69d29071
#!/bin/sh -e
# torture for IPv6 RT cache, trying to hit the race between lookup,cache-add & route add
# http://lists.alioth.debian.org/pipermail/babel-users/2016-June/002547.html
tprefix=2222:3333:4444 # "whole-network" prefix for tests /48
tsubnet=$tprefix:5555 # subnetwork for which "to" route will be changed /64
taddr=$tsubnet::1 # test address on $tsubnet
# setup for tests:
# dum0 dummy device
ip link del dev dum0 2>/dev/null || :
ip link add dum0 type dummy
ip link set up dev dum0
# clean route table for tprefix with only unreachable whole-network route
ip -6 route flush root $tprefix::/48
ip -6 route add unreachable $tprefix::/48
ip -6 route flush cache
ip -6 route add $tsubnet::/64 dev dum0
# put a lot of requests to rt/rtcache getting route to $taddr
trap 'kill $(jobs -p)' EXIT
rtgetter() {
# NOTE we cannot do this with `ip route get ...` in a loop, as `ip route
# get` first takes RTNL lock, and thus will be completely serialized with
# e.g. route add and del.
#
# Ping, like other usually connect/tx activity works without RTNL held.
exec ping6 -n -f $taddr
}
rtgetter &
# do route del/route in busyloop;
# after route add: check route get $addr is not unreachable
while true; do
ip -6 route del $tsubnet::/64 dev dum0
ip -6 route add $tsubnet::/64 dev dum0
r=`ip -6 -d -o route get $taddr`
if echo "$r" | grep -q unreachable ; then
echo
echo
echo BUG: `uname -a`
echo BUG: Got unexpected unreachable route for $taddr:
echo "$r"
echo
echo "route table for root $tprefix::/48"
echo "---- 8< ----"
ip -6 -d -o route show root $tprefix::/48
echo "---- 8< ----"
echo
echo "route for $taddr (once again)"
ip -6 -d -o -s -s -s route get $taddr
exit 1
fi
done
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment