{"id":415,"date":"2005-05-27T13:19:12","date_gmt":"2005-05-27T03:19:12","guid":{"rendered":"http:\/\/www.flamingspork.com\/blog\/?p=415"},"modified":"2005-11-29T21:19:59","modified_gmt":"2005-11-29T11:19:59","slug":"helgrind","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2005\/05\/27\/helgrind\/","title":{"rendered":"Helgrind"},"content":{"rendered":"<p>To try and help in debugging, I&#8217;ve been playing with some of the extra tools that come with <a href=\"http:\/\/www.valgrind.org\">Valgrind<\/a>.<\/p>\n<p>Everybody knows that if you aren&#8217;t using <a href=\"http:\/\/www.valgrind.org\">Valgrind<\/a> you are <b>living in sin<\/b>.<\/p>\n<p>I&#8217;ve recently tried to have a go at using <a href=\"http:\/\/valgrind.org\/docs\/manual\/hg-manual.html\">Helgrind<\/a>. It&#8217;s suppossed to be able to help you in finding race conditions in multithreaded applications.<\/p>\n<p>Well, mysql is multithreaded, and so is NDB (cluster), so, this could be rather useful (especially since, with some new work being done, i&#8217;ve found race conditions, i just need to find out where).<\/p>\n<p>From the manual:<\/p>\n<blockquote><p>\nBasically what Helgrind does is to look for memory locations which are accessed by more than one thread. For each such location, Helgrind records which of the program&#8217;s (pthread_mutex_)locks were held by the accessing thread at the time of the access. The hope is to discover that there is indeed at least one lock which is used by all threads to protect that location. If no such lock can be found, then there is (apparently) no consistent locking strategy being applied for that location, and so a possible data race might result.\n<\/p><\/blockquote>\n<p>sounds reasonable enough.<br \/>\nNow I&#8217;m actually chasing up one of it&#8217;s possible data races and seeing if it is, in fact, a race.<\/p>\n<p>Has anybody else had any experience with Helgrind? Thoughts?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To try and help in debugging, I&#8217;ve been playing with some of the extra tools that come with Valgrind. Everybody knows that if you aren&#8217;t using Valgrind you are living in sin. I&#8217;ve recently tried to have a go at &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2005\/05\/27\/helgrind\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1,14],"tags":[],"class_list":["post-415","post","type-post","status-publish","format-standard","hentry","category-general","category-mysql"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/s5a6n8-helgrind","jetpack-related-posts":[{"id":704,"url":"https:\/\/www.flamingspork.com\/blog\/2006\/05\/30\/i-heart-valgrind-or-an-early-patch-integrating-the-mysql-mem_root-stuff-with-valgrind\/","url_meta":{"origin":415,"position":0},"title":"I heart valgrind (or: an early patch integrating the MySQL MEM_ROOT stuff with valgrind)","author":"Stewart Smith","date":"2006-05-30","format":false,"excerpt":"Everybody knows that valgrind is great. Well, I was observing a problem in some MySQL code, it looked like we were writing over some memory that we weren't meant to be (as the structure hadn't been initialised yet). But, seeing as this was memory that had been allocated off a\u2026","rel":"","context":"In &quot;mysql&quot;","block_context":{"text":"mysql","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/mysql\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":377,"url":"https:\/\/www.flamingspork.com\/blog\/2005\/03\/18\/arjen_lentz-google-code\/","url_meta":{"origin":415,"position":1},"title":"arjen_lentz: Google Code","author":"Stewart Smith","date":"2005-03-18","format":false,"excerpt":"arjen_lentz: Google Code their multithreaded core dump lib and their memory stuff looks interesting... being able to core dump a multithreaded app *while running* would be so cool. Hit an error condition, dump out a core file to send to engineers to fix it. even if it's recoverable. rock.","rel":"","context":"In &quot;mysql&quot;","block_context":{"text":"mysql","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/mysql\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4035,"url":"https:\/\/www.flamingspork.com\/blog\/2016\/02\/26\/mysql-contributions-status\/","url_meta":{"origin":415,"position":2},"title":"MySQL Contributions status","author":"Stewart Smith","date":"2016-02-26","format":false,"excerpt":"This post is an update to the status of various MySQL bugs (some with patches) that I've filed over the past couple of years (or that people around me have). I'm not looking at POWER specific ones, as there are these too, but each of these bugs here deal with\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":638,"url":"https:\/\/www.flamingspork.com\/blog\/2006\/04\/05\/finding-the-cause-of-a-bug-lesson-1\/","url_meta":{"origin":415,"position":3},"title":"Finding the cause of a bug Lesson 1","author":"Stewart Smith","date":"2006-04-05","format":false,"excerpt":"Assume nothing. Your assumptions are wrong, that's why there's a bug silly! If valgrind had a time machine function it'd be totally awesome. But it doesn't so currently extra work and thinking is required. doh!","rel":"","context":"In &quot;mysql&quot;","block_context":{"text":"mysql","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/mysql\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":682,"url":"https:\/\/www.flamingspork.com\/blog\/2006\/04\/27\/cool-dolphin-sci-interconnect-stuff\/","url_meta":{"origin":415,"position":4},"title":"Cool Dolphin SCI interconnect stuff","author":"Stewart Smith","date":"2006-04-27","format":false,"excerpt":"http:\/\/www.dolphinics.com\/ make this cool SCI socket hardware that can be used with MySQL Cluster (for example, like their example setup). Their tech provides high performance (350MB\/sec avail to the user) and low latency (worst case is like 2 or 3 micro seconds to send 512bytes to another node). So can\u2026","rel":"","context":"In &quot;cool gadgets&quot;","block_context":{"text":"cool gadgets","link":"https:\/\/www.flamingspork.com\/blog\/category\/cool-gadgets\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1235,"url":"https:\/\/www.flamingspork.com\/blog\/2008\/11\/05\/singing-in-the-rain\/","url_meta":{"origin":415,"position":5},"title":"Singing in the Rain","author":"Stewart Smith","date":"2008-11-05","format":false,"excerpt":"The past 3 years, 11 months I have worked full time on NDB (MySQL Cluster). It's been awesome. Love the product and people. In the time I've been on the Cluster team, we've gone from a small group that would easily fit in the (old old) Stockholm office to one\u2026","rel":"","context":"In &quot;life, the universe and everything&quot;","block_context":{"text":"life, the universe and everything","link":"https:\/\/www.flamingspork.com\/blog\/category\/life-the-universe-and-everything\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/415","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/comments?post=415"}],"version-history":[{"count":0,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/415\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}