From: Lucas Nussbaum Date: 2005-07-21T23:09:51+09:00 Subject: Re: [BUG] Segmentation fault with a threads/forks script On Thu, Jul 21, 2005 at 10:50:00PM +0900, "Ara.T.Howard" wrote: > On Thu, 21 Jul 2005, Lucas Nussbaum wrote: > > >Hi, > > > >I experience a reproducable crash (each time) with prunner.rb at > >http://blop.info/bazaar/prunner.rb. The script starts several commands > >at the same time. When running with a large number of commands, it > >exits with : > > > >./prunner.rb:51: [BUG] Segmentation fault > >ruby 1.8.2 (2005-04-11) [i386-linux] > > > >Aborted > > > >To reproduce, create a large file with one command per line. > >for i in $(seq 1 2000); do echo hostname done > cmds > >Then run prunner.rb like this : > >cat cmds |head -n 1500 |./prunner.rb > >1500 can be increased if it doesn't crash for you. > > > >Of course, I expect it to go wrong at some time, but it could probably > >do this in a cleaner way. > > > >Can somebody confirm the bug ? Or better, fix it ? :-) > > > seems to work on 1.8.2 for values around 1000: > > [...] > > did you compile ruby yourself or use some installer/package-manager? I tested using Debian's and Ubuntu's packages. What if you ulimit -n 16384 first ? Does it still work ? It worked for me with values around 1000 too. But after increasing the ulimit for open files, it started crashing. -- | Lucas Nussbaum | lucas@lucas-nussbaum.net http://www.lucas-nussbaum.net/ | | jabber: lucas@nussbaum.fr GPG: 1024D/023B3F4F |