Re: tcp md5 checksums broken in 7.0-beta3
On Wed, 28 Nov 2007, Bjoern A. Zeeb wrote: Hi, On Wed, 28 Nov 2007, Bjoern A. Zeeb wrote: On Wed, 28 Nov 2007, Nick Hilliard wrote: Hi, Bjoern A. Zeeb wrote: I'll try to find your bug the next days (in case you find anything let me know). At the very least, this will be necessary: --- tcp_subr.c~2007-11-28 01:14:46.0 + +++ tcp_subr.c 2007-11-28 01:14:46.0 + @@ -1948,7 +1948,7 @@ /* * Step 4: Update MD5 hash with shared secret. */ - MD5Update(&ctx, _KEYBUF(sav->key_auth), _KEYLEN(sav->key_auth)); + MD5Update(&ctx, sav->key_auth->key_data, _KEYLEN(sav->key_auth)); MD5Final(buf, &ctx); key_sa_recordxfer(sav, m); But it doesn't fix the problem. That fix was committed to HEAD. Thanks! In addition to that can you try this patch: http://sources.zabbadoz.net/freebsd/patchset/patch-20071128-03-tcp-md5.diff I have to admit, I haven't tried it after my last merges so I hope I got the merges right;-) -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT Software is harder than hardware so better get it right the first time. ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Sleeping on "iwiioctl" with the non-sleepable locks
Hello. i've got this on 7.0-BETA3 i386 (as of Nov 21) when starting dhclient iwi0 (well, actually network card is switched off via Fn-key). Kernel is built with debugging options. [EMAIL PROTECTED]:1:3:0:class=0x028000 card=0x27228086 chip=0x42208086 rev=0x05 hdr=0x00 vendor = 'Intel Corporation' device = 'PRO/Wireless 2200BG Network Connection' class = network iwi0: flags=8843 metric 0 mtu 1500 ether 00:0e:35:be:77:df inet 192.168.70.65 netmask 0xff00 broadcast 192.168.70.255 media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps) status: associated ssid plip channel 6 (2437 Mhz 11g) bssid 00:80:c8:01:15:d9 authmode WPA privacy ON deftxkey UNDEF txpowmax 100 bmiss 10 scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi11g 14 roam:rate11g 5 protmode CTS roaming MANUAL bintval 100 iwi0: radio turned off Sleeping on "iwiioctl" with the following non-sleepable locks held: exclusive sleep mutex in_multi_mtx r = 0 (0xc084792c) locked @ /media/src/sys/netinet/in.c:508 KDB: stack backtrace: db_trace_self_wrapper(c077db7b,e636da8c,c056b55d,c077df31,e636daa0,...) at db_trace_self_wrapper+0x26 kdb_backtrace(c077df31,e636daa0,4,1,0,...) at kdb_backtrace+0x29 witness_warn(5,c3bc5418,c077ba3b,c0902e4f,c3bc5418,...) at witness_warn+0x1cd _sleep(c3bc4000,c3bc5418,0,c0902e4f,3e8,...) at _sleep+0x5f iwi_ioctl(c3c20c00,80206932,0,9c6,c46257c0,...) at iwi_ioctl+0x64 if_delmulti_ifma(c422c5c0,c07ca740,c078c3d1,1b5) at if_delmulti_ifma+0xe9 in_delmulti_locked(c46257c0,0,c078c2fc,1fd,c07873a6,...) at in_delmulti_locked+0xe6 in_control(c4412948,80206919,c422c3c0,c3c20c00,c3f89420,...) at in_control+0x105a ifioctl(c4412948,80206919,c422c3c0,c3f89420,c3f89420,...) at ifioctl+0x333 soo_ioctl(c3e16c60,80206919,c422c3c0,c452f600,c3f89420,...) at soo_ioctl+0x3e2 kern_ioctl(c3f89420,3,80206919,c422c3c0,c422c3c0,...) at kern_ioctl+0x253 ioctl(c3f89420,e636dcfc,c,c07a5174,c07b8830,...) at ioctl+0x13f syscall(e636dd38) at syscall+0x2f3 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (54, FreeBSD ELF32, ioctl), eip = 0x2817c793, esp = 0xbfbfe63c, ebp = 0xbfbfe668 --- iwi0: radio turned off wbr, pluknet ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: connect() returns EADDRINUSE during massive host->host conn rate
Jan Srzednicki wrote: Hello, I have a pair of hosts. One of them performs a massive amount of TCP connections to the other one, all to the same port. This setup mostly works fine, but from time to time (that varies, from once a minute to one a half an hour), the connect(2) syscall fails with EADDRINUSE. The connection rate tops to 50 connection so, what does netstat -aAn show? initiations/second. The socket is non-blocking. It does standard job of creating the socket, setting up the relevant fields, setting SO_REUSEADDR and SO_KEEPALIVE, setting O_NONBLOCK on the descriptor. No bind(2) is performed. The connection is initiated from inside a jail (not sure if that implies a internal bind(2) to the jail's address). There are no connections from the other host to the first one. I've tried tuning the net.inet.ip.portrange variables: I've increased the available portrange to over 45000 ports (quite a lot, should be more than enough for just anything) and I've toggled net.inet.ip.portrange.randomized off, but that didn't change anything. The workaround on the application side - retrying on EADDRINUSE - works pretty well, but hey, from what I know from the Stevens book, that shouldn't be happening, though Google said all BSD had a bad habit of throwing out EADDRINUSE from time to time. This all happens on a 6.2-RELEASE system. The symptoms are easily reproducable in my environment. Is there any known fix for that? If there ain't, can it be fixed? :) ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: connect() returns EADDRINUSE during massive host->host conn rate
On Tue, Nov 27, 2007 at 02:53:20PM +0100, Jan Srzednicki wrote: > Hello, > > setting up the relevant fields, setting SO_REUSEADDR and SO_KEEPALIVE, > setting O_NONBLOCK on the descriptor. No bind(2) is performed. The > connection is initiated from inside a jail (not sure if that implies a > internal bind(2) to the jail's address). There are no connections from > the other host to the first one. And some additional info: subsequent connect()s on the same keep returning EADDRINUSE as well. In order to establish a connection, the application must create a brand new socket and then retry connect(). -- Jan Srzednicki :: http://wrzask.pl/ "Remember, remember, the fifth of November" -- V for Vendetta ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: connect() returns EADDRINUSE during massive host->host conn rate
On Wed, Nov 28, 2007 at 10:22:08AM -0800, Julian Elischer wrote: > Jan Srzednicki wrote: >> Hello, >> I have a pair of hosts. One of them performs a massive amount of >> TCP connections to the other one, all to the same port. This setup >> mostly works fine, but from time to time (that varies, from once a >> minute to one a half an hour), the connect(2) syscall fails with >> EADDRINUSE. The connection rate tops to 50 connection > > so, what does netstat -aAn show? How can I get any usable information from netstat? It shows a bunch of connections, of course, but since connect(2) failed, I have no idea what local port I was trying to use. And, what I forgot to mention, it's a SMP box, which could matter in case of some race condition. -- Jan Srzednicki :: http://wrzask.pl/ "Remember, remember, the fifth of November" -- V for Vendetta ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: connect() returns EADDRINUSE during massive host->host conn rate
Jan Srzednicki wrote: On Wed, Nov 28, 2007 at 10:22:08AM -0800, Julian Elischer wrote: Jan Srzednicki wrote: Hello, I have a pair of hosts. One of them performs a massive amount of TCP connections to the other one, all to the same port. This setup mostly works fine, but from time to time (that varies, from once a minute to one a half an hour), the connect(2) syscall fails with EADDRINUSE. The connection rate tops to 50 connection so, what does netstat -aAn show? How can I get any usable information from netstat? It shows a bunch of connections, of course, but since connect(2) failed, I have no idea what local port I was trying to use. but you can get an idea of the local socket distribution, and what state all the sockets are in (TIME_WAIT etc). And, what I forgot to mention, it's a SMP box, which could matter in case of some race condition. hopefully not. ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: connect() returns EADDRINUSE during massive host->host conn rate
On Wed, 28 Nov 2007, Ivan Voras wrote: Jan Srzednicki wrote: Hello, I have a pair of hosts. One of them performs a massive amount of TCP connections to the other one, all to the same port. This setup mostly works fine, but from time to time (that varies, from once a minute to one a half an hour), the connect(2) syscall fails with EADDRINUSE. The connection rate tops to 50 connection initiations/second. This looks like the old (and probably well known) problem "ab" has. ("ab" is "apache benchmark", a utility which is bundled with apache and which does repeated connections to the specified address, does transactions and computes some statistics). AFAIK this behaviour was present since at least 5.2, maybe earlier. No known fixes. Could it have anything to do with the listen backlog on the server end? -- DE ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"