ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:43794] [ruby-trunk - Feature #6216][Open] SystemStackError backtraces should not be reduced to one line
@ 2012-03-28  7:16 postmodern (Hal Brodigan)
  2012-03-28 10:27 ` [ruby-core:43796] [ruby-trunk - Feature #6216][Feedback] " matz (Yukihiro Matsumoto)
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: postmodern (Hal Brodigan) @ 2012-03-28  7:16 UTC (permalink / raw
  To: ruby-core


Issue #6216 has been reported by postmodern (Hal Brodigan).

----------------------------------------
Feature #6216: SystemStackError backtraces should not be reduced to one line
https://bugs.ruby-lang.org/issues/6216

Author: postmodern (Hal Brodigan)
Status: Open
Priority: Normal
Assignee: 
Category: core
Target version: 2.0.0


When debugging "SystemStackError: stack level too deep" exceptions, it is not helpful that the backtrace is reduced to one single line. Most of the time Ruby incorrectly identifies where cycles begin, resulting in an unrelated "file:line" as the backtrace. A more useful behaviour would be to print the last 30 lines of the backtrace, and have the developer identify which "file:line" is causing the cycle. This is similar to how JRuby handles SystemStackError backtraces.


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:43796] [ruby-trunk - Feature #6216][Feedback] SystemStackError backtraces should not be reduced to one line
  2012-03-28  7:16 [ruby-core:43794] [ruby-trunk - Feature #6216][Open] SystemStackError backtraces should not be reduced to one line postmodern (Hal Brodigan)
@ 2012-03-28 10:27 ` matz (Yukihiro Matsumoto)
  2012-03-29  1:40 ` [ruby-core:43833] [ruby-trunk - Feature #6216] " postmodern (Hal Brodigan)
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: matz (Yukihiro Matsumoto) @ 2012-03-28 10:27 UTC (permalink / raw
  To: ruby-core


Issue #6216 has been updated by matz (Yukihiro Matsumoto).

Status changed from Open to Feedback

Could you be more descriptive, please?  Comparing outputs from Ruby and JRuby, for example.

Matz.
----------------------------------------
Feature #6216: SystemStackError backtraces should not be reduced to one line
https://bugs.ruby-lang.org/issues/6216#change-25300

Author: postmodern (Hal Brodigan)
Status: Feedback
Priority: Normal
Assignee: 
Category: core
Target version: 2.0.0


When debugging "SystemStackError: stack level too deep" exceptions, it is not helpful that the backtrace is reduced to one single line. Most of the time Ruby incorrectly identifies where cycles begin, resulting in an unrelated "file:line" as the backtrace. A more useful behaviour would be to print the last 30 lines of the backtrace, and have the developer identify which "file:line" is causing the cycle. This is similar to how JRuby handles SystemStackError backtraces.


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:43833] [ruby-trunk - Feature #6216] SystemStackError backtraces should not be reduced to one line
  2012-03-28  7:16 [ruby-core:43794] [ruby-trunk - Feature #6216][Open] SystemStackError backtraces should not be reduced to one line postmodern (Hal Brodigan)
  2012-03-28 10:27 ` [ruby-core:43796] [ruby-trunk - Feature #6216][Feedback] " matz (Yukihiro Matsumoto)
@ 2012-03-29  1:40 ` postmodern (Hal Brodigan)
  2012-04-06 21:42 ` [ruby-core:44168] " postmodern (Hal Brodigan)
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: postmodern (Hal Brodigan) @ 2012-03-29  1:40 UTC (permalink / raw
  To: ruby-core


Issue #6216 has been updated by postmodern (Hal Brodigan).


=begin
Ruby 1.9.3:

  /home/hal/.rvm/gems/ruby-1.9.3-p125/gems/dm-core-1.2.0/lib/dm-core/support/equalizer.rb:32: stack level too deep (SystemStackError)

JRuby 1.6.6:


  SystemStackError: stack level too deep
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:114
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:113
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:153
       resource_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:107
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:191
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:23
                get at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:8
          user_name at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/model/relationship.rb:351
             to_ary at /vault/1/code/ronin/ronin/lib/ronin/email_address.rb:259
              Array at org/jruby/RubyKernel.java:327
  target_conditions at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/query.rb:56
       source_scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:89
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:156
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:114
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:113
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:153
       resource_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:107
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:191
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:23
                get at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:8
          user_name at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/model/relationship.rb:351
             to_ary at /vault/1/code/ronin/ronin/lib/ronin/email_address.rb:259
              Array at org/jruby/RubyKernel.java:327
  target_conditions at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/query.rb:56
       source_scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:89
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:156
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:114
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:113
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:153
       resource_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:107
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:191
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:23
                get at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:8
          user_name at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/model/relationship.rb:351
             to_ary at /vault/1/code/ronin/ronin/lib/ronin/email_address.rb:259
              Array at org/jruby/RubyKernel.java:327
  target_conditions at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/query.rb:56
       source_scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:89
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:156
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:114
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:113
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:153
       resource_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:107
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:191
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:23
                get at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:8
          user_name at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/model/relationship.rb:351
             to_ary at /vault/1/code/ronin/ronin/lib/ronin/email_address.rb:259
              Array at org/jruby/RubyKernel.java:327
  target_conditions at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/query.rb:56
       source_scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:89
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:156
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:114
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:113
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:153
       resource_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:107
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:191
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:23
                get at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:8
          user_name at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/model/relationship.rb:351
             to_ary at /vault/1/code/ronin/ronin/lib/ronin/email_address.rb:259
              Array at org/jruby/RubyKernel.java:327
  target_conditions at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/query.rb:56
       source_scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:89
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:156
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:114
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:113
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:153
       resource_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:107
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:191
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:23
                get at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:8
          user_name at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/model/relationship.rb:351
             to_ary at /vault/1/code/ronin/ronin/lib/ronin/email_address.rb:259
              Array at org/jruby/RubyKernel.java:327
  target_conditions at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/query.rb:56
       source_scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:89
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:156
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:114
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:113
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:153
       resource_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:107
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:191
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:23
                get at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:8
          user_name at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/model/relationship.rb:351
             to_ary at /vault/1/code/ronin/ronin/lib/ronin/email_address.rb:259
              Array at org/jruby/RubyKernel.java:327
  target_conditions at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/query.rb:56
       source_scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:89
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:156
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:114
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:113
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:153
       resource_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:107
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:191
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:23
                get at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:8
          user_name at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/model/relationship.rb:351
             to_ary at /vault/1/code/ronin/ronin/lib/ronin/email_address.rb:259
              Array at org/jruby/RubyKernel.java:327
  target_conditions at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/query.rb:56
       source_scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:89
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:156
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:114
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:113
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:153
       resource_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:107
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:191
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:23
                get at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:8
          user_name at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/model/relationship.rb:351
             to_ary at /vault/1/code/ronin/ronin/lib/ronin/email_address.rb:259
              Array at org/jruby/RubyKernel.java:327
  target_conditions at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/query.rb:56
       source_scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:89
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:156
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:114
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:113
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:153
       resource_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:107
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:191
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:23
                get at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:8
          user_name at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/model/relationship.rb:351
             to_ary at /vault/1/code/ronin/ronin/lib/ronin/email_address.rb:259
              Array at org/jruby/RubyKernel.java:327
  target_conditions at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/query.rb:56
       source_scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:89
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:156
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:114
              scope at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/repository.rb:113
          query_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:153
       resource_for at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:107
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/associations/many_to_one.rb:191
          lazy_load at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:23
                get at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/persisted.rb:8
          user_name at /home/hal/.rvm/gems/jruby-1.6.6/gems/dm-core-1.2.0/lib/dm-core/model/relationship.rb:351

Formatting of the method-name, file, line-number aside, JRuby does not attempt to compact repeats within the backtrace.
----------------------------------------
Feature #6216: SystemStackError backtraces should not be reduced to one line
https://bugs.ruby-lang.org/issues/6216#change-25342

Author: postmodern (Hal Brodigan)
Status: Feedback
Priority: Normal
Assignee: 
Category: core
Target version: 2.0.0


When debugging "SystemStackError: stack level too deep" exceptions, it is not helpful that the backtrace is reduced to one single line. Most of the time Ruby incorrectly identifies where cycles begin, resulting in an unrelated "file:line" as the backtrace. A more useful behaviour would be to print the last 30 lines of the backtrace, and have the developer identify which "file:line" is causing the cycle. This is similar to how JRuby handles SystemStackError backtraces.


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:44168] [ruby-trunk - Feature #6216] SystemStackError backtraces should not be reduced to one line
  2012-03-28  7:16 [ruby-core:43794] [ruby-trunk - Feature #6216][Open] SystemStackError backtraces should not be reduced to one line postmodern (Hal Brodigan)
  2012-03-28 10:27 ` [ruby-core:43796] [ruby-trunk - Feature #6216][Feedback] " matz (Yukihiro Matsumoto)
  2012-03-29  1:40 ` [ruby-core:43833] [ruby-trunk - Feature #6216] " postmodern (Hal Brodigan)
@ 2012-04-06 21:42 ` postmodern (Hal Brodigan)
  2012-10-26 21:51 ` [ruby-core:48371] " ko1 (Koichi Sasada)
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: postmodern (Hal Brodigan) @ 2012-04-06 21:42 UTC (permalink / raw
  To: ruby-core


Issue #6216 has been updated by postmodern (Hal Brodigan).


If it wasn't clear from the above example, Ruby 1.9.3 returns a backtrace pointing to a line of code in dm-core which has nothing to do with the bug. The actual bug is revealed in the full JRuby backtrace where one can see dm-core calling back into Ronin::EmailAddress#to_ary, causing the infinite recursion.
----------------------------------------
Feature #6216: SystemStackError backtraces should not be reduced to one line
https://bugs.ruby-lang.org/issues/6216#change-25690

Author: postmodern (Hal Brodigan)
Status: Feedback
Priority: Normal
Assignee: 
Category: core
Target version: 2.0.0


When debugging "SystemStackError: stack level too deep" exceptions, it is not helpful that the backtrace is reduced to one single line. Most of the time Ruby incorrectly identifies where cycles begin, resulting in an unrelated "file:line" as the backtrace. A more useful behaviour would be to print the last 30 lines of the backtrace, and have the developer identify which "file:line" is causing the cycle. This is similar to how JRuby handles SystemStackError backtraces.


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:48371] [ruby-trunk - Feature #6216] SystemStackError backtraces should not be reduced to one line
  2012-03-28  7:16 [ruby-core:43794] [ruby-trunk - Feature #6216][Open] SystemStackError backtraces should not be reduced to one line postmodern (Hal Brodigan)
                   ` (2 preceding siblings ...)
  2012-04-06 21:42 ` [ruby-core:44168] " postmodern (Hal Brodigan)
@ 2012-10-26 21:51 ` ko1 (Koichi Sasada)
  2012-10-30 17:14 ` [ruby-core:48619] [ruby-trunk - Feature #6216][Assigned] " matz (Yukihiro Matsumoto)
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: ko1 (Koichi Sasada) @ 2012-10-26 21:51 UTC (permalink / raw
  To: ruby-core


Issue #6216 has been updated by ko1 (Koichi Sasada).

Assignee set to matz (Yukihiro Matsumoto)
Target version changed from 2.0.0 to next minor

Matz, could you reply to it?

----------------------------------------
Feature #6216: SystemStackError backtraces should not be reduced to one line
https://bugs.ruby-lang.org/issues/6216#change-31683

Author: postmodern (Hal Brodigan)
Status: Feedback
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
Category: core
Target version: next minor


When debugging "SystemStackError: stack level too deep" exceptions, it is not helpful that the backtrace is reduced to one single line. Most of the time Ruby incorrectly identifies where cycles begin, resulting in an unrelated "file:line" as the backtrace. A more useful behaviour would be to print the last 30 lines of the backtrace, and have the developer identify which "file:line" is causing the cycle. This is similar to how JRuby handles SystemStackError backtraces.


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:48619] [ruby-trunk - Feature #6216][Assigned] SystemStackError backtraces should not be reduced to one line
  2012-03-28  7:16 [ruby-core:43794] [ruby-trunk - Feature #6216][Open] SystemStackError backtraces should not be reduced to one line postmodern (Hal Brodigan)
                   ` (3 preceding siblings ...)
  2012-10-26 21:51 ` [ruby-core:48371] " ko1 (Koichi Sasada)
@ 2012-10-30 17:14 ` matz (Yukihiro Matsumoto)
  2012-10-31 20:40 ` [ruby-core:48686] [ruby-trunk - Feature #6216] " headius (Charles Nutter)
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: matz (Yukihiro Matsumoto) @ 2012-10-30 17:14 UTC (permalink / raw
  To: ruby-core


Issue #6216 has been updated by matz (Yukihiro Matsumoto).

Status changed from Feedback to Assigned
Assignee changed from matz (Yukihiro Matsumoto) to ko1 (Koichi Sasada)

I don't feel I exactly understand the situation, since the specified line in CRuby backtrace does not appear in JRuby's.
That might mean avoiding backtrace truncation has no meaning, or CRuby could have yet another bug.

Do you have any opinion, ko1?

Matz.

----------------------------------------
Feature #6216: SystemStackError backtraces should not be reduced to one line
https://bugs.ruby-lang.org/issues/6216#change-32032

Author: postmodern (Hal Brodigan)
Status: Assigned
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: next minor


When debugging "SystemStackError: stack level too deep" exceptions, it is not helpful that the backtrace is reduced to one single line. Most of the time Ruby incorrectly identifies where cycles begin, resulting in an unrelated "file:line" as the backtrace. A more useful behaviour would be to print the last 30 lines of the backtrace, and have the developer identify which "file:line" is causing the cycle. This is similar to how JRuby handles SystemStackError backtraces.


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:48686] [ruby-trunk - Feature #6216] SystemStackError backtraces should not be reduced to one line
  2012-03-28  7:16 [ruby-core:43794] [ruby-trunk - Feature #6216][Open] SystemStackError backtraces should not be reduced to one line postmodern (Hal Brodigan)
                   ` (4 preceding siblings ...)
  2012-10-30 17:14 ` [ruby-core:48619] [ruby-trunk - Feature #6216][Assigned] " matz (Yukihiro Matsumoto)
@ 2012-10-31 20:40 ` headius (Charles Nutter)
  2013-04-14  6:36 ` [ruby-core:54261] " drkaes (Stefan Kaes)
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: headius (Charles Nutter) @ 2012-10-31 20:40 UTC (permalink / raw
  To: ruby-core


Issue #6216 has been updated by headius (Charles Nutter).


Some details on the JRuby side of things:

* SystemStackError is not consistently raised. There are a decreasing number of places in JRuby's codebase where we attempt to rescue Java's StackOverflowError and reraise it as SystemStackError. Largely, this is because at the point where we catch a StackOverflow, there may not be sufficient stack available to construct the Ruby exception. So you can't expect to always get SystemStackError in JRuby.

* SystemStackError is an unrecoverable error in any runtime. It can happen at very odd times, including during native bits of MRI, exception handling or ensure blocks, and so on. In general, we treat a stack overflow as a fatal error case.

* JRuby in general will just allow the Java StackOverflowError to propagate as-is. You can catch the Java exception using JRuby's Java integration, but as mentioned above stack errors are generally unrecoverable.

* The JVM (Hotspot, at least) only returns a subset of any deep stack trace, even for non-overflow cases. This is the main reason for the truncated backtrace.
----------------------------------------
Feature #6216: SystemStackError backtraces should not be reduced to one line
https://bugs.ruby-lang.org/issues/6216#change-32127

Author: postmodern (Hal Brodigan)
Status: Assigned
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: next minor


When debugging "SystemStackError: stack level too deep" exceptions, it is not helpful that the backtrace is reduced to one single line. Most of the time Ruby incorrectly identifies where cycles begin, resulting in an unrelated "file:line" as the backtrace. A more useful behaviour would be to print the last 30 lines of the backtrace, and have the developer identify which "file:line" is causing the cycle. This is similar to how JRuby handles SystemStackError backtraces.


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:54261] [ruby-trunk - Feature #6216] SystemStackError backtraces should not be reduced to one line
  2012-03-28  7:16 [ruby-core:43794] [ruby-trunk - Feature #6216][Open] SystemStackError backtraces should not be reduced to one line postmodern (Hal Brodigan)
                   ` (5 preceding siblings ...)
  2012-10-31 20:40 ` [ruby-core:48686] [ruby-trunk - Feature #6216] " headius (Charles Nutter)
@ 2013-04-14  6:36 ` drkaes (Stefan Kaes)
  2013-04-18 12:13 ` [ruby-core:54432] " drkaes (Stefan Kaes)
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: drkaes (Stefan Kaes) @ 2013-04-14  6:36 UTC (permalink / raw
  To: ruby-core


Issue #6216 has been updated by drkaes (Stefan Kaes).

File stack-overflow.patch added

It seems to me that a full backtrace can safely be generated (patch against trunk attached).

The one line backtrace behavior was introduced with this patch: https://github.com/shyouhei/ruby/commit/ecd11fb371b5f4a00d0b0006b325de3c5437b8d2

It avoids the crashing call

   rb_funcall(info, rb_intern("backtrace"), 0),

which is performed when one calls get_backtrace(mesg), defined in eval_error.c.

On the other hand, rb_make_backtrace() will not grow the stack, as far as I can tell.

I've tested the patch with ruby trunk and 1.9.3-p392.

The reason I came here is that we were bitten by a SystemStackError in production, which we couldn't reproduce, and the one line information wasn't enough to debug the issue.

----------------------------------------
Feature #6216: SystemStackError backtraces should not be reduced to one line
https://bugs.ruby-lang.org/issues/6216#change-38536

Author: postmodern (Hal Brodigan)
Status: Assigned
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: next minor


When debugging "SystemStackError: stack level too deep" exceptions, it is not helpful that the backtrace is reduced to one single line. Most of the time Ruby incorrectly identifies where cycles begin, resulting in an unrelated "file:line" as the backtrace. A more useful behaviour would be to print the last 30 lines of the backtrace, and have the developer identify which "file:line" is causing the cycle. This is similar to how JRuby handles SystemStackError backtraces.


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:54432] [ruby-trunk - Feature #6216] SystemStackError backtraces should not be reduced to one line
  2012-03-28  7:16 [ruby-core:43794] [ruby-trunk - Feature #6216][Open] SystemStackError backtraces should not be reduced to one line postmodern (Hal Brodigan)
                   ` (6 preceding siblings ...)
  2013-04-14  6:36 ` [ruby-core:54261] " drkaes (Stefan Kaes)
@ 2013-04-18 12:13 ` drkaes (Stefan Kaes)
  2013-08-24 15:35 ` [ruby-core:56798] " thedarkone (Vit Z)
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: drkaes (Stefan Kaes) @ 2013-04-18 12:13 UTC (permalink / raw
  To: ruby-core


Issue #6216 has been updated by drkaes (Stefan Kaes).


It has been pointed out to me that the patched ruby will likely crash when the patched code run on a sigaltstack.

I'm working to sort this out.
----------------------------------------
Feature #6216: SystemStackError backtraces should not be reduced to one line
https://bugs.ruby-lang.org/issues/6216#change-38709

Author: postmodern (Hal Brodigan)
Status: Assigned
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: next minor


When debugging "SystemStackError: stack level too deep" exceptions, it is not helpful that the backtrace is reduced to one single line. Most of the time Ruby incorrectly identifies where cycles begin, resulting in an unrelated "file:line" as the backtrace. A more useful behaviour would be to print the last 30 lines of the backtrace, and have the developer identify which "file:line" is causing the cycle. This is similar to how JRuby handles SystemStackError backtraces.


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:56798] [ruby-trunk - Feature #6216] SystemStackError backtraces should not be reduced to one line
  2012-03-28  7:16 [ruby-core:43794] [ruby-trunk - Feature #6216][Open] SystemStackError backtraces should not be reduced to one line postmodern (Hal Brodigan)
                   ` (7 preceding siblings ...)
  2013-04-18 12:13 ` [ruby-core:54432] " drkaes (Stefan Kaes)
@ 2013-08-24 15:35 ` thedarkone (Vit Z)
  2014-05-06  9:32 ` [ruby-core:62412] " nobu
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: thedarkone (Vit Z) @ 2013-08-24 15:35 UTC (permalink / raw
  To: ruby-core


Issue #6216 has been updated by thedarkone (Vit Z).


=begin
I'm not sure @matz/@ko1 understood what @postmodern was trying to describe.

Given an (({overlfow.rb})) ruby program:

  200.times do |i|
    eval <<-RUBY_EVAL, nil, __FILE__, __LINE__ + 1
      def foo_#{i}(&block)
        foo_#{i+1}(&block)
      end
    RUBY_EVAL
  
    def foo_200
      yield
    end
  end
  
  def bar
    foo_0 { bar }
  end
  
  bar

When run on ruby 2.0, this is the output:

  vit@localhost ~> ruby -v overflow.rb
  ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.2.0]
  overflow.rb:4: stack level too deep (SystemStackError)

As can be seen, only a single line of backtrace data is provided, thus the only thing that is known - is the stack was blown while executing a (({foo_x})) method, but none of the (({foo_x})) methods are recursive (the real culprit is the (({bar})) method). Debugging an error like that is nigh impossible on Ruby 2.0.

Contrast this with other VMs:

rbx:

  vit@localhost ~> ruby -v overflow.rb
  rubinius 2.0.0.rc1 (1.9.3 release yyyy-mm-dd JI) [x86_64-apple-darwin12.2.0]
  An exception occurred running overflow.rb
      SystemStackError (SystemStackError)
  
  Backtrace:
                      Object#foo_141 at overflow.rb:7
                      Object#foo_140 at overflow.rb:8
                      Object#foo_139 at overflow.rb:8
                            [ snip ... ]
                      Object#foo_1 at overflow.rb:8
                      Object#foo_0 at overflow.rb:8
                        Object#bar at overflow.rb:14
                 Object#__script__ at overflow.rb:17
  Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:68
  Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:119
           Rubinius::Loader#script at kernel/loader.rb:620
             Rubinius::Loader#main at kernel/loader.rb:821

MRI 1.8:

  vit@localhost ~> ruby -v overflow.rb
  ruby 1.8.7 (2012-02-08 MBARI 8/0x6770 on patchlevel 358) [i686-darwin12.2.0], MBARI 0x6770, Ruby Enterprise Edition 2012.02
  overflow.rb:4:in `foo_44': stack level too deep (SystemStackError)
  	from overflow.rb:4:in `foo_43'
  	from overflow.rb:4:in `foo_42'
  	from overflow.rb:4:in `foo_41'
  	from overflow.rb:4:in `foo_40'
  	from overflow.rb:4:in `foo_39'
  	from overflow.rb:4:in `foo_38'
  	from overflow.rb:4:in `foo_37'
  	from overflow.rb:4:in `foo_36'
  	 ... 5312 levels...
  	from overflow.rb:4:in `foo_1'
  	from overflow.rb:4:in `foo_0'
  	from overflow.rb:14:in `bar'
  	from overflow.rb:17
=end
----------------------------------------
Feature #6216: SystemStackError backtraces should not be reduced to one line
https://bugs.ruby-lang.org/issues/6216#change-41339

Author: postmodern (Hal Brodigan)
Status: Assigned
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: next minor


When debugging "SystemStackError: stack level too deep" exceptions, it is not helpful that the backtrace is reduced to one single line. Most of the time Ruby incorrectly identifies where cycles begin, resulting in an unrelated "file:line" as the backtrace. A more useful behaviour would be to print the last 30 lines of the backtrace, and have the developer identify which "file:line" is causing the cycle. This is similar to how JRuby handles SystemStackError backtraces.


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:62412] [ruby-trunk - Feature #6216] SystemStackError backtraces should not be reduced to one line
  2012-03-28  7:16 [ruby-core:43794] [ruby-trunk - Feature #6216][Open] SystemStackError backtraces should not be reduced to one line postmodern (Hal Brodigan)
                   ` (8 preceding siblings ...)
  2013-08-24 15:35 ` [ruby-core:56798] " thedarkone (Vit Z)
@ 2014-05-06  9:32 ` nobu
  2014-05-06  9:52 ` [ruby-core:62413] " nobu
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: nobu @ 2014-05-06  9:32 UTC (permalink / raw
  To: ruby-core

Issue #6216 has been updated by Nobuyoshi Nakada.

Duplicated by Feature #9805: Backtrace for SystemStackError added

----------------------------------------
Feature #6216: SystemStackError backtraces should not be reduced to one line
https://bugs.ruby-lang.org/issues/6216#change-46564

* Author: Hal Brodigan
* Status: Assigned
* Priority: Normal
* Assignee: Koichi Sasada
* Category: core
* Target version: next minor
----------------------------------------
When debugging "SystemStackError: stack level too deep" exceptions, it is not helpful that the backtrace is reduced to one single line. Most of the time Ruby incorrectly identifies where cycles begin, resulting in an unrelated "file:line" as the backtrace. A more useful behaviour would be to print the last 30 lines of the backtrace, and have the developer identify which "file:line" is causing the cycle. This is similar to how JRuby handles SystemStackError backtraces.

---Files--------------------------------
stack-overflow.patch (630 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:62413] [ruby-trunk - Feature #6216] SystemStackError backtraces should not be reduced to one line
  2012-03-28  7:16 [ruby-core:43794] [ruby-trunk - Feature #6216][Open] SystemStackError backtraces should not be reduced to one line postmodern (Hal Brodigan)
                   ` (9 preceding siblings ...)
  2014-05-06  9:32 ` [ruby-core:62412] " nobu
@ 2014-05-06  9:52 ` nobu
  2014-06-23  2:35 ` [ruby-core:63280] [ruby-trunk - Feature #6216] [Closed] " nobu
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: nobu @ 2014-05-06  9:52 UTC (permalink / raw
  To: ruby-core

Issue #6216 has been updated by Nobuyoshi Nakada.


https://github.com/ruby/ruby/pull/608

----------------------------------------
Feature #6216: SystemStackError backtraces should not be reduced to one line
https://bugs.ruby-lang.org/issues/6216#change-46565

* Author: Hal Brodigan
* Status: Assigned
* Priority: Normal
* Assignee: Koichi Sasada
* Category: core
* Target version: next minor
----------------------------------------
When debugging "SystemStackError: stack level too deep" exceptions, it is not helpful that the backtrace is reduced to one single line. Most of the time Ruby incorrectly identifies where cycles begin, resulting in an unrelated "file:line" as the backtrace. A more useful behaviour would be to print the last 30 lines of the backtrace, and have the developer identify which "file:line" is causing the cycle. This is similar to how JRuby handles SystemStackError backtraces.

---Files--------------------------------
stack-overflow.patch (630 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:63280] [ruby-trunk - Feature #6216] [Closed] SystemStackError backtraces should not be reduced to one line
  2012-03-28  7:16 [ruby-core:43794] [ruby-trunk - Feature #6216][Open] SystemStackError backtraces should not be reduced to one line postmodern (Hal Brodigan)
                   ` (10 preceding siblings ...)
  2014-05-06  9:52 ` [ruby-core:62413] " nobu
@ 2014-06-23  2:35 ` nobu
  2014-06-27 21:33 ` [ruby-core:63377] [ruby-trunk - Feature #6216] " cody
  2014-06-30 17:47 ` [ruby-core:63446] " cody
  13 siblings, 0 replies; 15+ messages in thread
From: nobu @ 2014-06-23  2:35 UTC (permalink / raw
  To: ruby-core

Issue #6216 has been updated by Nobuyoshi Nakada.

Status changed from Assigned to Closed
% Done changed from 0 to 100

Applied in changeset r46502.

----------
Backtrace for SystemStackError

* eval.c (setup_exception): set backtrace in system stack error
  other than the pre-allocated sysstack_error.  [Feature #6216]
* proc.c (Init_Proc): freeze the pre-allocated sysstack_error.
* vm_insnhelper.c (vm_stackoverflow): raise new instance for each
  times without calling any methods to keep the backtrace with no
  further stack overflow.

----------------------------------------
Feature #6216: SystemStackError backtraces should not be reduced to one line
https://bugs.ruby-lang.org/issues/6216#change-47328

* Author: Hal Brodigan
* Status: Closed
* Priority: Normal
* Assignee: Koichi Sasada
* Category: core
* Target version: next minor
----------------------------------------
When debugging "SystemStackError: stack level too deep" exceptions, it is not helpful that the backtrace is reduced to one single line. Most of the time Ruby incorrectly identifies where cycles begin, resulting in an unrelated "file:line" as the backtrace. A more useful behaviour would be to print the last 30 lines of the backtrace, and have the developer identify which "file:line" is causing the cycle. This is similar to how JRuby handles SystemStackError backtraces.

---Files--------------------------------
stack-overflow.patch (630 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:63377] [ruby-trunk - Feature #6216] SystemStackError backtraces should not be reduced to one line
  2012-03-28  7:16 [ruby-core:43794] [ruby-trunk - Feature #6216][Open] SystemStackError backtraces should not be reduced to one line postmodern (Hal Brodigan)
                   ` (11 preceding siblings ...)
  2014-06-23  2:35 ` [ruby-core:63280] [ruby-trunk - Feature #6216] [Closed] " nobu
@ 2014-06-27 21:33 ` cody
  2014-06-30 17:47 ` [ruby-core:63446] " cody
  13 siblings, 0 replies; 15+ messages in thread
From: cody @ 2014-06-27 21:33 UTC (permalink / raw
  To: ruby-core

Issue #6216 has been updated by Cody Cutrer.


I can confirm that this is working on current master, but with one problem - if the exception is ever rescued and then re-raised (even with just a plain `raise`, not `raise e` or anything), the backtrace is reset to where it's re-raised from. I'm forced to comment out the entire rescue block for each one to find the true source

----------------------------------------
Feature #6216: SystemStackError backtraces should not be reduced to one line
https://bugs.ruby-lang.org/issues/6216#change-47421

* Author: Hal Brodigan
* Status: Closed
* Priority: Normal
* Assignee: Koichi Sasada
* Category: core
* Target version: next minor
----------------------------------------
When debugging "SystemStackError: stack level too deep" exceptions, it is not helpful that the backtrace is reduced to one single line. Most of the time Ruby incorrectly identifies where cycles begin, resulting in an unrelated "file:line" as the backtrace. A more useful behaviour would be to print the last 30 lines of the backtrace, and have the developer identify which "file:line" is causing the cycle. This is similar to how JRuby handles SystemStackError backtraces.

---Files--------------------------------
stack-overflow.patch (630 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:63446] [ruby-trunk - Feature #6216] SystemStackError backtraces should not be reduced to one line
  2012-03-28  7:16 [ruby-core:43794] [ruby-trunk - Feature #6216][Open] SystemStackError backtraces should not be reduced to one line postmodern (Hal Brodigan)
                   ` (12 preceding siblings ...)
  2014-06-27 21:33 ` [ruby-core:63377] [ruby-trunk - Feature #6216] " cody
@ 2014-06-30 17:47 ` cody
  13 siblings, 0 replies; 15+ messages in thread
From: cody @ 2014-06-30 17:47 UTC (permalink / raw
  To: ruby-core

Issue #6216 has been updated by Cody Cutrer.


... and fixed in my testing today

----------------------------------------
Feature #6216: SystemStackError backtraces should not be reduced to one line
https://bugs.ruby-lang.org/issues/6216#change-47488

* Author: Hal Brodigan
* Status: Closed
* Priority: Normal
* Assignee: Koichi Sasada
* Category: core
* Target version: next minor
----------------------------------------
When debugging "SystemStackError: stack level too deep" exceptions, it is not helpful that the backtrace is reduced to one single line. Most of the time Ruby incorrectly identifies where cycles begin, resulting in an unrelated "file:line" as the backtrace. A more useful behaviour would be to print the last 30 lines of the backtrace, and have the developer identify which "file:line" is causing the cycle. This is similar to how JRuby handles SystemStackError backtraces.

---Files--------------------------------
stack-overflow.patch (630 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-06-30 17:26 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-28  7:16 [ruby-core:43794] [ruby-trunk - Feature #6216][Open] SystemStackError backtraces should not be reduced to one line postmodern (Hal Brodigan)
2012-03-28 10:27 ` [ruby-core:43796] [ruby-trunk - Feature #6216][Feedback] " matz (Yukihiro Matsumoto)
2012-03-29  1:40 ` [ruby-core:43833] [ruby-trunk - Feature #6216] " postmodern (Hal Brodigan)
2012-04-06 21:42 ` [ruby-core:44168] " postmodern (Hal Brodigan)
2012-10-26 21:51 ` [ruby-core:48371] " ko1 (Koichi Sasada)
2012-10-30 17:14 ` [ruby-core:48619] [ruby-trunk - Feature #6216][Assigned] " matz (Yukihiro Matsumoto)
2012-10-31 20:40 ` [ruby-core:48686] [ruby-trunk - Feature #6216] " headius (Charles Nutter)
2013-04-14  6:36 ` [ruby-core:54261] " drkaes (Stefan Kaes)
2013-04-18 12:13 ` [ruby-core:54432] " drkaes (Stefan Kaes)
2013-08-24 15:35 ` [ruby-core:56798] " thedarkone (Vit Z)
2014-05-06  9:32 ` [ruby-core:62412] " nobu
2014-05-06  9:52 ` [ruby-core:62413] " nobu
2014-06-23  2:35 ` [ruby-core:63280] [ruby-trunk - Feature #6216] [Closed] " nobu
2014-06-27 21:33 ` [ruby-core:63377] [ruby-trunk - Feature #6216] " cody
2014-06-30 17:47 ` [ruby-core:63446] " cody

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).