From patchwork Thu Mar 26 13:45:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Petter Selasky X-Patchwork-Id: 28988 Received: from localhost ([127.0.0.1] helo=www.linuxtv.org) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1Yb85n-0006X0-AU; Thu, 26 Mar 2015 14:45:03 +0100 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1Yb85k-0006Wn-RI for vdr@linuxtv.org; Thu, 26 Mar 2015 14:45:01 +0100 X-tubIT-Incoming-IP: 88.198.202.214 Received: from heidi.turbocat.net ([88.198.202.214] helo=mail.turbocat.net) by mail.tu-berlin.de (exim-4.76/mailfrontend-5) with esmtps [UNKNOWN:AES256-GCM-SHA384:256] for id 1Yb85j-0001Cd-8I; Thu, 26 Mar 2015 14:45:00 +0100 Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 5AE0E1FE023 for ; Thu, 26 Mar 2015 14:44:58 +0100 (CET) Message-ID: <55140D89.6080406@selasky.org> Date: Thu, 26 Mar 2015 14:45:45 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: vdr@linuxtv.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2015.3.26.133919 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, MIME_TEXT_ONLY_MP_MIXED 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1400_1499 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, FROM_NAME_PHRASE 0, NO_URI_FOUND 0, __BAT_BOUNDARY 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_MIXED 0, __HAS_FROM 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MOZILLA_MSGID 0, __MOZILLA_USER_AGENT 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __USER_AGENT 0' X-LSpam-Score: -1.1 (-) X-LSpam-Report: No, score=-1.1 required=5.0 tests=BAYES_00=-1.9, RDNS_NONE=0.793 autolearn=no Subject: [vdr] select() problem seen with vdr-plugin-streamdev 0.6.1 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: vdr-bounces@linuxtv.org Errors-To: vdr-bounces@linuxtv.org Hi, I'm seeing this strange problem that a select statement in the streamdev server is returning EBADF and then the streamdev server exits and refuse to accept more connections. This typically happens when trying to stream a specific channel. Trying to stream other channels does not exhibit this problem. I can recompile code and try patches. I've made simple and crude patch to make the streamdev server plugin a bit more fault tolerant. See attachment. OS: FreeBSD-11-current Driver: Wecamd (Same as what is in Linux 3.18) BTW: Thank you for keeping VDR up to date! --HPS --- ./work/streamdev-0.6.1/server/server.c 2012-10-15 22:19:22.000000000 +0200 +++ server.c 2015-03-26 14:36:11.710805000 +0100 @@ -111,8 +111,10 @@ if (!Running()) break; if (sel < 0) { - esyslog("fatal error, server exiting: %m"); - break; + //esyslog("fatal error, server exiting: %m"); + //break; + sel = 0; + usleep(100000); } /* Ask all Server components to act on signalled sockets */