From: "usa (Usaku NAKAMURA)" Date: 2012-10-25T10:21:45+09:00 Subject: [ruby-core:48215] [ruby-trunk - Bug #7212][Assigned] "stack level too deep" in Fiber much earlier in new versions of 1.9.3 Issue #7212 has been updated by usa (Usaku NAKAMURA). Status changed from Open to Assigned Assignee set to ko1 (Koichi Sasada) ---------------------------------------- Bug #7212: "stack level too deep" in Fiber much earlier in new versions of 1.9.3 https://bugs.ruby-lang.org/issues/7212#change-31480 Author: fiddur (Fredrik Liljegren) Status: Assigned Priority: Normal Assignee: ko1 (Koichi Sasada) Category: Target version: ruby -v: ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-linux] (and others, see description) I was getting SystemStackError in my application on some servers and not others; on all with 1.9.3-p286 and on some with p194, and on none with 1.9.2-head. I boiled it down to this: def recursive(level = 0) -> do p "In block #{level}" if level < 1000 subblock = recursive(level + 1) subblock.call end end end p "Doing recursive call in a fiber" Fiber.new { recursive.call }.resume On server A, 1.9.3-p194 and 1.9.3-p286 got up to 11 levels of recursion, while 1.9.2-head got up to 97 levels. On server B (without 1.9.2), 1.9.3-p194 got 55 levels while p286 still got 11 levels. I don't know what changes are made, but I think 11 levels are way on the low side for many applications. (My original problem was with a thin-server running rack-fiber_pool with em-synchrony getting too deep in a regexp in Addressable::URI.) -- http://bugs.ruby-lang.org/