{"action":"created","issue":{"url":"https://api.github.com/repos/mperham/sidekiq/issues/2763","repository_url":"https://api.github.com/repos/mperham/sidekiq","labels_url":"https://api.github.com/repos/mperham/sidekiq/issues/2763/labels{/name}","comments_url":"https://api.github.com/repos/mperham/sidekiq/issues/2763/comments","events_url":"https://api.github.com/repos/mperham/sidekiq/issues/2763/events","html_url":"https://github.com/mperham/sidekiq/issues/2763","id":125921493,"number":2763,"title":"Segfault with Ruby 2.3.0","user":{"login":"pik","id":10236920,"avatar_url":"https://avatars.githubusercontent.com/u/10236920?v=3","gravatar_id":"","url":"https://api.github.com/users/pik","html_url":"https://github.com/pik","followers_url":"https://api.github.com/users/pik/followers","following_url":"https://api.github.com/users/pik/following{/other_user}","gists_url":"https://api.github.com/users/pik/gists{/gist_id}","starred_url":"https://api.github.com/users/pik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pik/subscriptions","organizations_url":"https://api.github.com/users/pik/orgs","repos_url":"https://api.github.com/users/pik/repos","events_url":"https://api.github.com/users/pik/events{/privacy}","received_events_url":"https://api.github.com/users/pik/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-01-11T11:14:39Z","updated_at":"2016-02-10T16:37:14Z","closed_at":"2016-01-11T16:34:36Z","body":"Hello apologies if this ticket is early (I see it's not yet listed in the officially tested versions in the readme) - but I'm getting segfaults running sidekiq ever since upgrading to ruby 2.30. What seems to be particular about this is that a single sidekiq process will never segfault but running multiple processes on the same machine (Mac OS X 10.10) the second or third process usually will (foreman start which starts all the dynos in the procfile always segfaults). \r\n\r\nHere is the traceback: \r\n```\r\n/Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:275: [BUG] Segmentation fault at 0x00000200000000\r\nruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin14]\r\n\r\n-- Crash Report log information --------------------------------------------\r\n   See Crash Report log file under the one of following:\r\n     * ~/Library/Logs/CrashReporter\r\n     * /Library/Logs/CrashReporter\r\n     * ~/Library/Logs/DiagnosticReports\r\n     * /Library/Logs/DiagnosticReports\r\n   for more details.\r\nDon't forget to include the above Crash Report log file in bug reports.\r\n\r\n-- Control frame information -----------------------------------------------\r\nc:0020 p:---- s:0076 e:000075 CFUNC  :require\r\nc:0019 p:0012 s:0072 e:000071 BLOCK  /Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:275\r\nc:0018 p:0059 s:0070 e:000069 METHOD /Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240\r\nc:0017 p:0031 s:0065 e:000064 METHOD /Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:275\r\nc:0016 p:0075 s:0060 e:000059 TOP    /Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/oj-2.13.1/lib/oj.rb:40 [FINISH]\r\nc:0015 p:---- s:0058 e:000057 CFUNC  :require\r\nc:0014 p:0042 s:0054 e:000053 BLOCK  /Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77 [FINISH]\r\nc:0013 p:---- s:0050 e:000049 CFUNC  :each\r\nc:0012 p:0062 s:0047 e:000046 BLOCK  /Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72 [FINISH]\r\nc:0011 p:---- s:0041 e:000040 CFUNC  :each\r\nc:0010 p:0038 s:0038 e:000037 METHOD /Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61\r\nc:0009 p:0019 s:0034 e:000033 METHOD /Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler.rb:99\r\nc:0008 p:0054 s:0030 e:000029 TOP    /Users/pik/git/tradegecko/config/application.rb:7 [FINISH]\r\nc:0007 p:---- s:0028 e:000027 CFUNC  :require\r\nc:0006 p:0230 s:0024 e:000023 METHOD /Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sidekiq-3.5.1/lib/sidekiq/cli.rb:242\r\nc:0005 p:0008 s:0021 e:000020 METHOD /Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sidekiq-3.5.1/lib/sidekiq/cli.rb:50\r\nc:0004 p:0054 s:0014 e:000013 TOP    /Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sidekiq-3.5.1/bin/sidekiq:13 [FINISH]\r\nc:0003 p:---- s:0010 e:000009 CFUNC  :load\r\nc:0002 p:0147 s:0006 E:000760 EVAL   /Users/pik/.rbenv/versions/2.3.0/bin/sidekiq:23 [FINISH]\r\nc:0001 p:0000 s:0002 E:000080 (none) [FINISH]\r\n\r\n-- Ruby level backtrace information ----------------------------------------\r\n/Users/pik/.rbenv/versions/2.3.0/bin/sidekiq:23:in `<main>'\r\n/Users/pik/.rbenv/versions/2.3.0/bin/sidekiq:23:in `load'\r\n/Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sidekiq-3.5.1/bin/sidekiq:13:in `<top (required)>'\r\n/Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sidekiq-3.5.1/lib/sidekiq/cli.rb:50:in `run'\r\n/Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sidekiq-3.5.1/lib/sidekiq/cli.rb:242:in `boot_system'\r\n/Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sidekiq-3.5.1/lib/sidekiq/cli.rb:242:in `require'\r\n/Users/pik/git/tradegecko/config/application.rb:7:in `<top (required)>'\r\n/Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'\r\n/Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'\r\n/Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'\r\n/Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'\r\n/Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'\r\n/Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `block (2 levels) in require'\r\n/Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `require'\r\n/Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/oj-2.13.1/lib/oj.rb:40:in `<top (required)>'\r\n/Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:275:in `require'\r\n/Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'\r\n/Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:275:in `block in require'\r\n/Users/pik/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:275:in `require'\r\n\r\n-- Machine register context ------------------------------------------------\r\n rax: 0x0000000200000000 rbx: 0x00007fdff9c093a0 rcx: 0x0000000000000000\r\n rdx: 0x0000000000000000 rdi: 0x00007fdff9c093a0 rsi: 0x0000000200000010\r\n rbp: 0x00007fff5eafd920 rsp: 0x00007fff5eafd910  r8: 0x0000000020528805\r\n  r9: 0x00007fdff9c093a0 r10: 0x00007fdffd700000 r11: 0xffffffffffe9c35f\r\n r12: 0x0000000000000000 r13: 0x0000008000000001 r14: 0x0000000200000010\r\n r15: 0x00007fdff9c093a0 rip: 0x000000010116ade2 rfl: 0x0000000000010206\r\n\r\n-- C level backtrace information -------------------------------------------\r\n0   ruby                                0x000000010129c504 rb_vm_bugreport + 388\r\n1   ruby                                0x000000010113fc03 rb_bug_context + 483\r\n2   ruby                                0x0000000101211583 sigsegv + 83\r\n3   libsystem_platform.dylib            0x00007fff87362f1a _sigtramp + 26\r\n4   ruby                                0x000000010116ade2 gc_mark_ptr + 82\r\n5   ???                                 0x00007fdffd61b140 0x0 + 140600005472576\r\n\r\n-- Other runtime information -----------------------------------------------\r\n\r\n* Loaded script: /Users/pik/.rbenv/versions/2.3.0/bin/sidekiq\r\n```\r\n \r\nFull log: (https://gist.github.com/pik/514955728bda881ea2ae) \r\n\r\nI've logged a few runs with logging in active_support to see it was a particular dependency causing it - but it always seems to be different. I haven't much experience with debugging on OS X (although it's what everyone uses at work) - I think dtruss can emulate strace but I will need to read up on that. \r\n\r\nP.S. I've tried upgrading to 4.0.2 (disabling sidekiq-pro and a few other extensions which are only `< 4.0`) compatible and that seems to work (I've also experienced the same seg-fault after disabling sidekiq-pro and third-party extensions with 3.51). "},"comment":{"url":"https://api.github.com/repos/mperham/sidekiq/issues/comments/182467718","html_url":"https://github.com/mperham/sidekiq/issues/2763#issuecomment-182467718","issue_url":"https://api.github.com/repos/mperham/sidekiq/issues/2763","id":182467718,"user":{"login":"gopz","id":3451290,"avatar_url":"https://avatars.githubusercontent.com/u/3451290?v=3","gravatar_id":"","url":"https://api.github.com/users/gopz","html_url":"https://github.com/gopz","followers_url":"https://api.github.com/users/gopz/followers","following_url":"https://api.github.com/users/gopz/following{/other_user}","gists_url":"https://api.github.com/users/gopz/gists{/gist_id}","starred_url":"https://api.github.com/users/gopz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gopz/subscriptions","organizations_url":"https://api.github.com/users/gopz/orgs","repos_url":"https://api.github.com/users/gopz/repos","events_url":"https://api.github.com/users/gopz/events{/privacy}","received_events_url":"https://api.github.com/users/gopz/received_events","type":"User","site_admin":false},"created_at":"2016-02-10T16:37:14Z","updated_at":"2016-02-10T16:37:14Z","body":"@b264, thank you for the note about `RAILS_ENV=development bundle exec sidekiq`. This is also happening to me whenever I start sidekiq, I have found that setting the environment as an argument to sidekiq will crash as well i.e: `bundle exec sidekiq -e development`"}}