From: "drbrain (Eric Hodel)" Date: 2012-10-18T09:35:51+09:00 Subject: [ruby-core:48061] [ruby-trunk - Bug #7180][Feedback] set_trace_func with error in proc block locks up Ruby with 100% cpu usage and no way to exit without killing proc Issue #7180 has been updated by drbrain (Eric Hodel). Category set to core Status changed from Open to Feedback =begin I can't reproduce this. Can you provide a way to reproduce it? With trunk: $ time ruby20 -ve 'set_trace_func proc {|event, file, line, id, binding, classname| raise "error"}; loop do 1 + 1 end' ruby 2.0.0dev (2012-09-06 trunk 36915) [x86_64-darwin12.1.0] -e:1:in `block in
': error (RuntimeError) from -e:1:in `
' real 0m0.017s user 0m0.012s sys 0m0.004s With ruby 1.9.4-p194 as you are running: $ time ruby19 -ve 'set_trace_func proc {|event, file, line, id, binding, classname| raise "error"}; loop do 1 + 1 end' ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.2.0] -e:1:in `block in
': error (RuntimeError) from -e:1:in `
' real 0m0.017s user 0m0.012s sys 0m0.004s =end ---------------------------------------- Bug #7180: set_trace_func with error in proc block locks up Ruby with 100% cpu usage and no way to exit without killing proc https://bugs.ruby-lang.org/issues/7180#change-30988 Author: garysweaver (Gary Weaver) Status: Feedback Priority: Normal Assignee: Category: core Target version: ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.0] Causes 100% cpu usage and cannot ctrl-C to exit (have to kill proc): set_trace_func proc {|event, file, line, id, binding, classname| raise "error"} Understand that set_trace_func plays by different rules, but this isn't expected. -- http://bugs.ruby-lang.org/