From owner-freebsd-questions@freebsd.org Sun Dec 27 17:54:24 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 E76954C1F11 for ; Sun, 27 Dec 2020 17:54:24 +0000 (UTC) (envelope-from rahulbharadwajpromos@gmail.com) Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D3pGS1FGHz4vLK for ; Sun, 27 Dec 2020 17:54:23 +0000 (UTC) (envelope-from rahulbharadwajpromos@gmail.com) Received: by mail-io1-xd31.google.com with SMTP id m23so7658953ioy.2 for ; Sun, 27 Dec 2020 09:54:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sDoGFIj5mNIQDPGXjCn1K0tn82UqUA455voKXUsCY+A=; b=q6OpWyAdkYmf7JDadWQYk0YWUIdZ74kjzwGCgEfXN15WAwy8JbPgiiQ4thGypw+e0H itBh6JdG37vhOeO8E9YotmorLz96yYdY27l/AaE5giBRxpCg2ri6+G4eqgpNwj93rDRP JP/qeMQKWk3Wr0loXM9Iqr2WQKDaxVtgDZg34YEJXlXab1dFFSsGWLuCF3A0pKaVMf51 E2qGKStQ3Yr2zrMUaWoKK+Z+xsLlHJpuXIbSxYwEDUuc502P9e/4K+PB6fJVMYCJOx99 yb5NpSwLuf0dYrTZgYQfQj74mcQxoaGgtQIyJaCjHZYF5zqXVwn8cnrd41znJH7A7zql Artw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sDoGFIj5mNIQDPGXjCn1K0tn82UqUA455voKXUsCY+A=; b=VJg/uexYnbOGyqRgK9Lr40I/fVxNYzHXau4TVqsCe5jnF7miE2iu6P+03inqerxwIk gFwp102ixaFaE2vCMNlyAm0hJcZawTD0eNnEEgwNHnirTHkbOd2v7JgRe+CsszgGWYxj HaPR4OthNPjNAZ/P3TqBYSyEdaPh9BnTc+lNuJlwjW3mg31kSVYJ5vWTAxyHv7bWVZ4c 9C+g7+X6yW+Dr19uBf9JmB5KIiPFUeoy0nti5ma7XqgCwc9pHVxRP8Ypo2P/0hmgmQj7 uJJT7h89pyyDeOBuJgcTlWXAvvwl/JuPn093R9oHkZxuGZWmDNO1FXJA99NC24Lv01xH lCrA== X-Gm-Message-State: AOAM533PlP/S5idxDGUAEkvc59abg6RGVK23MBmajYwdOjWIiLFwAJnr Ltwu/8atBIuMRFZzrVJoqp5w3MkRwGx5nMUh4sAd47jB X-Google-Smtp-Source: ABdhPJx94QmI+rGNjz+VpMHCrKY8oV65ghrSKc5mT63InuwEr3iypNH2/NkM1WtvbZ2WpVsWidhN+qF0MX/BeBWYHgs= X-Received: by 2002:a6b:b8d6:: with SMTP id i205mr33683816iof.135.1609091663062; Sun, 27 Dec 2020 09:54:23 -0800 (PST) MIME-Version: 1.0 References: <20201227185021.1190a289.freebsd@edvax.de> In-Reply-To: <20201227185021.1190a289.freebsd@edvax.de> From: Rahul Bharadwaj Date: Sun, 27 Dec 2020 23:24:12 +0530 Message-ID: Subject: =?UTF-8?Q?Re=3A_What_does_=E2=80=9CNo_anode=E2=80=9D_mean_in_errno_55_when_s?= =?UTF-8?Q?ocket_connection_fails=3F?= To: Polytropon Cc: freebsd-questions@freebsd.org X-Rspamd-Queue-Id: 4D3pGS1FGHz4vLK X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=q6OpWyAd; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rahulbharadwajpromos@gmail.com designates 2607:f8b0:4864:20::d31 as permitted sender) smtp.mailfrom=rahulbharadwajpromos@gmail.com X-Spamd-Result: default: False [-2.07 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.07)[-0.070]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::d31:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::d31:from:127.0.2.255]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d31:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-questions] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 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:54:25 -0000 I see. I had to look into the FreeBSD source than the internet for the error number. Now the error makes sense. Thank you!! On Sun, Dec 27, 2020 at 11:20 PM Polytropon wrote: > 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, ... >