From: Jeff Garzik <hidden> Date: 2004-10-22 06:39:09
As requested, I updated my kernel to see if the "BUG: dst underflow..."
messages disappeared. Alas, they didn't. dmesg and .config from
2.6.9-final attached.
Let me know what additional debugging information I can provide, if any.
The symbol addresses in the dmesg output are all inside the ipv6 module.
Thanks,
Jeff
In article [off-list ref] (at Fri, 22 Oct 2004 02:39:09 -0400), Jeff Garzik [off-list ref] says:
As requested, I updated my kernel to see if the "BUG: dst underflow..."
messages disappeared. Alas, they didn't. dmesg and .config from
2.6.9-final attached.
Okay, thanks, but hmm...
(We haven't met this issue... I really want to know tow to reproduce...)
Let me know what additional debugging information I can provide, if any.
The symbol addresses in the dmesg output are all inside the ipv6 module.
Would you enable CONFIG_KALLSYMS_ALL, please?
Thanks.
--yoshfuji
On Fri, Oct 22, 2004 at 03:51:59PM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:
quoted
As requested, I updated my kernel to see if the "BUG: dst underflow..."
messages disappeared. Alas, they didn't. dmesg and .config from
2.6.9-final attached.
Okay, thanks, but hmm...
(We haven't met this issue... I really want to know tow to reproduce...)
FWIW, I'm seeing loads of these on the kernel that comes with Fedora
Core 2, also in the ipv6.ko module. I have 6to4 enabled, if that matters
anything.
% dmesg | grep BUG | sort | uniq
BUG: dst underflow -1: 3bcf9a80 at 42350024
BUG: dst underflow 0: 3bcf9a80 at 423486d2
BUG: dst underflow 0: 3bcf9a80 at 4235823d
% cat /sys/module/ipv6/sections/.text
0x42345000
0x42350024 - 0x42345000 = 0xb024, corresponds to:
0000affa <ip6_dst_check>
0x423486d2 - 0x42345000 = 0x36d2, corresponds to:
0000339d <ip6_push_pending_frames>
0x4235823d - 0x42345000 = 0x1323d, corresponds to:
00012c0d <udpv6_sendmsg> (god, that's one big function btw)
--L
Jeff/Lennert
Could you turn off netfilter and see if this continues to happen?
Know how to reproduce this? ;->
cheers,
jamal
On Fri, 2004-10-22 at 03:59, Lennert Buytenhek wrote:
On Fri, Oct 22, 2004 at 03:51:59PM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:
quoted
quoted
As requested, I updated my kernel to see if the "BUG: dst underflow..."
messages disappeared. Alas, they didn't. dmesg and .config from
2.6.9-final attached.
Okay, thanks, but hmm...
(We haven't met this issue... I really want to know tow to reproduce...)
FWIW, I'm seeing loads of these on the kernel that comes with Fedora
Core 2, also in the ipv6.ko module. I have 6to4 enabled, if that matters
anything.
% dmesg | grep BUG | sort | uniq
BUG: dst underflow -1: 3bcf9a80 at 42350024
BUG: dst underflow 0: 3bcf9a80 at 423486d2
BUG: dst underflow 0: 3bcf9a80 at 4235823d
% cat /sys/module/ipv6/sections/.text
0x42345000
0x42350024 - 0x42345000 = 0xb024, corresponds to:
0000affa <ip6_dst_check>
0x423486d2 - 0x42345000 = 0x36d2, corresponds to:
0000339d <ip6_push_pending_frames>
0x4235823d - 0x42345000 = 0x1323d, corresponds to:
00012c0d <udpv6_sendmsg> (god, that's one big function btw)
--L
From: "David S. Miller" <davem@davemloft.net> Date: 2004-11-05 06:18:01
On 04 Nov 2004 09:15:17 -0500
jamal [off-list ref] wrote:
Could you turn off netfilter and see if this continues to happen?
That's one possible angle, but let's look at the tracepoints
more closely.
BTW Lennert, the decoded addresses are extremely helpful. Thanks.
Jeff, could you similarly decode the ones that you seem to get?
That would be an incredibly useful datapoint. If you've provided
this already, my bad and please point me at where you posted that.
quoted
BUG: dst underflow -1: 3bcf9a80 at 42350024
BUG: dst underflow 0: 3bcf9a80 at 423486d2
BUG: dst underflow 0: 3bcf9a80 at 4235823d
...
quoted
0x42350024 - 0x42345000 = 0xb024, corresponds to:
0000affa <ip6_dst_check>
0x423486d2 - 0x42345000 = 0x36d2, corresponds to:
0000339d <ip6_push_pending_frames>
0x4235823d - 0x42345000 = 0x1323d, corresponds to:
00012c0d <udpv6_sendmsg> (god, that's one big function btw)
The last one is the most interesting. The only dst_release() call
that occurs in udpv6_sendmsg() is when xfrm_lookup() returns
an error. The semantics of that function are a complete mess
(when it errors, it sometimes releases the DST, sometimes does not)
and I'll fix that up.
But let me ask, do you have any IPSEC policies in the kernel
when these BUGs trigger? If so, I'm pretty sure I know what
the problem may be.
In article [off-list ref] (at Thu, 4 Nov 2004 22:18:01 -0800), "David S. Miller" [off-list ref] says:
quoted
quoted
00012c0d <udpv6_sendmsg> (god, that's one big function btw)
The last one is the most interesting. The only dst_release() call
that occurs in udpv6_sendmsg() is when xfrm_lookup() returns
an error. The semantics of that function are a complete mess
(when it errors, it sometimes releases the DST, sometimes does not)
and I'll fix that up.
Oh,yes, something like this?
Signed-off-by: Hideaki YOSHIFUJI <redacted>
===== net/ipv6/udp.c 1.76 vs edited =====
From: Jeff Garzik <hidden> Date: 2004-11-05 07:05:41
David S. Miller wrote:
Jeff, could you similarly decode the ones that you seem to get?
That would be an incredibly useful datapoint. If you've provided
this already, my bad and please point me at where you posted that.
I've compiled IPv6 into my router's kernel image, so next time I reboot,
I should be able to get at symbol info out of the BUGs a bit more easily.
But let me ask, do you have any IPSEC policies in the kernel
when these BUGs trigger? If so, I'm pretty sure I know what
the problem may be.
I know this question wasn't directed at me, but, I do always compile
ipsec stuff into my kernel, in addition to netfilter. The relevant
options are attached for the curious.
Jeff
P.S. Jamal-- I cannot disable netfilter for a period of time long
enough to cause the BUGs to be produced, since that disables my NAT'ing.
From: "David S. Miller" <davem@davemloft.net> Date: 2004-11-05 07:14:33
On Fri, 05 Nov 2004 02:05:41 -0500
Jeff Garzik [off-list ref] wrote:
David S. Miller wrote:
quoted
Jeff, could you similarly decode the ones that you seem to get?
That would be an incredibly useful datapoint. If you've provided
this already, my bad and please point me at where you posted that.
I've compiled IPv6 into my router's kernel image, so next time I reboot,
I should be able to get at symbol info out of the BUGs a bit more easily.
Thanks a lot.
quoted
But let me ask, do you have any IPSEC policies in the kernel
when these BUGs trigger? If so, I'm pretty sure I know what
the problem may be.
I know this question wasn't directed at me, but, I do always compile
ipsec stuff into my kernel, in addition to netfilter. The relevant
options are attached for the curious.
Yes, but do you actually install any IPSEC rules into your system?
The only way xfrm_lookup() can ever fall (and call that BUG'ing
dst_release() in udpv6_sendmsg()) is if you have at least some
IPSEC policies configured.
From: "David S. Miller" <davem@davemloft.net> Date: 2004-11-05 07:16:18
On Fri, 05 Nov 2004 15:53:55 +0900 (JST)
YOSHIFUJI Hideaki / $B5HF#1QL@(B [off-list ref] wrote:
In article [off-list ref] (at Thu, 4 Nov 2004 22:18:01 -0800), "David S. Miller" [off-list ref] says:
quoted
quoted
quoted
00012c0d <udpv6_sendmsg> (god, that's one big function btw)
The last one is the most interesting. The only dst_release() call
that occurs in udpv6_sendmsg() is when xfrm_lookup() returns
an error. The semantics of that function are a complete mess
(when it errors, it sometimes releases the DST, sometimes does not)
and I'll fix that up.
Oh,yes, something like this?
Something, but not quite. :-) This change you propose
adds a leak, you have to modify xfrm_lookup() as well.
I'm mid-way through such changes, but it looks something
like this (BTW, note the addrconf.c leak I noticed today
as well):
===== net/ipv6/addrconf.c 1.115 vs edited =====
@@ -1047,10 +1045,8 @@/* sk = NULL, but it is safe for now. RST socket required. */if(!ip6_dst_lookup(NULL,&buff->dst,&fl)){-if((xfrm_lookup(&buff->dst,&fl,NULL,0))<0){-dst_release(buff->dst);+if((xfrm_lookup(&buff->dst,&fl,NULL,0))<0)return;-}ip6_xmit(NULL,buff,&fl,NULL,0);TCP_INC_STATS_BH(TCP_MIB_OUTSEGS);
From: Jeff Garzik <hidden> Date: 2004-11-05 07:34:45
David S. Miller wrote:
On Fri, 05 Nov 2004 02:05:41 -0500
Jeff Garzik [off-list ref] wrote:
quoted
I know this question wasn't directed at me, but, I do always compile
ipsec stuff into my kernel, in addition to netfilter. The relevant
options are attached for the curious.
Yes, but do you actually install any IPSEC rules into your system?
Unless FC2 initscripts do something weird (I've never configured
IPSEC... only the policies that the kernel boots with (presumably the
null set?).
Jeff
From: Jeff Garzik <hidden> Date: 2004-11-05 07:38:19
BTW to netdev, there is IMHO no excuse not to test IPv6 ;-)
Plugging... Check out
http://linux.yyz.us/ipv6-fc2-howto.html
for starting points. Quick and easy IPv6 "6to4 automatic tunneling"
setup for FC1/FC2, with pointers to Deb/Mac/Win instructions.
Jeff
On Fri, Nov 05, 2004 at 02:38:19AM -0500, Jeff Garzik wrote:
BTW to netdev, there is IMHO no excuse not to test IPv6 ;-)
:-)
RIPE hands out IPv6 address space in chunks of /32, and it will only
allocate such a /32 for you if you plan on assigning more than 200 /48's
in two years.
They specify that you should assign a /64 to a customer if they only
need a single subnet, otherwise you should assign a /48. In order to
assign 200 /48's in two years, you have to assign 200 address blocks
to people who need at least 2 subnets, so that means you have to assign
at least 400 subnets' worth of address space.
If you take the canonical IPv6 subnet to be a /64 and the canonical
IPv4 subnet to be a /24, that means you have to assign a block of IPv6
address space that roughly corresponds to a IPv4 /15 in two years in
order to get IPv6 address space at all.
I politely told RIPE that I don't think we'll be assigning that much
address space any time soon, and the result of that was that our address
space request was simply denied ("because it does not comply with current
policy.")
As a result of all this nonsense, the ISPs in the Netherlands (and
elsewhere) that do supply IPv6 connectivity to their customers resort
to the immensely wasteful practise of giving each and every single
customer an entire /48 because otherwise they will not have assigned
enough address space in two years and risk the wrath of RIPE.
(And there's no way in hell you'll get people to peer with you if you
start sending them 2002:xxxx:xxxx::/48 routes :-)
cheers,
Lennert