Project

General

Profile

Bug #11613

test_aspawn_too_long_path creates too many processes

Added by naruse (Yui NARUSE) over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:71161]

Description

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 --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

Associated revisions

Revision 7b90b137
Added by naruse (Yui NARUSE) over 3 years ago

Add rlimit_nproc to avoid to create many process [Bug #11613]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 52229
Added by naruse (Yui NARUSE) over 3 years ago

Add rlimit_nproc to avoid to create many process [Bug #11613]

Revision 52229
Added by naruse (Yui NARUSE) over 3 years ago

Add rlimit_nproc to avoid to create many process [Bug #11613]

Revision 52229
Added by naruse (Yui NARUSE) over 3 years ago

Add rlimit_nproc to avoid to create many process [Bug #11613]

Revision 52229
Added by naruse (Yui NARUSE) over 3 years ago

Add rlimit_nproc to avoid to create many process [Bug #11613]

Revision 52229
Added by naruse (Yui NARUSE) over 3 years ago

Add rlimit_nproc to avoid to create many process [Bug #11613]

Revision ba3b4e0a
Added by usa (Usaku NAKAMURA) over 3 years ago

merge revision(s) 52229,52273,52277,52357: [Backport #11613]

    Add rlimit_nproc to avoid to create many process [Bug #11613]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@52358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 52358
Added by usa (Usaku NAKAMURA) over 3 years ago

merge revision(s) 52229,52273,52277,52357: [Backport #11613]

Add rlimit_nproc to avoid to create many process [Bug #11613]

Revision 8ad98918
Added by nagachika (Tomoyuki Chikanaga) over 3 years ago

merge revision(s) 52222,52229,52273,52277,52357: [Backport #11613]

    limit the number of FDs in a process for stress test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@52779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 52779
Added by nagachika (Tomoyuki Chikanaga) over 3 years ago

merge revision(s) 52222,52229,52273,52277,52357: [Backport #11613]

limit the number of FDs in a process for stress test

History

Updated by naruse (Yui NARUSE) over 3 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED
#2

Updated by naruse (Yui NARUSE) over 3 years ago

  • Status changed from Open to Closed

Applied in changeset r52229.


Add rlimit_nproc to avoid to create many process [Bug #11613]

Updated by usa (Usaku NAKAMURA) over 3 years ago

  • 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.

Updated by nagachika (Tomoyuki Chikanaga) over 3 years ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: DONE, 2.2: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE, 2.2: DONE

Backporrted r52222,r52229,r52273,r52277,r52357 into ruby_2_2 branch at r52779.

Also available in: Atom PDF