From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id AD3FF1F4C0 for ; Wed, 23 Oct 2019 20:20:38 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id BE423120B4C; Thu, 24 Oct 2019 05:20:28 +0900 (JST) Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id D8174120AEB for ; Thu, 24 Oct 2019 05:20:25 +0900 (JST) Received: by filter0168p3mdw1.sendgrid.net with SMTP id filter0168p3mdw1-3564-5DB0B60B-2 2019-10-23 20:20:27.004523002 +0000 UTC m=+164587.038942683 Received: from herokuapp.com (unknown [52.91.158.104]) by ismtpd0047p1mdw1.sendgrid.net (SG) with ESMTP id wMeUskbtR7C2mS6Uh6T_ww for ; Wed, 23 Oct 2019 20:20:26.930 +0000 (UTC) Date: Wed, 23 Oct 2019 20:20:27 +0000 (UTC) From: brad@bradlanders.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 71107 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 16277 X-Redmine-Issue-Author: bradland X-Redmine-Sender: bradland 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-SG-EID: =?us-ascii?Q?0JB1SxsDhZPqMW8SdyMzP1yxH7aSDCGpcjlYOL9kW5JqKKMIzt2kHAych4Lqje?= =?us-ascii?Q?un4KLNqfLfe9cbWDNafFEbSd+PuLUtE9XgJvmzg?= =?us-ascii?Q?XkCG4zL0BQHizA1GKOlUbbhU4NE5G9obke+rVKA?= =?us-ascii?Q?0vykky13uO81tAFJDAxoq7Qcvhto10wm=2FtIdM6w?= =?us-ascii?Q?=2FbAFsoDhf7yCvSRSBN9XnKpXKvNvdw021fA=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 95515 Subject: [ruby-core:95515] [Ruby master Bug#16277] UNIXServer#listen fails with Errno::EADDRINUSE error under Windows 10 / WSL Ubuntu 18.04 X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #16277 has been reported by bradland (Brad Landers). ---------------------------------------- Bug #16277: UNIXServer#listen fails with Errno::EADDRINUSE error under Windows 10 / WSL Ubuntu 18.04 https://bugs.ruby-lang.org/issues/16277 * Author: bradland (Brad Landers) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux-gnu] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- When running the following script under Windows 10 / WSL Ubuntu 18.04, an Errno::EADDRINUSE error is thrown. Expected result is that the script would run and simply exit. ``` ruby #!/usr/bin/env ruby # This script establishes a UNIX server socket. # # Expected result: Script should run and immediately exit. # # Actual result: Script fails with Errno::EADDRINUSE error. # # Environment: Windows 10 Pro, WSL, Ubuntu 18.04.2, ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux-gnu] # # To reproduce: Create a tmp folder, copy this script there, and execute. require 'socket' path = File.expand_path('listen.sock') backlog = 5 s = UNIXServer.new(path) if backlog s.listen backlog else s.listen end File.delete(path) if File.exists?(path) ``` The bug was discoverd as part of Puma (gem) issue #1521: https://github.com/puma/puma/issues/1521. -- https://bugs.ruby-lang.org/