From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8320 Path: news.gmane.org!not-for-mail From: Tastky Newsgroups: gmane.linux.lib.musl.general Subject: Re: nfs-utils broken with musl: "select: Bad file descriptor" Date: Tue, 18 Aug 2015 18:50:54 +0200 Message-ID: <55D3626E.4080107@gmail.com> References: <55D298BD.2030903@gmail.com> <20150818030021.GG32742@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1439916683 16668 80.91.229.3 (18 Aug 2015 16:51:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Aug 2015 16:51:23 +0000 (UTC) Cc: musl@lists.openwall.com To: Rich Felker Original-X-From: musl-return-8332-gllmg-musl=m.gmane.org@lists.openwall.com Tue Aug 18 18:51:12 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1ZRk6R-0002wo-JL for gllmg-musl@m.gmane.org; Tue, 18 Aug 2015 18:51:11 +0200 Original-Received: (qmail 29956 invoked by uid 550); 18 Aug 2015 16:51:08 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 29926 invoked from network); 18 Aug 2015 16:51:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=RJza1BktEr0lfwBTrNlNE9YCSkR27moWbF4S2vWmoD8=; b=IFND25fFetoMUsg9sr+KmS7d7CVDlps1yCiakfDM4eX1Ukdafgy4F4DIf+gEG1t0HT FM6O+He3/z/dl2XQfsmRH0LfQt8w/HxsSQKg91uTmFoRRvFQN925+LExsqOkASGLfl2F ER3vzv/jGLWYmlI8bfXATEAYrlZ6saNBAspCEz6UlghoniZ5xzgsy1BqxUbiwN25T5AD 7xpQ6HdbgwT9ViEY3+NgXkPHXBrF1ymdlvnvpRZLAja2uRgR8GQ9hn07Tly92wFrppsV XZNL4Y9Rr9eqZyc/3t8jielgGEA+b3dMPorlUoGdwZTIXbQhRGLfVlnDEPQe9/qNjDxu Vtwg== X-Received: by 10.194.57.19 with SMTP id e19mr15847159wjq.152.1439916656391; Tue, 18 Aug 2015 09:50:56 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Thunderbird/40.0 In-Reply-To: <20150818030021.GG32742@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:8320 Archived-At: Just checked with said include and everything recompiled. Unfortunately the same error persists. Running OpenWrt's command /usr/sbin/rpc.statd -p 32778 -o 32779 -F manually (following the script's prior steps, ofc) results in a loop of: sm-notify: Version 1.3.2 starting sm-notify: Already notifying clients; Exiting With strace: http://pastebin.com/raw.php?i=9ypUbmsp On 18.08.2015 05:00, Rich Felker wrote: > On Tue, Aug 18, 2015 at 04:30:21AM +0200, Tastky wrote: >> As by this OpenWRT bugreport: >> https://dev.openwrt.org/ticket/20038 >> >> On various architectures – at least a mips and powerpc one – >> nfs-utils is broken with musl, yielding a never ending stream of >> "my_svc_run() - select: Bad file descriptor" in the system log. >> >> The message originates in the this file: >> http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=blob;f=utils/statd/svc_run.c >> >> "Downgrading" to uClibc has the issue vanish. >> >> I verified this myself with recent git versions of both musl and the >> utils on a fresh ar71xx OpenWRT compilation. > > Here's my quick guess at what's going wrong. This file: > > http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=blob;f=utils/statd/system.h;h=a1739c491474179c16a64f7a2bbfde8f651085c6;hb=HEAD > > contains nonsense to define SVC_FDSET as int rather than using fd_set > on "systems which don't have fd_set" (which don't exist). > Unfortunately, it's checking #ifdef FD_SETSIZE without including the > header that defines it, sys/select.h. If this is the problem, adding: > > #include > > to the top of that file should fix the error. > > Note that compiling with -Werror=implicit-function-declaration would > catch such bogus code right away. > > If this turns out not to be the problem, can you send an strace of the > failing program up to the first failure message? > > Rich >