2003-09-03 10:38:05

by Justin Ossevoort

[permalink] [raw]
Subject: 2.6 - Kernel panic with GRE tunneling

Hello,

I encountered some kernel bug in the ip_gre module. This problem has
been tested on: 2.6.0-test3, 2.6.0-test4-mm2, 2.6.0-test4-mm4 (In VMWare
to get stacktrace).

All kernels were build with gcc 3.3 (the latest with 3.3.2 20030831
Debian prerelease). Tested on 2 systems (one was a VMWare), both running
Debian Sid.

this is what I did:

modprobe ip_gre
ip tunnel add test mode gre remote 10.2.0.1 local 10.2.248.255
ip link set test up
ip addr add 192.168.0.1 dev test
ip route add 192.168.0.2/32 dev test
ping 192.168.0.2
***crash***

In order to limit the e-mail's size:
http://brains.student.utwente.nl/~iq-0/ipgre-2.6-panic/
there are the paniclog, an attempt to run it through ksymoops and a
tcpdump.

*note: In this test case I didn't set up the other end-point of the
tunnel (because the other system is also 2.6 ;), but on a real life
tunnel the same thing happened. But one doesn't liketo crash his/her
system more than 10 times a week...

Regards,

justin....



Subject: Re: 2.6 - Kernel panic with GRE tunneling

> Hello,
Hello!

> I encountered some kernel bug in the ip_gre module. This problem has
> been tested on: 2.6.0-test3, 2.6.0-test4-mm2, 2.6.0-test4-mm4 (In VMWare
> to get stacktrace).
>
> All kernels were build with gcc 3.3 (the latest with 3.3.2 20030831
> Debian prerelease). Tested on 2 systems (one was a VMWare), both running
> Debian Sid.
>
> this is what I did:
>
> modprobe ip_gre
> ip tunnel add test mode gre remote 10.2.0.1 local 10.2.248.255
> ip link set test up
> ip addr add 192.168.0.1 dev test
> ip route add 192.168.0.2/32 dev test
> ping 192.168.0.2
> ***crash***
>
> In order to limit the e-mail's size:
> http://brains.student.utwente.nl/~iq-0/ipgre-2.6-panic/
> there are the paniclog, an attempt to run it through ksymoops and a
> tcpdump.
>
> *note: In this test case I didn't set up the other end-point of the
> tunnel (because the other system is also 2.6 ;), but on a real life
> tunnel the same thing happened. But one doesn't liketo crash his/her
> system more than 10 times a week...
>
> Regards,
>
> justin....

I investigated a little and seems that in ip_gre.c, in
function ipgre_tunnel_lookup, at the end there is the code:

if (ipgre_fb_tunnel_dev->flags&IFF_UP)
return ipgre_fb_tunnel_dev->priv;

Seems that ipgre_fb_tunnel_dev is NULL!

ipgre_fb_tunnel_dev is initialized in ipgre_init.

Some net guys call tell why ipgre_fb_tunnel_dev is still NULL after init.

I bet that if you configure the tunnels on both machines, it works.

Can you reproduce this without VMware?

---
Catalin(ux) BOIE
[email protected]

2003-09-03 11:58:35

by Justin Ossevoort

[permalink] [raw]
Subject: Re: 2.6 - Kernel panic with GRE tunneling

> I bet that if you configure the tunnels on both machines, it works.
> Can you reproduce this without VMware?

The original situation was with one of my normal machines (not VMWare),
the tunnel on that system has been operational for some years. The last
kernel before 2.6.0-test3 was 2.5.67-mm1 and it showed no problems. The
other end-point is a 2.4.21 which hasn't changed a bit over the last
period.

After I upgraded, I could ping to the other side, but got no replies. If
the other side ping'd me I got the before mentioned panic. After about
10 such crashes, the tunnel was finally dropped on both sides.

VMWare was used to get the error message (which didn't get logged to
syslog) from the console (without copying it by hand).