From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [94.130.110.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 942B91F405 for ; Mon, 22 Jan 2024 01:08:14 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=qxoYcYMU; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=MAT60Gy0; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 9F57981EA2; Mon, 22 Jan 2024 01:08:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1705885687; bh=sggbyZrtmHA8NyDM85IsAzLwdzJi1nDb4I2okYglSR0=; h=Date:References:To:Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Cc:From; b=qxoYcYMU02h8qmXYj9SzHKYUdtXqd/A2lk3YE/N9uvMEK7OTWK4fXhbl0qtAkWnDq cBsFRA0oZNz258+Rt9kglFfIR0LQDQbOzGBrr8WeoZUQZZhUCadU7Ws4AkDBWMl+Xs 8/xWHwcM/s5x4sQ5L751hPjbnhixOu0X4yumjFj4= Received: from csnrwnwx.outbound-mail.sendgrid.net (csnrwnwx.outbound-mail.sendgrid.net [198.37.146.154]) by nue.mailmanlists.eu (Postfix) with ESMTPS id C4B4781E86 for ; Mon, 22 Jan 2024 01:08:03 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=pass (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=MAT60Gy0; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc:content-type:from:subject:to; s=s1; bh=iORBR5eMAC2Yse9r8grf7yN6TMN+ZJ/AvseI6+I07RI=; b=MAT60Gy0vV95hTB8uVLgyJJR6vquCCUpaCYLPmWrWStkiC2Xl6K1BrLueA65PfxzNtIM rnT6zlUdw/gTUNgtksf99lxxNvMn8cHC59f3mq+gULKk/NLfO6KxfusljRxCr7fQB9GvDs xs2Yp6205PyDMNH1PkRYwIKfh2ssodN7NM5chlqe6jJSNXggUNE6lit4AJ+P5bfUCO/RPl PfRQeQaAOb2YvsaYoWQMn7T3YTKL/6LR4oJTjzL5jPR0jHLns7YNL28RHjYPm8/CMIah6z hNjp2XHMcKVNpRTUeDYpR8TO7Y+lCqaM2r1I9T7rlEbKN/jOQLXImjJiV11qKriQ== Received: by filterdrecv-5bbdbb56cd-52lf9 with SMTP id filterdrecv-5bbdbb56cd-52lf9-1-65ADBFF1-10 2024-01-22 01:08:01.406732249 +0000 UTC m=+906634.531397252 Received: from herokuapp.com (unknown) by geopod-ismtpd-36 (SG) with ESMTP id jDYGD-apRwu9HSABCBL3BA for ; Mon, 22 Jan 2024 01:08:01.390 +0000 (UTC) Date: Mon, 22 Jan 2024 01:08:01 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 20198 X-Redmine-Issue-Author: kjtsanaktsidis X-Redmine-Issue-Assignee: kjtsanaktsidis X-Redmine-Sender: kjtsanaktsidis X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-Redmine-MailingListIntegration-Message-Ids: 92918 X-SG-EID: =?us-ascii?Q?bpuAnwiv5wR3AMKfH76hNK7PI5khDDZ1kji5+D8yFrgaUvTZzAkIlQXnVriLYY?= =?us-ascii?Q?wZntoXP0DUH6R9LNgqzTU1esCZ4KY8M9zX8WDhO?= =?us-ascii?Q?VCp0C6iOQ+ZJoIYstZJ89qzmdwg26U1kFCECYhg?= =?us-ascii?Q?B0p=2FTTdb7ESkc5O+fNZGctuwbAnOEERNxZLNWPS?= =?us-ascii?Q?N3I7ZD54s2Ih=2Fxkk2o01Bjs1hrLGXjqtUrDpr2M?= =?us-ascii?Q?=2FYWsmyHiGjdOC0z0UEduqyGcebq0vKJTnp=2FHe2a?= =?us-ascii?Q?n4K6sgoS0JMh6K1O9KycYcKcgFCRrh6cHh=2Ft1w=2F?= =?us-ascii?Q?lA0=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== Message-ID-Hash: USCDKRV2QWTURYJR25APTXDUMCIV7ZXU X-Message-ID-Hash: USCDKRV2QWTURYJR25APTXDUMCIV7ZXU X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:116357] [Ruby master Bug#20198] Threaded DNS resolver does not propagate errno to the calling thread List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core" Cc: "kjtsanaktsidis (KJ Tsanaktsidis)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20198 has been updated by kjtsanaktsidis (KJ Tsanaktsidis). https://github.com/ruby/ruby/pull/9628 will fix this. ---------------------------------------- Bug #20198: Threaded DNS resolver does not propagate errno to the calling thread https://bugs.ruby-lang.org/issues/20198#change-106379 * Author: kjtsanaktsidis (KJ Tsanaktsidis) * Status: Open * Priority: Normal * Assignee: kjtsanaktsidis (KJ Tsanaktsidis) * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- If we get a return value of `EAI_SYSTEM` from `getaddrinfo`, we transform that into an appropriate `Errno::` exception on the Ruby side. However, because we now run the actual call to `getaddrinfo` in a thread, we lose that `errno` value (because `errno` is thread-local). So, what we actually raise in case of `EAI_SYSTEM` is just the last error which happened on the calling thread - e.g. this `ECHILD` which presumably got set in the bowels of pthreads somewhere: ``` 1) Socket::IPSocket#getaddress raises an error on unknown hostnames ERROR Expected SocketError but got: Errno::ECHILD (No child processes - getaddrinfo) /home/runner/work/ruby/ruby/src/spec/ruby/library/socket/ipsocket/getaddress_spec.rb:22:in `getaddress' /home/runner/work/ruby/ruby/src/spec/ruby/library/socket/ipsocket/getaddress_spec.rb:22:in `block (3 levels) in ' /home/runner/work/ruby/ruby/src/spec/ruby/library/socket/ipsocket/getaddress_spec.rb:21:in `block (2 levels) in ' /home/runner/work/ruby/ruby/src/spec/ruby/library/socket/ipsocket/getaddress_spec.rb:4:in `' ``` -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/