From: crafterm@... Date: 2006-11-27T09:50:09+09:00 Subject: Re: What is the right stack size on OSX? Was: Re: Ruby hangs on OSX Hi Mariano, Interestingly, the program you've sent around works for me on my G4 Powerbook using Ruby 1.8.4 built using Fink (same stack size you quoted as well) - however I see the same problems you've described when running the script under Linux (Debian testing, Ruby 1.8.4) and on my Intel iMac at home (same environment & compiler as the G4, just different architecture). Looks like it's a cross platform problem. Anyone have any ideas what might be wrong or what other info we could send in to help diagnose it with? Cheers, Marcus Mariano Kamp wrote: > Hi, > > still not sure what the problem really is about. As nobody > answered I assume this is something with my two described fresh > installs? > > Anyway ... What I found is that reducing the stack size from 8192 > to 4096 with "ulimit -s 4096" it works. I get the stacklevel too deep > error. > > Now I am wondering what the "right" value and why is nobody else > hitting that wall? > > Cheers, > Mariano > > > On Nov 22, 2006, at 3:39 PM, Mariano Kamp wrote: > > > Hi, > > > > I encountered a strange problem. > > > > When running "ruby soduku_test.rb -n test_next_cell" the process > > hangs and eats up all of the assigned CPU . I have no idea why that > > is ... I asked a friend to run it on windows and it does work > > there. The program yield in a stack overflow. > > > > I recently reinstalled my computer and used darwinports. I don't > > think that I've seen that problem before. I also reinstalled ruby > > again, but with not much success and the same thing happens on > > another Mac too. > > > > Installing ruby the way I used to do it before, using the > > hivelogic tutorial, also didn't work. > > > > That are the versions that fail: > > > > ruby 1.8.5 (2006-08-25) [i686-darwin8.8.3] # darwin ports 1.3.1, > > gcc 4.0 > > ruby 1.8.4 (2005-12-24) [i686-darwin8.8.3] # directly from the > > sources (hivelogic tutorial) > > ruby 1.8.2 (2004-12-25) [universal-darwin8.0] # comes with Tiger > > > > Both Macs (MB C2D, MBP CD) are running OSX 10.4.8 with all updates. > > > > uname -v: > > Darwin Kernel Version 8.8.3: Wed Oct 18 21:57:10 PDT 2006; > > root:xnu-792.15.4.obj~4/RELEASE_I386 > > > > A stack trace of the "working" run on Windows is below this mail. > > > > I attached the code. Unfortunately I haven't been able to isolate > > the problem, but at least the code consistently fails. > > > > Any ideas? Can somebody please try it out on another Mac? I will > > also do that later on. > > > > Cheers, > > Mariano > > > > > > > > > > > > 1) Error: > > test_next_cell(SudokuTests): > > SystemStackError: stack level too deep > > C:/dev/ruby/lib/ruby/1.8/prettyprint.rb:344:in `deq' > > C:/dev/ruby/lib/ruby/1.8/prettyprint.rb:343:in `deq' > > C:/dev/ruby/lib/ruby/1.8/prettyprint.rb:171:in > > `break_outmost_groups' > > C:/dev/ruby/lib/ruby/1.8/prettyprint.rb:197:in `text' > > C:/dev/ruby/lib/ruby/1.8/pp.rb:258:in `pretty_print_cycle' > > C:/dev/ruby/lib/ruby/1.8/prettyprint.rb:224:in `group' > > C:/dev/ruby/lib/ruby/1.8/prettyprint.rb:247:in `nest' > > C:/dev/ruby/lib/ruby/1.8/prettyprint.rb:223:in `group' > > C:/dev/ruby/lib/ruby/1.8/prettyprint.rb:235:in `group_sub' > > C:/dev/ruby/lib/ruby/1.8/prettyprint.rb:222:in `group' > > [.. tons of repetition ] > > C:/dev/ruby/lib/ruby/1.8/pp.rb:142:in `object_address_group' > > C:/dev/ruby/lib/ruby/1.8/pp.rb:192:in `pp_object' > > C:/dev/ruby/lib/ruby/1.8/pp.rb:249:in `pretty_print' > > C:/dev/ruby/lib/ruby/1.8/pp.rb:126:in `pp' > > C:/dev/ruby/lib/ruby/1.8/prettyprint.rb:224:in `group' > > C:/dev/ruby/lib/ruby/1.8/prettyprint.rb:247:in `nest' > > C:/dev/ruby/lib/ruby/1.8/prettyprint.rb:223:in `group' > > C:/dev/ruby/lib/ruby/1.8/prettyprint.rb:235:in `group_sub' > > C:/dev/ruby/lib/ruby/1.8/prettyprint.rb:222:in `group' > > C:/dev/ruby/lib/ruby/1.8/pp.rb:126:in `pp' > > C:/dev/ruby/lib/ruby/1.8/pp.rb:69:in `pp' > > C:/dev/ruby/lib/ruby/1.8/pp.rb:105:in `guard_inspect_key' > > C:/dev/ruby/lib/ruby/1.8/pp.rb:69:in `pp' > > sudoku_test.rb:53:in `test_next_cell' > > > > 6 tests, 23 assertions, 0 failures, 1 errors