From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id DD0F119C0020 for ; Fri, 23 Oct 2015 01:27:41 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 6608DB5D8FC for ; Fri, 23 Oct 2015 01:54:53 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 6AA9C95243A for ; Fri, 23 Oct 2015 01:54:51 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 332971204DE; Fri, 23 Oct 2015 01:54:52 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o10.shared.sendgrid.net (o10.shared.sendgrid.net [173.193.132.135]) by neon.ruby-lang.org (Postfix) with ESMTPS id BF3071204D3 for ; Fri, 23 Oct 2015 01:54:44 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=2dLKof+OF1MyuMlgsDdDTBYS7Lc=; b=K8rWRNTDqSDqcVF90d 8rphr4pAG4/Iuhl5U4XOkOQREcXmzz6sIjUTyexp51tIbqPF2Jh6US8Dv5sit7WE eA+RuImSKW6c3COdI4sOjlwbtellh3Fy5ZjDs6Ag9aC3Q780p8S3DkPRNwaZ+wfO e8SyHcHO4MTct0GimT+o4AK0s= Received: by filter0651p1mdw1.sendgrid.net with SMTP id filter0651p1mdw1.4319.562914CCC 2015-10-22 16:54:36.113380334 +0000 UTC Received: from herokuapp.com (ec2-107-21-135-130.compute-1.amazonaws.com [107.21.135.130]) by ismtpd0005p1iad1.sendgrid.net (SG) with ESMTP id eb-Is6tMT9O6aA75K6TjBQ for ; Thu, 22 Oct 2015 16:54:35.998 +0000 (UTC) Date: Thu, 22 Oct 2015 16:54:35 +0000 From: naruse@airemix.jp To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Redmine-MailingListIntegration-Message-Ids: 45788 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11613 X-Redmine-Issue-Author: naruse X-Redmine-Sender: naruse 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/Ymy4QrNMhiuLXJG8OTL2vJD1yS5TamXaR0VuGbptqnCqdhCLd/XsJJZCSl6adR yW8qCwIS0+K4P/cRhpLDonzQvI6p5b+f/9zV2vA7mdcm21HcUYqsGswn0zabI6RkLUpq5XcrVCDryT AW+Cxv3NOvPD+5c= X-ML-Name: ruby-core X-Mail-Count: 71162 Subject: [ruby-core:71162] [Ruby trunk - Bug #11613] test_aspawn_too_long_path creates too many processes 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: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #11613 has been updated by Yui NARUSE. Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED ---------------------------------------- Bug #11613: test_aspawn_too_long_path creates too many processes https://bugs.ruby-lang.org/issues/11613#change-54537 * Author: Yui NARUSE * Status: Open * Priority: Normal * Assignee: * ruby -v: * Backport: 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED ---------------------------------------- At least on FreeBSD, spawn("echo|echo|echo|echo|echo|echo|echo| ...20000 times") success and create 20000 zombie processes. To prevent this you can add rlimit_nproc: 1 because it tests sh itself, don't test spawned echos. ```diff diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 32dcaed..7877171 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -1600,7 +1600,7 @@ class TestProcess < Test::Unit::TestCase assert_raise(*exs, mesg) do begin loop do - Process.spawn(cmds.join(sep), [STDOUT, STDERR]=>File::NULL) + Process.spawn(cmds.join(sep), [STDOUT, STDERR]=>File::NULL, rlimit_nproc: 1) min = [cmds.size, min].max cmds *= 100 end ``` -- https://bugs.ruby-lang.org/