From owner-freebsd-questions@FreeBSD.ORG Fri Dec 13 14:40:29 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EDBCD5C for ; Fri, 13 Dec 2013 14:40:29 +0000 (UTC) Received: from mail-ie0-x22c.google.com (mail-ie0-x22c.google.com [IPv6:2607:f8b0:4001:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 100EE1ED0 for ; Fri, 13 Dec 2013 14:40:28 +0000 (UTC) Received: by mail-ie0-f172.google.com with SMTP id qd12so2923244ieb.3 for ; Fri, 13 Dec 2013 06:40:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=rpc99nagmjTiRx7hNeYAcvpfFTNYIxGTTLJb6fvqc5U=; b=pELCxbnSFFq6RBu1d4lF4BghVBqFshS2WpKRmiOcp6SV1pmgn5f+WJg+5jGCq3VBF0 pOEjmZ5TYPLq7CMB0b8Q0ChGfetuoS6b83xhctSa3++++dvnJT8UfZX3/2ORCl3Om+ci nnDbymBen8L+ajcntIiRraz8PBjynkGBtoyzsW+HCXjsdR9uL20t5rZWMCvtcVK/DC3G 23J7KAkyVjLP2Ta0Wu1eFn6l5Y12lvYOeyTuNXJJdSTZih0eKBEDf2itkebjlZSV3A/J SiE8OuXObYGZu34xY6d3gWems1+/h5V/fZLYEbifSB5vj0yKFfwOjydvJF/wCQzR/zKI B9MQ== X-Received: by 10.43.49.132 with SMTP id va4mr880362icb.79.1386945628491; Fri, 13 Dec 2013 06:40:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.231.161 with HTTP; Fri, 13 Dec 2013 06:39:58 -0800 (PST) From: sven falempin Date: Fri, 13 Dec 2013 09:39:58 -0500 Message-ID: Subject: My non blocking socket is stuck in accept To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 14:40:29 -0000 Hello, i have a server application in C. In the server an accept, after a long sage, 'eats' 100% power of a cpu core. The socket is non blocking and program ran poll first, then accept. I am trying to create a minimal program but it is not easy. I trust my code because it is not mine, i use libevent. http://forums.freebsd.org/viewtopic.php?f=35&t=43654 if no idea could you point where is __sys_accept code so i can try to figure out what kind of error could do infinite loop in accept ? -- --------------------------------------------------------------------------------------------------------------------- () ascii ribbon campaign - against html e-mail /\