From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id E54CB1F954 for ; Mon, 20 Aug 2018 21:01:33 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id AE1F4120AD0; Tue, 21 Aug 2018 06:01:31 +0900 (JST) Received: from o1678916x28.outbound-mail.sendgrid.net (o1678916x28.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id CA172120AAD for ; Tue, 21 Aug 2018 06:01:28 +0900 (JST) Received: by filter0080p3mdw1.sendgrid.net with SMTP id filter0080p3mdw1-3789-5B7B2C24-23 2018-08-20 21:01:24.678058113 +0000 UTC m=+256816.355840819 Received: from herokuapp.com (ec2-54-147-234-252.compute-1.amazonaws.com [54.147.234.252]) by ismtpd0004p1iad1.sendgrid.net (SG) with ESMTP id rQuRcQ6nThmzjtsah6HDbg for ; Mon, 20 Aug 2018 21:01:24.768 +0000 (UTC) Date: Mon, 20 Aug 2018 21:01:25 +0000 (UTC) From: normalperson@yhbt.net To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 63959 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 15013 X-Redmine-Issue-Author: normalperson X-Redmine-Sender: normalperson 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: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS6q109cWkZ9cyrWoTtGVb1PUvdck/DoMtGSdb DNoQxv6Fv30ydCJuZqI0pIGbkmSyNzDfqgqOwggpd3CwglkmO35OG2Tg+AqunvWKUAedOArcPYdR8g dAyPMQFCs6yUoYSmrJtBZUmLAYduLH9RuL5+7qYPP99+L5EJfIHvpF5s3Q== X-ML-Name: ruby-core X-Mail-Count: 88578 Subject: [ruby-core:88578] [Ruby trunk Bug#15013] thread_pthread.c: reinitialize ubf_list at fork 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 #15013 has been reported by normalperson (Eric Wong). ---------------------------------------- Bug #15013: thread_pthread.c: reinitialize ubf_list at fork https://bugs.ruby-lang.org/issues/15013 * Author: normalperson (Eric Wong) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.3: REQUIRED, 2.4: REQUIRED, 2.5: REQUIRED ---------------------------------------- thread_pthread.c: reinitialize ubf_list at fork It's possible for the ubf_list_head to be populated with dead threads at fork or the ubf_list_lock to be held, so reinitialize both at startup. And while we're at it, use a static initializer at startup to save a library call and kill some ifdef. ---Files-------------------------------- 0001-thread_pthread.c-reinitialize-ubf_list-at-fork.patch (2.46 KB) -- https://bugs.ruby-lang.org/