From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 28 12:30:59 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D20B106564A for ; Thu, 28 Aug 2008 12:30:59 +0000 (UTC) (envelope-from prvs=1126b68502=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id 0FE778FC14 for ; Thu, 28 Aug 2008 12:30:58 +0000 (UTC) (envelope-from prvs=1126b68502=killing@multiplay.co.uk) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=multiplay.co.uk; s=Multiplay; t=1219925645; x=1220530445; q=dns/txt; h=Received: Message-ID:From:To:Subject:Date:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=N+uZ8MjEBkMN7kxGrhtB5/+n1qJMOtVbPj zr8DrqedU=; b=jCvjCj+IvySNHIG21ZPlS3t8qCL+ymIm3iw9Q0e85ZlS29BfeB 938fqpR3hXE93bkwUkA81ySZtuHkZDw6YHlDi3C9ftNNlM3qh7s0KvnH8qFtuaga 5TME0l9NuAGp3QE4Zp3ESB/T+exivPphMioNT3FaqH2wlUJpd4zraaTNs= X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-14.7 required=6.0 tests=BAYES_00, FORGED_MUA_OUTLOOK, USER_IN_WHITELIST,USER_IN_WHITELIST_TO autolearn=ham version=3.1.8 Received: from r2d2 by mail1.multiplay.co.uk (MDaemon PRO v9.6.6) with ESMTP id md50006097758.msg for ; Thu, 28 Aug 2008 13:14:03 +0100 X-Authenticated-Sender: Killing@multiplay.co.uk X-MDRemoteIP: 85.236.106.102 X-Return-Path: prvs=1126b68502=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org Message-ID: From: "Steven Hartland" To: Date: Thu, 28 Aug 2008 13:13:57 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Spam-Processed: mail1.multiplay.co.uk, Thu, 28 Aug 2008 13:14:04 +0100 X-MDAV-Processed: mail1.multiplay.co.uk, Thu, 28 Aug 2008 13:14:05 +0100 Subject: lighttpd failing to accept new connections ( connection reset ) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2008 12:30:59 -0000 We're using lighttpd here for a new project and we're having issues where by it simply stops processing after a 1-2 days. Having looked at it in some detail this morning it seems that the kernel is resetting the connection without notifying the lighttpd process there is a new connection attempt. I assume that the listen queue is full but why kevent is not notifying lighttpd that there are outstanding events is beyond me. The following is a truss of the process which is currently in this state:- kevent(6,0x0,0,{},11096,{1.000000000}) = 0 (0x0) gettimeofday({1219920575.149428},0x0) = 0 (0x0) kevent(6,0x0,0,{},11096,{1.000000000}) = 0 (0x0) gettimeofday({1219920576.150443},0x0) = 0 (0x0) ktrace of the operation as well:- 28363 lighttpd RET kevent 0 28363 lighttpd CALL gettimeofday(0x7fffffffeb20,0) 28363 lighttpd RET gettimeofday 0 28363 lighttpd CALL kevent(0x6,0,0,0x800e66000,0x2b58,0x7fffffffeb20) 28363 lighttpd GIO fd 6 wrote 0 bytes "" 28363 lighttpd GIO fd 6 read 0 bytes "" 28363 lighttpd RET kevent 0 28363 lighttpd CALL gettimeofday(0x7fffffffeb20,0) 28363 lighttpd RET gettimeofday 0 28363 lighttpd CALL kevent(0x6,0,0,0x800e66000,0x2b58,0x7fffffffeb20) 28363 lighttpd GIO fd 6 wrote 0 bytes "" 28363 lighttpd GIO fd 6 read 0 bytes "" 28363 lighttpd RET kevent 0 28363 lighttpd CALL gettimeofday(0x7fffffffeb20,0) 28363 lighttpd RET gettimeofday 0 28363 lighttpd CALL kevent(0x6,0,0,0x800e66000,0x2b58,0x7fffffffeb20) 28363 lighttpd GIO fd 6 wrote 0 bytes "" 28363 lighttpd GIO fd 6 read 0 bytes "" 28363 lighttpd RET kevent 0 28363 lighttpd CALL gettimeofday(0x7fffffffeb20,0) 28363 lighttpd RET gettimeofday 0 28363 lighttpd CALL kevent(0x6,0,0,0x800e66000,0x2b58,0x7fffffffeb20) 28363 lighttpd GIO fd 6 wrote 0 bytes "" 28363 lighttpd GIO fd 6 read 0 bytes "" 28363 lighttpd RET kevent 0 28363 lighttpd CALL gettimeofday(0x7fffffffeb20,0) 28363 lighttpd RET gettimeofday 0 28363 lighttpd CALL kevent(0x6,0,0,0x800e66000,0x2b58,0x7fffffffeb20) 28363 lighttpd GIO fd 6 wrote 0 bytes "" 28363 lighttpd GIO fd 6 read 0 bytes "" 28363 lighttpd RET kevent 0 28363 lighttpd CALL gettimeofday(0x7fffffffeb20,0) 28363 lighttpd RET gettimeofday 0 28363 lighttpd CALL kevent(0x6,0,0,0x800e66000,0x2b58,0x7fffffffeb20) tcpdump shows:- 12:10:29.475255 IP (tos 0x10, ttl 64, id 9536, offset 0, flags [DF], proto: TCP (6), length: 64) client.61224 > server.80: S, cksum 0x6d22 (incorrect (-> 0xedfa), 291994449:291994449(0) win 65535 12:10:29.481396 IP (tos 0x0, ttl 61, id 25503, offset 0, flags [DF], proto: TCP (6), length: 60) server.80 > client.61224: S, cksum 0xbf22 (correct), 3444532576:3444532576(0) ack 291994450 win 65535 12:10:29.481419 IP (tos 0x10, ttl 64, id 9538, offset 0, flags [DF], proto: TCP (6), length: 52) client.61224 > server.80: ., cksum 0x6d16 (incorrect (-> 0x6bd2), 1:1(0) ack 1 win 33304 12:10:29.487519 IP (tos 0x10, ttl 61, id 25504, offset 0, flags [DF], proto: TCP (6), length: 40) server.80 > client.61224: R, cksum 0x20c7 (correct), 3444532577:3444532577(0) win 0 This may have been raised before back 2003 as bug kern/57380 but it was closed after no response from the reporter. Another possible issues related to this is:- http://trac.lighttpd.net/trac/ticket/1734 I've currently got one of the production machines offline with this error ( hence the important flag ) in the hope that someone can suggest a test which will shed more light on the issue before I restart it. Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk.