Giter Site home page Giter Site logo

gc_tracer's People

Contributors

amatsuda avatar byroot avatar hanachin avatar jasonrclark avatar ko1 avatar samsaffron avatar spicyjessef avatar zzak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gc_tracer's Issues

Crash on exit with Ruby 2.7.0p0

-- C level backtrace information -------------------------------------------
/opt/rubies/2.7.0/bin/ruby(rb_vm_bugreport+0x96) [0x1017a5446]
/opt/rubies/2.7.0/bin/ruby(rb_bug+0xcc) [0x1017b1d66]
/opt/rubies/2.7.0/bin/ruby(newobj_slowpath+0x99c) [0x10160014c]
/opt/rubies/2.7.0/bin/ruby(newobj_slowpath_wb_protected+0x14) [0x1015ff784]
/opt/rubies/2.7.0/bin/ruby(rb_str_buf_new+0x1e) [0x10171b42e]
/opt/rubies/2.7.0/bin/ruby(rb_enc_vsprintf+0x48) [0x1017093e8]
/opt/rubies/2.7.0/bin/ruby(rb_vraise+0x14) [0x1015dbb34]
/opt/rubies/2.7.0/bin/ruby(rb_raise+0x7b) [0x1015d72db]
/opt/rubies/2.7.0/bin/ruby(rb_check_typeddata+0xf3) [0x1015d8753]
/opt/rubies/2.7.0/bin/ruby(tp_call_trace+0x2a) [0x1017a7c8a]
/opt/rubies/2.7.0/bin/ruby(rb_exec_event_hooks+0x163) [0x1017a6c93]
/opt/rubies/2.7.0/bin/ruby(rb_objspace_call_finalizer+0x8b7) [0x1015f4c87]
/opt/rubies/2.7.0/bin/ruby(rb_ec_cleanup+0x2de) [0x1015e310e]
/opt/rubies/2.7.0/bin/ruby(ruby_stop+0x9) [0x1015e31f9]
/opt/rubies/2.7.0/bin/ruby(rb_f_fork+0x98) [0x1016b5e28]
/opt/rubies/2.7.0/bin/ruby(vm_call_cfunc+0x170) [0x1017964a0]
/opt/rubies/2.7.0/bin/ruby(vm_exec_core+0x492b) [0x10177d3cb]
/opt/rubies/2.7.0/bin/ruby(rb_vm_exec+0xadc) [0x1017912bc]
/opt/rubies/2.7.0/bin/ruby(loop_i+0x29) [0x1017a11e9]
/opt/rubies/2.7.0/bin/ruby(rb_vrescue2+0x114) [0x1015e3e44]
/opt/rubies/2.7.0/bin/ruby(rb_rescue2+0x7b) [0x1015e3d0b]
/opt/rubies/2.7.0/bin/ruby(vm_call_cfunc+0x170) [0x1017964a0]
/opt/rubies/2.7.0/bin/ruby(vm_exec_core+0x3782) [0x10177c222]
/opt/rubies/2.7.0/bin/ruby(rb_vm_exec+0xadc) [0x1017912bc]
/opt/rubies/2.7.0/bin/ruby(load_iseq_eval+0xb9) [0x10163cdd9]
/opt/rubies/2.7.0/bin/ruby(require_internal+0x2f1) [0x10163bae1]
/opt/rubies/2.7.0/bin/ruby(rb_f_require+0x21) [0x10163b021]
/opt/rubies/2.7.0/bin/ruby(vm_call_cfunc+0x170) [0x1017964a0]
/opt/rubies/2.7.0/bin/ruby(vm_exec_core+0x38df) [0x10177c37f]
/opt/rubies/2.7.0/bin/ruby(rb_vm_exec+0xadc) [0x1017912bc]
/opt/rubies/2.7.0/bin/ruby(rb_ec_exec_node+0xc6) [0x1015e33c6]
/opt/rubies/2.7.0/bin/ruby(ruby_run_node+0x55) [0x1015e32a5]
/opt/rubies/2.7.0/bin/ruby(main+0x5d) [0x10153c29d]

From my understanding an invalid type is passed to tp_call_trace, and then it crashes because it tries to allocate an exception during a GC run.

I can reproduce this reliably on my app, and can work around with at_exit { GC::Tracker.disable }.

Error when installing with latest gem version

$ grep gc_tracer Gemfile
gem 'gc_tracer'
$ bundle
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /home/slackz/.rbenv/versions/2.1.2/bin/ruby extconf.rb 
checking for rb_obj_gc_flags() in ruby/ruby.h... yes
checking for sys/time.h... yes
checking for sys/resource.h... yes
checking for getrusage()... yes
checking for struct rusage.ru_maxrss in sys/time.h,sys/resource.h... yes
checking for struct rusage.ru_ixrss in sys/time.h,sys/resource.h... yes
checking for struct rusage.ru_idrss in sys/time.h,sys/resource.h... yes
checking for struct rusage.ru_isrss in sys/time.h,sys/resource.h... yes
checking for struct rusage.ru_minflt in sys/time.h,sys/resource.h... yes
checking for struct rusage.ru_majflt in sys/time.h,sys/resource.h... yes
checking for struct rusage.ru_nswap in sys/time.h,sys/resource.h... yes
checking for struct rusage.ru_inblock in sys/time.h,sys/resource.h... yes
checking for struct rusage.ru_oublock in sys/time.h,sys/resource.h... yes
checking for struct rusage.ru_msgsnd in sys/time.h,sys/resource.h... yes
checking for struct rusage.ru_msgrcv in sys/time.h,sys/resource.h... yes
checking for struct rusage.ru_nsignals in sys/time.h,sys/resource.h... yes
checking for struct rusage.ru_nvcsw in sys/time.h,sys/resource.h... yes
checking for struct rusage.ru_nivcsw in sys/time.h,sys/resource.h... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling gc_tracer.c
gc_tracer.c: In function ‘Init_gc_tracer’:
gc_tracer.c:846:5: warning: implicit declaration of function ‘rb_obj_gc_flags’ [-Wimplicit-function-declaration]
     rb_obj_gc_flags(rb_cObject, NULL, 0);
     ^
gc_tracer.c:847:5: error: ‘id_young’ undeclared (first use in this function)
     id_young = rb_intern("young");
     ^
gc_tracer.c:847:5: note: each undeclared identifier is reported only once for each function it appears in
make: *** [gc_tracer.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/slackz/repos/theclymb/.bundle/ruby/2.1.0/gems/gc_tracer-0.3.2 for inspection.
Results logged to /home/slackz/repos/theclymb/.bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/gc_tracer-0.3.2/gem_make.out
An error occurred while installing gc_tracer (0.3.2), and Bundler cannot
continue.
Make sure that `gem install gc_tracer -v '0.3.2'` succeeds before bundling.

custom_event_logging busted?

I'm not seeing any custom events showing up in the logfile.

In your test specs there's also clearly an issue where you only assert the format of the custom event line, you don't assert that there must be a line present which is a custom event:

if /out/ =~ line
expect(line).to match /1\t-1\t0/
end

If no line matches /out/ then your specs will still pass.

Doesn't compile on Windows

I would love to use this on Windows if possible.

    C:/Ruby215p273/bin/ruby.exe extconf.rb
checking for rb_obj_gc_flags() in ruby/ruby.h... yes
checking for sys/time.h... yes
checking for sys/resource.h... no
checking for time.h... yes
checking for clock_gettime()... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
generating gc_tracer-i386-mingw32.def
compiling gc_logging.c
In file included from gc_logging.c:15:0:
gc_tracer.h: In function 'setup_gc_trace_symbols':
gc_tracer.h:33:5: error: 'sym_rusage_timeval' undeclared (first use in this function)
gc_tracer.h:33:5: note: each undeclared identifier is reported only once for each function it appears in
gc_logging.c: In function 'fill_rusage':
gc_logging.c:150:16: error: 'struct gc_logging' has no member named 'filled_rusage'
gc_logging.c:151:9: error: 'struct gc_logging' has no member named 'filled_rusage'
gc_logging.c:152:2: warning: implicit declaration of function 'getrusage' [-Wimplicit-function-declaration
gc_logging.c:152:12: error: 'RUSAGE_SELF' undeclared (first use in this function)
gc_logging.c:152:33: error: 'struct gc_logging' has no member named 'rusage'
gc_logging.c: In function 'out_rusage':
gc_logging.c:243:60: error: 'struct gc_logging' has no member named 'rusage'
gc_logging.c:244:60: error: 'struct gc_logging' has no member named 'rusage'
gc_logging.c: At top level:
gc_logging.c:239:1: warning: 'out_rusage' defined but not used [-Wunused-function]
make: *** [gc_logging.o] Error 1

make failed, exit code 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.