ice799 / memprof

A Ruby gem for memory profiling
http://timetobleed.com
MIT License
614 stars 30 forks source link

Memprof::Tracer fails with Assertion failed in json.c #16

Open cbillen opened 13 years ago

cbillen commented 13 years ago

good evening,

I have the following line in my production.rb:

require 'memprof/middleware' config.middleware.insert(0, Memprof::Tracer)

Upon any request to my app, it partially renders then ends with this in stdout:

... Completed 200 OK in 2315ms (Views: 1048.6ms | ActiveRecord: 885.7ms) Assertion failed: (gen->state[gen->depth] == json_gen_complete), function json_gen_reset, file json.c, line 16. Abort trap

No trace files are generated in tmp

Environment is: REE/RVM: ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.7.0], MBARI 0x6770, Ruby Enterprise Edition 2011.03 Rails 3.0.5 Mac OS X 10.6.7

tmm1 commented 13 years ago

Replace require 'memprof/middleware' with require 'memprof/tracer'

mjsteckel commented 12 years ago

I'm seeing the same thing. I've also ensured that the following is in the appropriate config/ file. (In my case development.rb with config.cache_classes and config.action_controller.perform_caching set to true.)

require 'memprof/tracer'
config.middleware.insert(0, Memprof::Tracer)

Any ideas?

Environment: ree-1.8.7-2011.03:

system: uname: "Linux lucid64 2.6.32-33-server #70-Ubuntu SMP Thu Jul 7 22:28:30 UTC 2011 x86_64 GNU/Linux" bash: "/bin/bash => GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)" zsh: " => not installed"

rvm: version: "rvm 1.9.2 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]"

ruby: interpreter: "ruby" version: "1.8.7" date: "2010-01-10" platform: "x86_64-linux" patchlevel: "2010-01-10 patchlevel 249" full_version: "ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]"

homes: gem: "/home/change/.rvm/gems/ree-1.8.7-2011.03" ruby: "/home/change/.rvm/rubies/ree-1.8.7-2011.03"

binaries: ruby: "/usr/bin/ruby" irb: "/opt/ruby/bin/irb" gem: "/opt/ruby/bin/gem" rake: "/home/change/.rvm/bin/rake"

environment: PATH: "/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/ruby/bin/:/home/change/.rvm/bin:/home/change/.rvm/bin" GEM_HOME: "/home/change/.rvm/gems/ree-1.8.7-2011.03" GEM_PATH: "/home/change/.rvm/gems/ree-1.8.7-2011.03:/home/change/.rvm/gems/ree-1.8.7-2011.03@global" MY_RUBY_HOME: "/home/change/.rvm/rubies/ree-1.8.7-2011.03" IRBRC: "/home/change/.rvm/rubies/ree-1.8.7-2011.03/.irbrc" RUBYOPT: "" gemset: ""