You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support for enabling valgrind's fair-sched option?聽#51
Big thanks for ruby_memcheck. I've been setting it up to run in CI for the datadog gem (the profiling stuff especially has a lot of native code).
I am happy to report that (so far) I don't have any wins to report ;) ;) ;)
I would like to ask for a small feature: Adding support for controlling valgrind's --fair-sched option.
Right now I'm using the escape hatch RubyMemcheck.config(valgrind_options: ['--fair-sched=yes']) to set it.
Why this option? In several cases, our test suite assumes multi-threaded behavior (because, e.g. the profiler runs in parallel with the Ruby app), and in some cases we run stuff in forks; by default valgrind forces everything to run sequentially (there's a joke in here about adding an even more global GVL somewhere...). This makes some of our specs fail (usually with timeouts) or hang (because they busy-loop in a few cases) as they would on a single-core machine.
Using this setting makes these tests pass and saves us from manually needing to maintain a list of excluded tests just for ruby_memtest.
Activity
ivoanjo commentedon Aug 20, 2024
Actually... when running with this setting it looks like sometimes valgrind doesn't write the full output? 馃
Parsing of the result fails with
FATAL: Premature end of data in tag valgrindoutput line 3and indeed the output xml is missing closing that tag.So, while it would be useful, I guess I won't use this setting for now. (Feel free to close the issue?)
Bootstrap support for running profiling tests with ruby_memcheck