{"id":321,"date":"2006-03-23T22:08:14","date_gmt":"2006-03-24T03:08:14","guid":{"rendered":"http:\/\/ywwg.com\/wordpress\/?p=321"},"modified":"2006-03-23T22:09:32","modified_gmt":"2006-03-24T03:09:32","slug":"adventures-in-linux","status":"publish","type":"post","link":"https:\/\/ywwg.com\/wordpress\/archives\/321","title":{"rendered":"adventures in linux"},"content":{"rendered":"<p>Today I wasted a lot of time on a Computer Maintenance Issue.  I haven&#8217;t had to do this in a while, so I thought I&#8217;d document the experience for posterity.<br \/>\n<!--more--><br \/>\nThis afternoon I was installing gstreamer 0.10 in \/usr\/local for fun, and I needed to install a dependency.  I launched synaptic, and it took fooooorrrrever and never showed up.  But the disk was cranking away, so obviously something was happening.  I tried logging out, and logging back in, and it hanged on the splash screen.  Uh oh.  So then I rebooted, and again it hanged on the splash screen.  The disk would churn in churn, although I couldn&#8217;t see any swap activity or which process was at fault.  After 20 minutes it eventually logged in, but the panel was crashed.  Things were Bad.<\/p>\n<p>I spent a lot of time looking for errors, watching logs, all of the usual suspects.  Other profiles worked, so it was something about my user account that was fucking up the login.  I spent a lot of time moving .gnome2, .gconf, and all that stuff.  I tried replacing those dirs with Known Good dirs from other accounts.  No matter what I did, I got the same behavior.<\/p>\n<p>I eventually contacted my brother Peter, who suggested I do everything I had already done.  I asked him if he could find a tool that would show me what process was accessing the disk, because that would help narrow down what was going on.  <\/p>\n<p>He pointed me to iostat, which doesn&#8217;t tell you which process is doing what, but it gives details about how much is being read, and how much is writes.  Interestingly, nearly all the activity was reads.<\/p>\n<p>This got me thinking that something was happening when programs started that caused them to do massive reads.  I logged into an account and let it hang.  Then I switched to a text terminal and ran gnome-terminal &#8211;display=0:0 to launch it on the desktop.  Then I ran strace gedit, and looked at what it was doing.  As it launched, it started reading every single directory in my 40 gig home directory.  Read read read.<\/p>\n<p>Then it clicked: fonts.  Earlier that day I had been using scribus, and it wasn&#8217;t seeing all my fonts.  Since it looked like a KDE program I ran kfontinst on my ~\/.fonts dir.  That was around the time I started having problems!  If gedit was reading every directory for fonts on startup, that meant kfontinst had somehow told the font server that my home directory was a font directory, and the font server was dutifully searching the whole fucking tree.<\/p>\n<p>I poked around the dot files in my home dir, and sure enough, .fonts.conf had a tiny little line at the bottom:<br \/>\n<code>&lt;dir&gt;.&lt;\/dir&gt;<\/code><br \/>\nI deleted it, restarted gedit, and it came right up. After that I just had to restore my settings from the backups, and everything was back to normal.  <\/p>\n<p>This took a long, long time, because my normal debugging methods weren&#8217;t working.  Nothing was showing up in logs because nothing was technically wrong.  And although the disk was churning, it was all reads, so I couldn&#8217;t locate a gigantic exploding file.  And because every GNOME program was triggering the problem, I couldn&#8217;t tell that it was happening to all of them instead of one bad app.  <\/p>\n<p>Maybe I did something wrong, but I haven&#8217;t had to deal with this shit in a long time.  It&#8217;s hard to resist giving a big FUCK YOU to KDE for ruining my evening &#8212; but in the end it was probably my fault.  At least I didn&#8217;t go to the next step, which was going to be recreating my entire profile from scratch.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I wasted a lot of time on a Computer Maintenance Issue. I haven&#8217;t had to do this in a while, so I thought I&#8217;d document the experience for posterity.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,13,5],"tags":[],"_links":{"self":[{"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/posts\/321"}],"collection":[{"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/comments?post=321"}],"version-history":[{"count":0,"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/posts\/321\/revisions"}],"wp:attachment":[{"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/media?parent=321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/categories?post=321"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/tags?post=321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}