Null Oddity

Inexplicable oddity of the day: X was hanging after log in. It looked like it got stuck on xrdb.

Inexplicable solution: /dev/null was not readable. (Not only do I not know why /dev/null being unreadable caused the problem, I also don’t know why /dev/null lost its world-readable bit).

There’s a first time for everything, I guess, and this is the first time /dev/null has been the crucial point in fixing my system.

I’m not sure I’d ever be able to explain how to diagnose and fix problems like this to newbies.

2 comments

  1. Huub Reuver Jan 28

    I guess /var/log/XFree86.0.log (or /etc/log/Xorg.0.log) told you the problem’s cause?

    Helping beginners is sometimes not more than “get an editor, read the file and post what you find on the mailinglist/usenet/whatever”. Most beginners already know how to read, therefore you might point them to the (EE) messages. It makes the posted message a few lines shorter.

    Almost all programs dump their errors to stdout (i.e. the terminal window), to the active console (dmesg) or to a logfile. And even commandline illiterates can work with pipes if they are told how it works (I prefer ‘script’ myself, which also shows the commands as they type them).

  2. Adam Rosi-Kessel Jan 28


    I guess /var/log/XFree86.0.log (or /etc/log/Xorg.0.log) told you the problem’s cause?

    Actually, there was nothing in that log file about the /dev/null issue. I discovered it somewhat accidentally, by ssh’ing into the machine that was stuck, and running .xsession from the shell. Some of the programs in .xsession were trying to read /dev/null so I saw the error there. I think xrdb hanging was separate from anything in .xsession, but that’s what tipped me off that /dev/null was not readable and that this might be the cause.

Leave a Reply

(Markdown Syntax Permitted)