From: James Harper <james.harper@bigpond.com>
To: linux-kernel@vger.kernel.org
Cc: yoshfuji@linux-ipv6.org
Subject: Re: oops in inet_bind/tcp_v4_get_port
Date: Sat, 13 Sep 2003 22:23:53 +1000 [thread overview]
Message-ID: <3F630C59.5090004@bigpond.com> (raw)
In-Reply-To: 20030913.192535.114458752.yoshfuji@linux-ipv6.org
I haven't disabled preemption, but I have pinned down where i'm getting
the crash... it appears to be related to ipv6, and from what I can
determine the following is happening:
When I stop slapd... netstat -an | grep 389 looks like this:
tcp 1 0 127.0.0.1:32973 127.0.0.1:389 CLOSE_WAIT
tcp 0 0 127.0.0.1:32974 127.0.0.1:389 TIME_WAIT
tcp6 0 0 ::ffff:127.0.0.1:389 ::ffff:127.0.0.1:32973 FIN_WAIT2
tcp6 0 0 ::ffff:127.0.0.1:389 ::ffff:127.0.0.1:32958 FIN_WAIT2
If I restart it immediately, I get the oops (it's always a null pointer
dereference, it's more often the one where you access memory that's out
of bounds). If I wait until the tcp6 connections time out, and then
restart, I don't get the oops.
The crash is happening in net/ipv4/tcp_ipv4.c - tcp_bind_conflict (it's
inline, which i guess is why it isn't in the oops trace, but it's called
from tcp_v4_get_port), specifically in the call to the macro
ipv6_only_sock. My guess is that while the sock says it's PF_INET6, it
doesn't have the extra ipv6 stuff (specifically the pointer to
ipv6_pinfo) so it's reading past the end of the structure, or that the
stuff past the main sock struct is getting corrupted. I think the former
is more likely but either possibility explains why I got a null pointer
dereference one time, and the other oops the other time.
This is the first time i've ever really looked at the networking code in
the kernel so I can't easily see how the above situation could arise,
but if anyone wants me to test anything i'm more than happy to!
thanks
James
YOSHIFUJI Hideaki / ???? wrote:
>In article <3F62EA61.1000804@bigpond.com> (at Sat, 13 Sep 2003 19:58:57 +1000), James Harper <james.harper@bigpond.com> says:
>
>
>
>>I get a null pointer exception in the same routine when restarting slapd
>>in 2.6.0-test5, and it hangs my system hard. I'm investigating now. If
>>anyone has a patch already please send me a copy too!
>>
>>
>
>Have you tried to disable kernek preemption?
>
>--yoshfuji
>
>
>
next prev parent reply other threads:[~2003-09-13 12:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-13 9:58 oops in inet_bind/tcp_v4_get_port James Harper
2003-09-13 10:25 ` YOSHIFUJI Hideaki / 吉藤英明
2003-09-13 12:23 ` James Harper [this message]
2003-09-13 13:18 ` YOSHIFUJI Hideaki / 吉藤英明
-- strict thread matches above, loose matches on Subject: below --
2003-09-11 11:42 Wichert Akkerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F630C59.5090004@bigpond.com \
--to=james.harper@bigpond.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox