From owner-freebsd-questions@freebsd.org Sun Dec 27 17:50:25 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E57EA4C1B23 for ; Sun, 27 Dec 2020 17:50:25 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.134]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D3p9r4Wncz4v6s for ; Sun, 27 Dec 2020 17:50:24 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([94.222.15.85]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPA (Nemesis) id 1MJmbB-1kZypb04sb-00KBa1; Sun, 27 Dec 2020 18:50:22 +0100 Date: Sun, 27 Dec 2020 18:50:21 +0100 From: Polytropon To: Rahul Bharadwaj Cc: freebsd-questions@freebsd.org Subject: Re: What does =?UTF-8?Q?=E2=80=9CNo_anode=E2=80=9D?= mean in errno 55 when socket connection fails? Message-Id: <20201227185021.1190a289.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:SOcixoI/Sm9hGIGFA4/d/FkzParmNGx5UNkRrWl2+nvjGVRrfcL UXhv5dmcLHqe9LJrc8j16Lf1iFG3qJiq3DHE0Q1ZmGBcgzynFerz38Na5JDI9SsU7BMtAHq tCeBt9mb2x7Ygr5gidPhNpbt/sTPCA2WEsV/ZY00mA6IZQ3oKOUkltz5WSi0o20+n/grjq1 BFHEgfqfbQmnTVUGlQZLA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:EVBlgeDOo84=:uEEbrgYve1GkZnMnBjD4za JtWBUNl5Q1g0PlM78/pYD9XswYsxOX/agiMnea5t0vWZ+hKMNWpaF2l0cnWS7eWBhsivt0QqU HEg1f7Usrq3Sbo3Mni7ZqwoEE3Rem7DGvyksnNXoL05N0nLhUMMB290UVAIEoRLuBKeJJik2V k4T49yjIIK3TISZLrYjiDSHg3yEZxMTlqPUoshVnPlFOTJfTP9M6nbrXliKcY+USGhbv2XNrn fnxZXB8ch8WppO8QMYuIpxY398FgspkOPwn7JV3milBh7OhdARR9XSkGJgZoDiWd89kHsBbBX vZDU1tDj4W11hXzbIOxh6aaMpJc6eNBXM6OLxKz2rVJbBqJSLv/wRLeXfOPk9T859PFAjzFIC T65YzY1v1rq1yxcs6LK+oQyY/YJItQMOxBs8B8NqIBS4ZZTBwcgJjYqdiJoIn X-Rspamd-Queue-Id: 4D3p9r4Wncz4v6s X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 212.227.126.134) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [2.02 / 15.00]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[212.227.126.134:from]; RECEIVED_SPAMHAUS_PBL(0.00)[94.222.15.85:received]; SUBJECT_ENDS_QUESTION(1.00)[]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_SHORT(0.62)[0.624]; SPAMHAUS_ZRD(0.00)[212.227.126.134:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[212.227.126.134:from]; R_SPF_NA(0.00)[no SPF record]; RWL_MAILSPIKE_POSSIBLE(0.00)[212.227.126.134:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Dec 2020 17:50:26 -0000 On Sun, 27 Dec 2020 23:03:17 +0530, Rahul Bharadwaj wrote: > I was doing a few performance tests on a local server and once in a while I > hit an error where opening a socket connection fails. > > i.e. considering the simplest code: > > #include > #include > > int main() { > /* code to create socket object */ > > int ret = connect(sock, (struct sockaddr *)&serv_addr, > sizeof(serv_addr)); > if (ret < 0) { > fprintf(stderr, "connect() failed with: %d\n", errno); // <---- *get > errno as 55* > exit(1); > } > /* other code */ > } > > There is no explanation for this error number "55". In /usr/include/sys/errno.h, you can find the following entry: #define ENOBUFS 55 /* No buffer space available */ Also in "man 2 intro", the introduction to system calls, there's a section about errno: 55 ENOBUFS No buffer space available. An operation on a socket or pipe was not performed because the system lacked sufficient buffer space or because a queue was full. That doesn't help much, but regarding your example program snippet, it would match the context. > In every place, the > only mention is "No anode". There is no mention of what "anode" means and > what "No anode" specifically means. This is part of the binutils or gcc-libs (in contrib/ subtree of /usr/src, libiberty, or BSM security/ subtree). An anode is probably a kind of or a synonym for an inode (i-node, index node, a filesystem entry). But the error itself does not have to be in this context; it could be that an inode was requested but could not be allocated (filesystem problem), or the kernel ran out of buffer spaces for sockets, so maybe it means "allocation node"? Or maybe it's just one of those occassions where the programmer tought: I don't know what error to return here... ;-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...