Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segfault when calling merge! #325

Open
ktimothy opened this issue Nov 13, 2023 · 1 comment
Open

segfault when calling merge! #325

ktimothy opened this issue Nov 13, 2023 · 1 comment

Comments

@ktimothy
Copy link

Ruby 3.2.2
rub-prof 1.6.3

Merging thousands of threads.

-- C level backtrace information -------------------------------------------
libruby.3.2.dylib(rb_vm_bugreport+0x9a0) [0x10135da2c]
libruby.3.2.dylib(rb_bug_for_fatal_signal+0x160) [0x101182ac8]
libruby.3.2.dylib(sig_do_nothing+0x0) [0x1012bc164]
/usr/lib/system/libsystem_platform.dylib(_sigtramp+0x38) [0x1b984d4c4]
ruby/gems/3.2.0/gems/ruby-prof-1.6.3/lib/ruby_prof.bundle(prof_call_tree_merge_internal+0x15c) [0x10ab74e38]
libruby.3.2.dylib(st_general_foreach+0xb8) [0x1012c4af4]
libruby.3.2.dylib(rb_st_foreach+0x38) [0x1012c5160]
ruby/gems/3.2.0/gems/ruby-prof-1.6.3/lib/ruby_prof.bundle(prof_call_tree_merge_internal) [0x10ab74e7c]
libruby.3.2.dylib(st_general_foreach+0xb8) [0x1012c4af4]
libruby.3.2.dylib(rb_st_foreach+0x38) [0x1012c5160]
ruby/gems/3.2.0/gems/ruby-prof-1.6.3/lib/ruby_prof.bundle(prof_call_tree_merge_internal) [0x10ab74e7c]
libruby.3.2.dylib(st_general_foreach+0xb8) [0x1012c4af4]
libruby.3.2.dylib(rb_st_foreach+0x38) [0x1012c5160]
ruby/gems/3.2.0/gems/ruby-prof-1.6.3/lib/ruby_prof.bundle(prof_call_tree_merge_internal) [0x10ab74e7c]
libruby.3.2.dylib(st_general_foreach+0xb8) [0x1012c4af4]
libruby.3.2.dylib(rb_st_foreach+0x38) [0x1012c5160]
ruby/gems/3.2.0/gems/ruby-prof-1.6.3/lib/ruby_prof.bundle(prof_call_tree_merge_internal) [0x10ab74e7c]
libruby.3.2.dylib(st_general_foreach+0xb8) [0x1012c4af4]
libruby.3.2.dylib(rb_st_foreach+0x38) [0x1012c5160]
ruby/gems/3.2.0/gems/ruby-prof-1.6.3/lib/ruby_prof.bundle(prof_call_tree_merge_internal) [0x10ab74e7c]
libruby.3.2.dylib(st_general_foreach+0xb8) [0x1012c4af4]
libruby.3.2.dylib(rb_st_foreach+0x38) [0x1012c5160]
ruby/gems/3.2.0/gems/ruby-prof-1.6.3/lib/ruby_prof.bundle(prof_call_tree_merge_internal) [0x10ab74e7c]
libruby.3.2.dylib(st_general_foreach+0xb8) [0x1012c4af4]
libruby.3.2.dylib(rb_st_foreach+0x38) [0x1012c5160]
ruby/gems/3.2.0/gems/ruby-prof-1.6.3/lib/ruby_prof.bundle(prof_call_tree_merge_internal) [0x10ab74e7c]
libruby.3.2.dylib(st_general_foreach+0xb8) [0x1012c4af4]
libruby.3.2.dylib(rb_st_foreach+0x38) [0x1012c5160]
ruby/gems/3.2.0/gems/ruby-prof-1.6.3/lib/ruby_prof.bundle(prof_call_tree_merge_internal) [0x10ab74e7c]
libruby.3.2.dylib(st_general_foreach+0xb8) [0x1012c4af4]
libruby.3.2.dylib(rb_st_foreach+0x38) [0x1012c5160]
ruby/gems/3.2.0/gems/ruby-prof-1.6.3/lib/ruby_prof.bundle(prof_call_tree_merge_internal) [0x10ab74d60]
ruby/gems/3.2.0/gems/ruby-prof-1.6.3/lib/ruby_prof.bundle(rp_init_thread) [0x10ab7aca4]
libruby.3.2.dylib(vm_call_cfunc_with_frame+0xe8) [0x1013518d8]
@cfis
Copy link
Member

cfis commented Nov 14, 2023

Hmm, does it always happen? Is it related to thread count? Can you provide the profiled code? Any chance you can run it in a debugger?

It not, might be worth trying to dump the profile object and seeing how big that is:

Marshal.dump(profile)

And then sending it to me or attaching to the ticket (unless its huge). Maybe I could reload it and then call merge? I see you are on MacOS, is this an Intel chip or Apple chip?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants