{"id":40,"date":"2006-11-13T13:30:48","date_gmt":"2006-11-13T13:30:48","guid":{"rendered":"http:\/\/techa.nanosleep.org\/wp\/index.php\/2006\/11\/13\/session-wide-valgrind\/"},"modified":"2019-08-22T23:26:33","modified_gmt":"2019-08-22T21:26:33","slug":"session-wide-valgrind","status":"publish","type":"post","link":"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/","title":{"rendered":"Session-wide valgrind"},"content":{"rendered":"<p>Now that we know that even Evolution runs under Valgrind, we need a bigger challenge. So, how about the entire GNOME session?<\/p>\n<p>I've written a couple of tiny scripts that lower the threshold to doing this. They take care of properly launching your session in Valgrind, collecting (and filtering slightly) the resulting logs and cleaning up (important, since you can get lots of lingering valgrind processes if you don't).<\/p>\n<p>I made an OpenSuSE package (for the 10.2 beta, possibly 10.1) that integrates this functionality as a pair of standard GDM sessions that you can select on login. Just click \"Session\" in the login screen and select one of the GNOME Valgrind ones, then log in using that. When you log out, it'll generate a log file in \"$HOME\/valgrind-session.$N\".<\/p>\n<p>The generated reports from a typical session say something about our code quality. Especially the leak report is interesting &#8211; the log file, after everything but \"definite leaks\" (i.e. allocated blocks to which no pointers exist, neither to the beginning nor to an internal offset) is removed, is about 2MB for a login + immediate logout here. Even though there are many repetitions and fairly harmless leaks, there are some serious-looking ones in there:<\/p>\n<p>[~] grep \"definitely\" valgrind-session.0 | wc -l<br \/>\n1104<\/p>\n<p>Just install and restart GDM. At least <strong>one billion bytes<\/strong> of RAM recommended to run.<\/p>\n<p>Not everything works in an instrumented session (su, sudo definitely don't, and I've had problems with \"recent items\" and logging out using the slab &#8211; remedied by adding a logout button to your panel), but overall it's not bad. You can browse the web, read mail, use Nautilus, customize your desktop, launch applications (which will themselves be instrumented) etc.<\/p>\n<p>If you like proactive bug fixing (and have fairly powerful hardware), I encourage you to check it out and maybe even improve on the concept (there's a lot that could be done).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now that we know that even Evolution runs under Valgrind, we need a bigger challenge. So, how about the entire GNOME session? I've written a couple of tiny scripts that lower the threshold to doing this. They take care of &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-40","post","type-post","status-publish","format-standard","hentry","category-gnome"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Session-wide valgrind - Et tu, Cthulhu<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Session-wide valgrind - Et tu, Cthulhu\" \/>\n<meta property=\"og:description\" content=\"Now that we know that even Evolution runs under Valgrind, we need a bigger challenge. So, how about the entire GNOME session? I&#039;ve written a couple of tiny scripts that lower the threshold to doing this. They take care of &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/\" \/>\n<meta property=\"og:site_name\" content=\"Et tu, Cthulhu\" \/>\n<meta property=\"article:published_time\" content=\"2006-11-13T13:30:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-08-22T21:26:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hpjansson.org\/blag\/wp-content\/uploads\/2019\/01\/site-icon.png\" \/>\n\t<meta property=\"og:image:width\" content=\"512\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Hans Petter Jansson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hpj\" \/>\n<meta name=\"twitter:site\" content=\"@hpj\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Hans Petter Jansson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/\"},\"author\":{\"name\":\"Hans Petter Jansson\",\"@id\":\"https:\/\/hpjansson.org\/blag\/#\/schema\/person\/a86f9dc39a36a8184d6e6f9a759f235c\"},\"headline\":\"Session-wide valgrind\",\"datePublished\":\"2006-11-13T13:30:48+00:00\",\"dateModified\":\"2019-08-22T21:26:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/\"},\"wordCount\":315,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/hpjansson.org\/blag\/#\/schema\/person\/a86f9dc39a36a8184d6e6f9a759f235c\"},\"articleSection\":[\"GNOME\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/\",\"url\":\"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/\",\"name\":\"Session-wide valgrind - Et tu, Cthulhu\",\"isPartOf\":{\"@id\":\"https:\/\/hpjansson.org\/blag\/#website\"},\"datePublished\":\"2006-11-13T13:30:48+00:00\",\"dateModified\":\"2019-08-22T21:26:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/hpjansson.org\/blag\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Session-wide valgrind\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/hpjansson.org\/blag\/#website\",\"url\":\"https:\/\/hpjansson.org\/blag\/\",\"name\":\"Et tu, Cthulhu\",\"description\":\"Personal blag of Hans Petter Jansson: Fun with computers edition\",\"publisher\":{\"@id\":\"https:\/\/hpjansson.org\/blag\/#\/schema\/person\/a86f9dc39a36a8184d6e6f9a759f235c\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/hpjansson.org\/blag\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/hpjansson.org\/blag\/#\/schema\/person\/a86f9dc39a36a8184d6e6f9a759f235c\",\"name\":\"Hans Petter Jansson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hpjansson.org\/blag\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/33402e5005b34e5ee4ba4f9fd0c5d754f4505d5fb455736e5c585676cb7f2075?s=96&d=retro&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/33402e5005b34e5ee4ba4f9fd0c5d754f4505d5fb455736e5c585676cb7f2075?s=96&d=retro&r=g\",\"caption\":\"Hans Petter Jansson\"},\"logo\":{\"@id\":\"https:\/\/hpjansson.org\/blag\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/hpjansson.org\/\",\"https:\/\/x.com\/hpj\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Session-wide valgrind - Et tu, Cthulhu","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/","og_locale":"en_US","og_type":"article","og_title":"Session-wide valgrind - Et tu, Cthulhu","og_description":"Now that we know that even Evolution runs under Valgrind, we need a bigger challenge. So, how about the entire GNOME session? I've written a couple of tiny scripts that lower the threshold to doing this. They take care of &hellip;","og_url":"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/","og_site_name":"Et tu, Cthulhu","article_published_time":"2006-11-13T13:30:48+00:00","article_modified_time":"2019-08-22T21:26:33+00:00","og_image":[{"width":512,"height":512,"url":"https:\/\/hpjansson.org\/blag\/wp-content\/uploads\/2019\/01\/site-icon.png","type":"image\/png"}],"author":"Hans Petter Jansson","twitter_card":"summary_large_image","twitter_creator":"@hpj","twitter_site":"@hpj","twitter_misc":{"Written by":"Hans Petter Jansson","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/#article","isPartOf":{"@id":"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/"},"author":{"name":"Hans Petter Jansson","@id":"https:\/\/hpjansson.org\/blag\/#\/schema\/person\/a86f9dc39a36a8184d6e6f9a759f235c"},"headline":"Session-wide valgrind","datePublished":"2006-11-13T13:30:48+00:00","dateModified":"2019-08-22T21:26:33+00:00","mainEntityOfPage":{"@id":"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/"},"wordCount":315,"commentCount":0,"publisher":{"@id":"https:\/\/hpjansson.org\/blag\/#\/schema\/person\/a86f9dc39a36a8184d6e6f9a759f235c"},"articleSection":["GNOME"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/","url":"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/","name":"Session-wide valgrind - Et tu, Cthulhu","isPartOf":{"@id":"https:\/\/hpjansson.org\/blag\/#website"},"datePublished":"2006-11-13T13:30:48+00:00","dateModified":"2019-08-22T21:26:33+00:00","breadcrumb":{"@id":"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/hpjansson.org\/blag\/2006\/11\/13\/session-wide-valgrind\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hpjansson.org\/blag\/"},{"@type":"ListItem","position":2,"name":"Session-wide valgrind"}]},{"@type":"WebSite","@id":"https:\/\/hpjansson.org\/blag\/#website","url":"https:\/\/hpjansson.org\/blag\/","name":"Et tu, Cthulhu","description":"Personal blag of Hans Petter Jansson: Fun with computers edition","publisher":{"@id":"https:\/\/hpjansson.org\/blag\/#\/schema\/person\/a86f9dc39a36a8184d6e6f9a759f235c"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hpjansson.org\/blag\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/hpjansson.org\/blag\/#\/schema\/person\/a86f9dc39a36a8184d6e6f9a759f235c","name":"Hans Petter Jansson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hpjansson.org\/blag\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/33402e5005b34e5ee4ba4f9fd0c5d754f4505d5fb455736e5c585676cb7f2075?s=96&d=retro&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/33402e5005b34e5ee4ba4f9fd0c5d754f4505d5fb455736e5c585676cb7f2075?s=96&d=retro&r=g","caption":"Hans Petter Jansson"},"logo":{"@id":"https:\/\/hpjansson.org\/blag\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/hpjansson.org\/","https:\/\/x.com\/hpj"]}]}},"_links":{"self":[{"href":"https:\/\/hpjansson.org\/blag\/wp-json\/wp\/v2\/posts\/40","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hpjansson.org\/blag\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hpjansson.org\/blag\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hpjansson.org\/blag\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hpjansson.org\/blag\/wp-json\/wp\/v2\/comments?post=40"}],"version-history":[{"count":1,"href":"https:\/\/hpjansson.org\/blag\/wp-json\/wp\/v2\/posts\/40\/revisions"}],"predecessor-version":[{"id":504,"href":"https:\/\/hpjansson.org\/blag\/wp-json\/wp\/v2\/posts\/40\/revisions\/504"}],"wp:attachment":[{"href":"https:\/\/hpjansson.org\/blag\/wp-json\/wp\/v2\/media?parent=40"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hpjansson.org\/blag\/wp-json\/wp\/v2\/categories?post=40"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hpjansson.org\/blag\/wp-json\/wp\/v2\/tags?post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}