Skip to content

Commit

Permalink
ci: reduce valgrind suppressions
Browse files Browse the repository at this point in the history
Since fixing #1952 I've wanted to revisit the valgrind suppressions to
see what's left. These suppressions represent what I saw in docker
images on my dev machine:

- on Ruby 2.7 and 3.0 startup (iseq_peephole_optimize)
- enumerators seem to confuse Valgrind (mark_locations_array/gc_mark_stacked_objects)
  • Loading branch information
flavorjones committed Mar 21, 2021
1 parent f6e2239 commit 2f76d57
Show file tree
Hide file tree
Showing 5 changed files with 552 additions and 465 deletions.
116 changes: 73 additions & 43 deletions suppressions/nokogiri_ruby-2.5.supp
@@ -1,52 +1,82 @@
{
<ruby_cleanup_error_1>
Memcheck:Addr8
fun:mark_locations_array
fun:gc_mark_locations
fun:rb_gc_mark_locations
fun:gc_mark_stacked_objects
fun:gc_mark_stacked_objects_*
fun:gc_marks_rest
...
fun:ruby_finalize_?
fun:ruby_cleanup
...
}
{
<ruby_cleanup_error_2>
Memcheck:Addr8
fun:mark_locations_array
fun:gc_mark_locations
fun:rb_gc_mark_locations
fun:gc_marks_wb_unprotected_objects
fun:gc_marks_finish
fun:gc_marks_rest
...
fun:ruby_finalize_?
fun:ruby_cleanup
...
}
{
https://ci.nokogiri.org/teams/nokogiri-core/pipelines/nokogiri-pr/jobs/ruby-2.5-valgrind/builds/66
node set enumerators seem to trigger this warning
Memcheck:Addr8
fun:mark_locations_array
fun:gc_mark_locations
fun:gc_mark_locations
fun:rb_gc_mark_locations
fun:gc_mark_stacked_objects
fun:gc_mark_stacked_objects_all
fun:gc_marks_rest
fun:gc_marks
fun:gc_start
fun:gc_start
fun:garbage_collect
...
fun:ruby_cleanup
...
}
{
https://ci.nokogiri.org/teams/nokogiri-core/pipelines/nokogiri-pr/jobs/ruby-2.5-valgrind/builds/71
Memcheck:Addr8
fun:mark_locations_array
fun:gc_mark_locations
fun:gc_mark_locations
fun:rb_gc_mark_locations
fun:gc_marks_wb_unprotected_objects
...
fun:ruby_cleanup
...
# fun:gc_start_internal
# fun:vm_call_cfunc_with_frame
# fun:vm_call_cfunc
# fun:vm_call_method_each_type.part.135
# fun:vm_call_method_each_type
# fun:vm_call_method
# fun:vm_call_method
# fun:vm_exec_core
# fun:vm_exec
# fun:invoke_block
# fun:invoke_iseq_block_from_c
# fun:invoke_block_from_c_bh
# fun:vm_yield
# fun:rb_yield_0
# fun:rb_yield_1
# fun:rb_yield
# fun:rb_ary_each
# fun:vm_call_cfunc_with_frame
# fun:vm_call_cfunc
# fun:vm_call_method_each_type.part.135
# fun:vm_call_method_each_type
# fun:vm_call_method
# fun:vm_call_method
# fun:vm_exec_core
# fun:vm_exec
# fun:invoke_block
# fun:invoke_iseq_block_from_c
# fun:invoke_block_from_c_bh
# fun:vm_yield
# fun:rb_yield_0
# fun:rb_yield_1
# fun:rb_yield
# fun:rb_ary_each
# fun:vm_call_cfunc_with_frame
# fun:vm_call_cfunc
# fun:vm_call_method_each_type.part.135
# fun:vm_call_method_each_type
# fun:vm_call_method
# fun:vm_call_method
# fun:vm_exec_core
# fun:vm_exec
# fun:invoke_block
# fun:invoke_iseq_block_from_c
# fun:invoke_block_from_c_bh
# fun:vm_yield_force_blockarg
# fun:rb_yield_force_blockarg
# fun:rb_ary_collect
# fun:vm_call_cfunc_with_frame
# fun:vm_call_cfunc
# fun:vm_call_method_each_type.part.135
# fun:vm_call_method_each_type
# fun:vm_call_method
# fun:vm_call_method
# fun:vm_exec_core
# fun:vm_exec
# fun:invoke_block
# fun:invoke_iseq_block_from_c
# fun:invoke_block_from_c_proc
# fun:vm_invoke_proc
# fun:rb_proc_call
# fun:exec_end_procs_chain
# fun:rb_exec_end_proc
# fun:ruby_finalize_0
# fun:ruby_cleanup
# fun:ruby_run_node
# fun:main
}
209 changes: 193 additions & 16 deletions suppressions/nokogiri_ruby-2.6.supp
@@ -1,34 +1,211 @@
{
https://ci.nokogiri.org/teams/nokogiri-core/pipelines/nokogiri/jobs/ruby-2.6-valgrind/builds/1,https://ci.nokogiri.org/teams/nokogiri-core/pipelines/nokogiri-pr/jobs/ruby-2.6-valgrind/builds/11
node set enumerators seem to trigger this warning
Memcheck:Addr8
fun:mark_locations_array
fun:gc_marks_wb_unprotected_objects
fun:gc_marks_finish
...
fun:ruby_finalize_?
fun:ruby_cleanup
fun:gc_mark_stacked_objects
fun:gc_mark_stacked_objects_all
fun:gc_marks_rest
fun:gc_marks
fun:gc_start
fun:garbage_collect
...
# fun:gc_start_internal
# fun:invoke_bf
# fun:vm_invoke_builtin_delegate
# fun:vm_exec_core
# fun:rb_vm_exec
# fun:invoke_bmethod
# fun:invoke_iseq_block_from_c
# fun:invoke_block_from_c_proc
# fun:rb_vm_invoke_bmethod
# fun:vm_call_bmethod_body
# fun:vm_call_bmethod
# fun:vm_call_method
# fun:vm_call_opt_send
# fun:vm_call_method
# fun:vm_sendish
# fun:vm_exec_core
# fun:rb_vm_exec
# fun:invoke_block
# fun:invoke_iseq_block_from_c
# fun:invoke_block_from_c_bh
# fun:vm_yield
# fun:rb_yield_0
# fun:rb_yield_1
# fun:rb_yield
# fun:rb_ary_each
# fun:vm_call_cfunc_with_frame
# fun:vm_call_cfunc
# fun:vm_call_method
# fun:vm_sendish
# fun:vm_exec_core
# fun:rb_vm_exec
# fun:invoke_block
# fun:invoke_iseq_block_from_c
# fun:invoke_block_from_c_bh
# fun:vm_yield
# fun:rb_yield_0
# fun:rb_yield_1
# fun:rb_yield
# fun:rb_ary_collect
# fun:vm_call_cfunc_with_frame
# fun:vm_call_cfunc
# fun:vm_call_method
# fun:vm_sendish
# fun:vm_exec_core
# fun:rb_vm_exec
# fun:invoke_block
# fun:invoke_iseq_block_from_c
# fun:invoke_block_from_c_proc
# fun:vm_invoke_proc
# fun:rb_vm_invoke_proc
# fun:rb_proc_call
# fun:exec_end_procs_chain
# fun:rb_ec_exec_end_proc
# fun:rb_ec_teardown
# fun:rb_ec_cleanup
# fun:ruby_run_node
# fun:main
}
{
https://ci.nokogiri.org/teams/nokogiri-core/pipelines/nokogiri/jobs/ruby-2.6-valgrind/builds/1,https://ci.nokogiri.org/teams/nokogiri-core/pipelines/nokogiri-v1.10.x/jobs/ruby-2.6-valgrind/builds/3
node set enumerators seem to trigger this warning
Memcheck:Addr8
fun:mark_locations_array
fun:gc_mark_stacked_objects
fun:gc_mark_stacked_objects_incremental
fun:gc_marks_rest
fun:gc_rest.part.0
fun:gc_rest
fun:garbage_collect
...
fun:ruby_finalize_?
fun:ruby_cleanup
...
# fun:gc_start_internal
# fun:invoke_bf
# fun:vm_invoke_builtin_delegate
# fun:vm_exec_core
# fun:rb_vm_exec
# fun:invoke_block
# fun:invoke_iseq_block_from_c
# fun:invoke_block_from_c_bh
# fun:vm_yield
# fun:rb_yield_0
# fun:rb_yield_1
# fun:rb_yield
# fun:rb_ary_each
# fun:vm_call_cfunc_with_frame
# fun:vm_call_cfunc
# fun:vm_call_method
# fun:vm_sendish
# fun:vm_exec_core
# fun:rb_vm_exec
# fun:invoke_block
# fun:invoke_iseq_block_from_c
# fun:invoke_block_from_c_bh
# fun:vm_yield
# fun:rb_yield_0
# fun:rb_yield_1
# fun:rb_yield
# fun:rb_ary_each
# fun:vm_call_cfunc_with_frame
# fun:vm_call_cfunc
# fun:vm_call_method
# fun:vm_sendish
# fun:vm_exec_core
# fun:rb_vm_exec
# fun:invoke_block
# fun:invoke_iseq_block_from_c
# fun:invoke_block_from_c_bh
# fun:vm_yield
# fun:rb_yield_0
# fun:rb_yield_1
# fun:rb_yield
# fun:rb_ary_collect
# fun:vm_call_cfunc_with_frame
# fun:vm_call_cfunc
# fun:vm_call_method
# fun:vm_sendish
# fun:vm_exec_core
# fun:rb_vm_exec
# fun:invoke_block
# fun:invoke_iseq_block_from_c
# fun:invoke_block_from_c_proc
# fun:vm_invoke_proc
# fun:rb_vm_invoke_proc
# fun:rb_proc_call
# fun:exec_end_procs_chain
# fun:rb_ec_exec_end_proc
# fun:rb_ec_teardown
# fun:rb_ec_cleanup
# fun:ruby_run_node
# fun:main
}
{
https://ci.nokogiri.org/teams/nokogiri-core/pipelines/nokogiri/jobs/ruby-libxmlruby-valgrind/builds/116,https://ci.nokogiri.org/teams/nokogiri-core/pipelines/nokogiri-pr/jobs/ruby-libxmlruby-valgrind/builds/13
node set enumerators seem to trigger this warning
Memcheck:Addr8
fun:mark_locations_array
fun:gc_mark_stacked_objects
fun:gc_mark_stacked_objects_all
fun:gc_marks_wb_unprotected_objects
fun:gc_marks_finish
fun:gc_marks_rest
fun:gc_rest.part.0
fun:gc_rest
fun:garbage_collect
...
fun:ruby_finalize_?
fun:ruby_cleanup
...
# fun:gc_start_internal
# fun:invoke_bf
# fun:vm_invoke_builtin_delegate
# fun:vm_exec_core
# fun:rb_vm_exec
# fun:invoke_block
# fun:invoke_iseq_block_from_c
# fun:invoke_block_from_c_bh
# fun:vm_yield
# fun:rb_yield_0
# fun:rb_yield_1
# fun:rb_yield
# fun:rb_ary_each
# fun:vm_call_cfunc_with_frame
# fun:vm_call_cfunc
# fun:vm_call_method
# fun:vm_sendish
# fun:vm_exec_core
# fun:rb_vm_exec
# fun:invoke_block
# fun:invoke_iseq_block_from_c
# fun:invoke_block_from_c_bh
# fun:vm_yield
# fun:rb_yield_0
# fun:rb_yield_1
# fun:rb_yield
# fun:rb_ary_each
# fun:vm_call_cfunc_with_frame
# fun:vm_call_cfunc
# fun:vm_call_method
# fun:vm_sendish
# fun:vm_exec_core
# fun:rb_vm_exec
# fun:invoke_block
# fun:invoke_iseq_block_from_c
# fun:invoke_block_from_c_bh
# fun:vm_yield
# fun:rb_yield_0
# fun:rb_yield_1
# fun:rb_yield
# fun:rb_ary_collect
# fun:vm_call_cfunc_with_frame
# fun:vm_call_cfunc
# fun:vm_call_method
# fun:vm_sendish
# fun:vm_exec_core
# fun:rb_vm_exec
# fun:invoke_block
# fun:invoke_iseq_block_from_c
# fun:invoke_block_from_c_proc
# fun:vm_invoke_proc
# fun:rb_vm_invoke_proc
# fun:rb_proc_call
# fun:exec_end_procs_chain
# fun:rb_ec_exec_end_proc
# fun:rb_ec_teardown
# fun:rb_ec_cleanup
# fun:ruby_run_node
# fun:main
}

0 comments on commit 2f76d57

Please sign in to comment.