This is how I debug SystemStackError when there is no stack trace.
My first attempt was:
begin
a_method_that_causes_infinite_recursion_in_a_not_obvious_way
rescue SystemStackError
puts caller
end
#!/usr/bin/env ruby | |
# | |
# Wrap thor-scmver to build metadata | |
# | |
require 'thor-scmversion' | |
module ThorSCMVersion | |
class Tasks < Thor | |
namespace "version" |
#!/usr/bin/env ruby | |
# | |
# Converts a test-kitchen Kitchenfile to a jamie-ci .jamie.yml. Writes | |
# out the .jamie.yml file. Once Test Kitchen 1.0 is ready, this file | |
# will be renamed to .kitchen.yml. | |
# | |
# Must be run from a cookbook directory that has been setup with Test | |
# Kitchen (./test/kitchen/Kitchenfile exists). | |
# | |
# Bugs: |
class Chef | |
class SubResourceCollection < ResourceCollection | |
def initialize(parent) | |
@parent = parent | |
super() | |
end | |
def lookup(resource) | |
super | |
rescue Chef::Exceptions::ResourceNotFound |
This is how I debug SystemStackError when there is no stack trace.
My first attempt was:
begin
a_method_that_causes_infinite_recursion_in_a_not_obvious_way
rescue SystemStackError
puts caller
end
class BackTicks | |
def run | |
`pwd` | |
end | |
end | |
describe BackTicks do | |
subject { BackTicks.new } | |
it "should execute run" do |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'optparse' | |
require 'maruku' | |
require 'wikicloth' | |
require 'tidy_ffi' | |
require 'pandoc-ruby' | |
opts = {} | |
OptionParser.new do |o| |
node-inspector & | |
coffee --nodejs --debug app.coffee & | |
google-chrome http://127.0.0.1:8080/debug?port=5858 & | |
google-chrome http://127.0.0.1:3000 & |
Dec 9 14:27:03 acc-db-01 [248740.420900] divide error: 0000 [#1] SMP | |
Dec 9 14:27:03 acc-db-01 [248740.428791] last sysfs file: /sys/devices/system/cpu/cpu15/cache/index2/shared_cpu_map | |
Dec 9 14:27:03 acc-db-01 [248740.444194] CPU 6 | |
Dec 9 14:27:03 acc-db-01 [248740.450660] Modules linked in: btrfs zlib_deflate crc32c libcrc32c ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs reiserfs xfs exportfs nfs lockd nfs_acl auth_rpcgss sunrpc ipmi_devintf ipmi_si ipmi_msghandler autofs4 bonding fbcon tileblit font bitblit softcursor vga16fb vgastate bnx2 psmouse dell_wmi serio_raw joydev power_meter dcdbas lp parport ses enclosure usbhid hid megaraid_sas | |
Dec 9 14:27:03 acc-db-01 [248740.516499] Pid: 17864, comm: dsm_sa_snmp32d Not tainted 2.6.32-22-generic #33-Ubuntu PowerEdge R710 | |
Dec 9 14:27:03 acc-db-01 [248740.538698] RIP: 0010:[<ffffffff8105621c>] [<ffffffff8105621c>] find_busiest_group+0x63c/0x900 | |
Dec 9 14:27:03 acc-db-01 [248740.561223] RSP: 0018:ffff880604711b88 EFLAGS: 00010046 | |
Dec 9 14:27:03 acc- |