Re: Fix for 5.2-BETA lockup problems

2003-11-28 Thread Matt Smith
Andre Oppermann wrote:
Hello all,

I've found what probably is going wrong in tcp_hostcache.  The problem is me
cutting corners (what goes around comes around...) in tcp_hc_insert when the
bucket limit is reached.  I made the #if 0 too big and the bucket was not
removed from the tailqueue when we hit the bucket limit.  A couple of lines
later it is inserted again as head element which leads to an infinite loop
either when the next lookup on the same bucket row is done, or when the
the tcp_hc_purge function is run to timeout the entries.
Please try the attached patch which should fix it.

This appears to have succesfully cured my lockup. I now have the 
original kernel config booted again with full inet6 etc and it's not 
locked up.

Regards, Matt.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Fix for 5.2-BETA lockup problems

2003-11-28 Thread Andre Oppermann
M. Warner Losh wrote:
 
 In message: [EMAIL PROTECTED]
 Andre Oppermann [EMAIL PROTECTED] writes:
 : Please try the attached patch which should fix it.
 
 I've been having crashes all the time since the hostcache went into
 the tree.  I've been running a few hours with this patch (in which
 time I should have had a crash).  I think it makes it better.

Thank you for testing.  I've sent the patch to re@ for approval.

-- 
Andre
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Fix for 5.2-BETA lockup problems

2003-11-28 Thread M. Warner Losh
In message: [EMAIL PROTECTED]
Andre Oppermann [EMAIL PROTECTED] writes:
: M. Warner Losh wrote:
:  
:  In message: [EMAIL PROTECTED]
:  Andre Oppermann [EMAIL PROTECTED] writes:
:  : Please try the attached patch which should fix it.
:  
:  I've been having crashes all the time since the hostcache went into
:  the tree.  I've been running a few hours with this patch (in which
:  time I should have had a crash).  I think it makes it better.
: 
: Thank you for testing.  I've sent the patch to re@ for approval.

I was able to run overnight.  First time since the hostcache code
went in, so it definitely helps things!

Warner
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Fix for 5.2-BETA lockup problems

2003-11-27 Thread Andre Oppermann
Hello all,

I've found what probably is going wrong in tcp_hostcache.  The problem is me
cutting corners (what goes around comes around...) in tcp_hc_insert when the
bucket limit is reached.  I made the #if 0 too big and the bucket was not
removed from the tailqueue when we hit the bucket limit.  A couple of lines
later it is inserted again as head element which leads to an infinite loop
either when the next lookup on the same bucket row is done, or when the
the tcp_hc_purge function is run to timeout the entries.

Please try the attached patch which should fix it.

-- 
Andre


Index: tcp_hostcache.c
===
RCS file: /home/ncvs/src/sys/netinet/tcp_hostcache.c,v
retrieving revision 1.1
diff -u -p -r1.1 tcp_hostcache.c
--- tcp_hostcache.c 20 Nov 2003 20:07:38 -  1.1
+++ tcp_hostcache.c 27 Nov 2003 20:23:06 -
@@ -354,11 +354,11 @@ tcp_hc_insert(struct in_conninfo *inc)
 * maybe we drop something that is still in-use but we can
 * be lossy.
 */
-#if 0
TAILQ_REMOVE(hc_head-hch_bucket, hc_entry, rmx_q);
-   uma_zfree(tcp_hostcache.zone, hc_entry);
tcp_hostcache.hashbase[hash].hch_length--;
tcp_hostcache.cache_count--;
+#if 0
+   uma_zfree(tcp_hostcache.zone, hc_entry);
 #endif
tcpstat.tcps_hc_bucketoverflow++;
} else {
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Fix for 5.2-BETA lockup problems

2003-11-27 Thread M. Warner Losh
In message: [EMAIL PROTECTED]
Andre Oppermann [EMAIL PROTECTED] writes:
: Please try the attached patch which should fix it.

I've been having crashes all the time since the hostcache went into
the tree.  I've been running a few hours with this patch (in which
time I should have had a crash).  I think it makes it better.

Warner
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]