From: "mame (Yusuke Endoh)" Date: 2012-04-22T11:31:47+09:00 Subject: [ruby-core:44525] [ruby-trunk - Bug #6291][Assigned] Backtrace printout halts for an extremely long time when large amounts of data are allocated Issue #6291 has been updated by mame (Yusuke Endoh). Status changed from Open to Assigned Assignee set to matz (Yukihiro Matsumoto) Matz, Do you think that #inspect has a length limitation or timeout? -- Yusuke Endoh ---------------------------------------- Bug #6291: Backtrace printout halts for an extremely long time when large amounts of data are allocated https://bugs.ruby-lang.org/issues/6291#change-26079 Author: cuthbert (Christoffer Lervag) Status: Assigned Priority: Normal Assignee: matz (Yukihiro Matsumoto) Category: core Target version: 1.9.3 ruby -v: 1.9.3 =begin When large amounts of data are allocated, it can take an eternity for the backtrace printout to complete. Here's a simple example: class SomeClass def initialize @a = Array.new(100000, "just some random string") end end h = Hash.new 200.times {|i| h[i] = SomeClass.new} h.asdf This will halt with the following printout: test.rb:9 And then, after a very long time (depending on how much data is in memory), it will eventually finish: test.rb:9: undefined method `asdf' for # (NoMethodError) For me, this has caused a lot of frustration when running a test suite on an application which loads a lot of data in memory, as in many cases I will never get to see the actual backtrace. This makes debugging much more difficult. Perhaps there is some fundamental property of the Ruby language itself that makes this an 'expected behaviour', but if not, I would really appreciate to see this adressed. =end -- http://bugs.ruby-lang.org/