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 149BC19C0022 for ; Thu, 29 Oct 2015 23:00: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 4B0BFB5D8C0 for ; Thu, 29 Oct 2015 23:28:44 +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 31FC1952408 for ; Thu, 29 Oct 2015 23:28:44 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id ED7521204C7; Thu, 29 Oct 2015 23:28:35 +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 13FD512045E for ; Thu, 29 Oct 2015 23:28:27 +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=0JClKExe4xm+p8akKbiHYm7b2aw=; b=icl2nKkER0pqmO4RmV M2eTgByHIF+e22H1lAGfQy2SfEsuyVezG0yNI4kvwh73UP+GFJckfZqCev2Yf+Ev /fWMPQ8ywc2KBTURgrqbLJpqWpkEDyM8OTnvNET9dr1Vtc6Vr0Si2V80TY/3nb+R fQNMafrNr3fnVHh2xQ1m6EFYM= Received: by filter0423p1mdw1.sendgrid.net with SMTP id filter0423p1mdw1.2746.56322D0656 2015-10-29 14:28:22.530111808 +0000 UTC Received: from herokuapp.com (ec2-54-91-232-50.compute-1.amazonaws.com [54.91.232.50]) by ismtpd0005p1iad1.sendgrid.net (SG) with ESMTP id 39wVXmHkR_2HGLLTeN_uww for ; Thu, 29 Oct 2015 14:28:22.702 +0000 (UTC) Date: Thu, 29 Oct 2015 14:28:22 +0000 From: usa@garbagecollect.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: 45895 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11613 X-Redmine-Issue-Author: naruse X-Redmine-Sender: usa 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/Ymy4QrNMhiuLXJG8OTL2vJD1yS5CO/k+Eq9eyE5kUYJv+ZltY37PkoOLFrny9W /IBivY4zzNnciXU+pJ43NJOKsJZi4LVaxblXKPFyOg+C3LIKC/QGX7YFwyVV4e+WMDJdi/sa69jeOl UURzG9rqpT4FWlE7VaYq1W5wwIdG6mEyuuwm X-ML-Name: ruby-core X-Mail-Count: 71266 Subject: [ruby-core:71266] [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 Usaku NAKAMURA. Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE, 2.2: REQUIRED ruby_2_1 r52358 merged revision(s) 52229,52273,52277,52357. ---------------------------------------- Bug #11613: test_aspawn_too_long_path creates too many processes https://bugs.ruby-lang.org/issues/11613#change-54639 * Author: Yui NARUSE * Status: Closed * Priority: Normal * Assignee: * ruby -v: * Backport: 2.0.0: REQUIRED, 2.1: DONE, 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/