{"id":1105,"date":"2007-11-07T12:29:18","date_gmt":"2007-11-07T20:29:18","guid":{"rendered":"http:\/\/coalface.mcslp.com\/2007\/11\/07\/mysterious-crashes-check-your-temporary-directory-settings\/"},"modified":"2007-11-07T12:29:18","modified_gmt":"2007-11-07T20:29:18","slug":"mysterious-crashes-check-your-temporary-directory-settings","status":"publish","type":"post","link":"https:\/\/planet.mcb.guru\/?p=1105","title":{"rendered":"Mysterious crashes? &#8211; check your temporary directory settings"},"content":{"rendered":"<p>Just recently I seem to have noticed an increased number of mysterious crashes and terminations of applications. This is generally on brand new systems that I&#8217;m setting up, or on existing systems where I&#8217;m setting up a new or duplicate account. <\/p>\n<p>Initially everything is fine, but then all of a sudden as I start syncing over my files, shell profile and so on applications will stop working. I&#8217;ve experienced it in MySQL, and more recently when starting up Gnome on Solaris 10 9\/07. <\/p>\n<p>Sometimes the problem is obvious, other times it takes me a while to realize what is happening and causing the problem. But in all cases it&#8217;s the same problem - my <code>TMPDIR environment variable points to a directory that doesn't exist. That's because for historical reasons (mostly related to HP-UX, bad permissions and global tmp directories) I've always set TMPDIR to a directory within my home directory. It's just a one of those things I've had in my bash profile for as long as I can remember. Probably 12 years or more at least. <\/p>\n<p>This can be counterproductive on some systems - on Solaris for example the main <\/code><code>\/tmp<\/code> directory is actually mounted on the swap space, which means that RAM will be used if it&#8217;s available, which can make a big difference during compilation. <\/p>\n<p>But any setting is counterproductive if you point to a directory that doesn&#8217;t exist and then have an application that tries to create a temporary file, fails, and then never prints out a useful trace of why it had a problem (yes, I mean you Gnome!). <\/p>\n<p>I&#8217;ve just reset my <code>TMPDIR<\/code> in <code>.bash_vars<\/code> to read: <\/p>\n<blockquote><p>\n<code>case $OSTYPE in<br \/>\n    (solaris*) export set TMPDIR=\/tmp\/mc;mkdir -m 0700 -p $TMPDIR<br \/>\n    ;;<br \/>\n    (*) export set TMPDIR=~\/tmp;mkdir -m 0700 -p $TMPDIR<br \/>\n    ;;<br \/>\nesac<\/code><\/p><\/blockquote>\n<p>Now I explicitly create a directory in a suitable location during startup, so I shouldn&#8217;t experience those crashes anymore.\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just recently I seem to have noticed an increased number of mysterious crashes and terminations of applications. This is generally on brand new systems that I&#8217;m setting up, or on existing systems where I&#8217;m setting up a new or duplicate account.<br \/>\nInitially everything is fine, but then all of a sudden as I start syncing [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[36],"_links":{"self":[{"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/posts\/1105"}],"collection":[{"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1105"}],"version-history":[{"count":0,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/posts\/1105\/revisions"}],"wp:attachment":[{"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}